37 Commits

Author SHA1 Message Date
Abdul Malik Ikhsan
c2c5228199
[TypeDeclaration] Improve FlipTypeControlToUseExclusiveTypeRector : add Nullable support for Assign expr (#5254)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-20 11:41:35 +00:00
Tomas Votruba
ec92bcc95e
[phpstan] enable file lenght rule (#4999)
* enable file lenght rule

* longer file, just to show ci worked

* [ci] add ValidateFileLengthCommand

* [phpstan] drop PathsAreNotTooLongRule

* [Downgrade] Shorten property promotion rector rule

* [Symfony] Shorten AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector name

* shorten fixture name

* rename ChangeControlArrayAccessToAnnotatedControlVariableRector to AnnotateMagicalControlArrayAccessRector

* rename ReplaceMagicEventPropertySubscriberWithEventClassSubscriberRector to ReplaceMagicPropertyWithEventClassRector

* rename GetConfigWithDefaultsArgumentToArrayMergeInCompilerExtensionRector to MergeDefaultsInGetConfigCompilerExtensionRector

* rename ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector to ChangeStringCollectionOptionToConstantRector

* decouple ProjectFilesFinder
2020-12-26 14:53:21 +00:00
Tomas Votruba
bfcdd22a7c
[Privatization] Move FinalizeClassesWithoutChildrenRector here (#4986) 2020-12-25 14:59:14 +01:00
Abdul Malik Ikhsan
ec5daad132
[Util] Add StaticInstanceOf (#4979)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-25 12:53:26 +01:00
Tomas Votruba
d465ec83e2
[DeadCode] Move RecastingRemovalRector from PHPStan set (#4983)
* [DeadCode] Move RecastingRemovalRector from PHPStan set

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-25 00:22:45 +00:00
Abdul Malik Ikhsan
ca0b4cfdc7
[EarlyReturn] Register ChangeOrIfReturnToEarlyReturnRector to early-return set (#4975)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-24 17:28:56 +01:00
Abdul Malik Ikhsan
24e17588c1
[Utils] Run validate-fixture-namespace/classname to rules/ directories (#4935) 2020-12-22 18:12:20 +01:00
Tomas Votruba
a8a0030bf9
Move package to 1st position in recipe (#4882)
* add alias

* [recipe] enable set by default, most contributors are core

* move package to 1st place, close to rule name where we think about package

* [ci-review] Rector Rectify

* fix recipe test

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-14 16:24:33 +00:00
Leonardo Losoviz
78c619be8c
[Downgrade] Apply trailing commas rule also on func/method/static call (#4878)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-14 12:40:09 +01:00
Tomas Votruba
c68fd43b65
Bump to Symplify 9 (#4830)
* composer: bump to Symplify 9

* fix cs

* update InputDetector to StaticInputDetector

* add missign symplify/ packages

* remove already included phpstan configs

* [CI] test lowest deps on PHP 7.3, as minimum for Symplify 9

* bump doctrine/inflector and sebastian/diff

* [CI] symplify PHP 7.3 testing
2020-12-09 15:41:23 +00:00
Abdul Malik Ikhsan
a8bcbe0aa7
[Downgrade PHP 8.0] Add DowngradeTrailingCommasInParamUseRector (#4828)
Co-authored-by: Krystian Marcisz <simivar@gmail.com>
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-09 14:36:35 +01:00
Abdul Malik Ikhsan
67ba16089a
[Downgrade PHP X.Y] Consistent usage of getPhpVersion() as constant - 1 in tests (#4822) 2020-12-09 12:28:15 +01:00
Leonardo Losoviz
7c991a9898
[Downgrade PHP 7.0] Remove param and return types (#4819)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-08 13:02:26 +01:00
Abdul Malik Ikhsan
e25370bd21
[Downgrade PHP 8.0] Fixes #4154 Add DowngradeNullsafeToTernaryOperatorRector (#4807) 2020-12-06 11:43:38 +01:00
Tomas Votruba
9792b8d0bd
keep description string as standard (#4811) 2020-12-06 11:30:46 +01:00
Tomas Votruba
db63a96397
[PHP 8.0] CI test fixes (#4805)
* [Downgrade PHP 8.0] Fix Union type

* run variable rename

* allow test

* fix regex

* allow run

* remove test dependency on DateTime changing api

* normalize
2020-12-06 10:19:17 +00:00
Tomas Votruba
bfd1953f97
move string downgrade types to object classes (#4801)
* move string downgrade types to object classes

* fix nullable type unwrap

* remove uneeded open tags from samples

* remove uneeded union type check
2020-12-06 00:27:00 +00:00
Tomas Votruba
3b22532794
[Downgrade] [PHP 8.0] Fix static type (#4800) 2020-12-06 01:05:21 +01:00
Tomas Votruba
dc61d2fecf
add docblock on downgrade by default (#4799)
* add docblock on downgrade by default

* update docs

* drop no docblock test
2020-12-05 22:33:27 +00:00
Tomas Votruba
7f1d304c9a
[Downgrade] [PHP 8.0] Add DowngradeMatchToSwitchRector (#4788) 2020-12-05 13:20:56 +00:00
Tomas Votruba
f672eace0e
[DX] Add init-recipe command to create recipe config in root (#4789)
* [DX] Add init-recipe command to initlaize recipe

* update docs
2020-12-05 13:20:13 +00:00
Tomas Votruba
e627304df9
[PHP 8.0] [Downgrade] Add DowngradeNonCapturingCatchesRector (#4787) 2020-12-05 11:50:31 +00:00
Abdul Malik Ikhsan
1e667b454f
[CI] Add PHP 8.0 to Github actions tests (#4779) 2020-12-05 12:10:44 +01:00
Abdul Malik Ikhsan
d3a6a1db28
[Downgrade PHP 8.0] Add DowngradeClassOnObjectToGetClassRector (#4772) 2020-12-04 15:00:52 +01:00
Leonardo Losoviz
5257f3ae3e
Downgrade PHP 7.4 contravariant argument type (#4770)
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-12-04 12:30:37 +01:00
Tomas Votruba
09f17a7b64
[Downgrade] [PHP 8.0] Add DowngradePropertyPromotionToConstructorPropertyAssignRector (#4762)
* [Downgrade] [PHP 8.0] Add DowngradePropertyPromotionToConstructorPropertyAssignRector

* fix parent

* various fixes for PHP 8.0 tests

* [ci-review] Rector Rectify

* Update rules/downgrade-php80/tests/Rector/Class_/DowngradePropertyPromotionToConstructorPropertyAssignRector/DowngradePropertyPromotionToConstructorPropertyAssignRectorTest.php

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-03 13:27:24 +00:00
Abdul Malik Ikhsan
a38debb672
[DX] Fixes #4205 Change phpversion from string to php constant int type (#4679)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-24 16:32:49 +01:00
Tomas Votruba
a7705ed0a5
[Symplify 9] First update + switch to RuleDocGenerator (#4616)
* [composer] bump to Symplify 9

* [Symplify 9] Update phpstan rules

* bump to Symplify 9 BETA2

* update AbstractKernel from Tests to Testing namespace

* decoupling removing node trait

* remove fluent calls

* removing variadic

* [CodingStyle] Improve AnnotateThrowablesRector

* bump deps

* Make use of RuleDocGenerator

* first short

* [DocumentationGenerator] Drop deprecated package, RuleSetGenerator now handles it

* import namespace

* update docs
2020-11-16 17:50:38 +00:00
Tomas Votruba
0513315056
Change file system approach of MultipleClassFileToPsr4ClassesRector to file without namespace node (#4522)
* Change file system approach of MultipleClassFileToPsr4ClassesRector to file without namespace node

* update DecoupleClassMethodToOwnClassRector

* [ci] add rebase jobp

* disable fail fast for unit tests

* misc
2020-10-31 12:59:40 +00:00
Igor
f2ecdeb0b1
[Naming] Foreach over "data", renames to "datum" (#4221)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-15 10:23:13 +02:00
Tomas Votruba
4711abebd1
[RemovingStatic] Add SingleStaticServiceToDynamicRector (#4212)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-13 12:36:29 +02:00
Leonardo Losoviz
abb9a3ef90
Downgrade PHP7.1 features: nullable types and void return type (#4192) 2020-09-12 11:50:13 +02:00
dobryy
a6444fb801
[DX] Configurable rule must have configure code sample, and vice versa (#4174)
* [DX] Configurable rule must have configure code sample, and vice versa

* Add ConfiguredCodeSample

* heredocs

* code sample

* fix class

* drop AbstractConfigurableMatchTypeRector

Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-09-11 11:21:48 +02:00
Leonardo Losoviz
5dbd454102
Remove DowngradeRectorInterface (#4179)
Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-09-09 11:03:05 +02:00
Leonardo Losoviz
b54a40aa61
[Downgrade PHP 8.0] mixed and static types (#4162)
Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-09-08 16:10:42 +02:00
Leonardo Losoviz
4197899608
Downgrade union type (#4150)
Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-09-08 15:25:38 +02:00
Leonardo Losoviz
4eacc84b22
Organize downgrades by PHP version (#4147)
Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-09-08 13:12:38 +02:00