10372 Commits

Author SHA1 Message Date
Tomas Votruba
d7d4603218
improve SpecificAssertContainsRector for union type (#4610) 0.8.53 2020-11-15 02:41:46 +01:00
Tomas Votruba
e7f1963d67 [CI] do not build rector.phar, only scoped 2020-11-14 21:10:09 +00:00
Tomas Votruba
9d7fa63bf8 [CI] use monorepo-split action to split packages 0.8.52 2020-11-14 20:25:20 +00:00
Tomas Votruba
2ea43de66d composer: use migrify 0.4 0.8.51 2020-11-14 20:19:55 +00:00
Abdul Malik Ikhsan
978087e846
[CodeQuality] Skip ForToForeachRector on assign count is used inside for statements (#4607)
* Failing fixture for to foreach assign count is used inside for

* Fix skip assign count used inside for statements

* cs fix

* use areNodesEqual()

* phpstan

* method naming

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-14 14:07:38 +00:00
github-actions[bot]
f612b2b6a5
[automated] Re-Generate CHANGELOG.md (#4605)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-11-14 02:29:28 +01:00
github-actions[bot]
514cf0d88b
[automated] Re-Generate Nodes/Rectors Documentation (#4604)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-11-14 02:27:55 +01:00
Tomas Votruba
82c9f47447
[Carbon] Add ChangeCarbonSingularMethodCallToPluralRector (#4596) 2020-11-14 01:00:35 +01:00
Tomas Votruba
2a2c49d4ae
[PHPUnit] Add ConstructClassMethodToSetUpTestCaseRector (#4603)
* [CI] enable automated changelog regenerate

* [CI] drop generate docs, already part of PRs

* [PHPUnit] Add ConstructClassMethodToSetUpTestCaseRector

* make use of SetUpClassMethodFactory
2020-11-13 20:32:18 +00:00
Tomas Votruba
cf298105f0
[PHPUnit] Add class constant reference to ExceptionAnnotationRector (#4602)
* [PHPUnit] Add class constant reference to ExceptionAnnotationRector

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
0.8.50
2020-11-13 17:37:01 +00:00
Tomas Votruba
feccfdad63
[PHPUnit] Add maybe string check to SpecificAssertContainsRector (#4601) 2020-11-13 16:55:15 +00:00
Abdul Malik Ikhsan
2562a2dcee
[CodingStyle] Fixes #4453 Add RemoveParamReturnDocblockRector (#4600)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-13 14:58:17 +01:00
Abdul Malik Ikhsan
7203ff0770
[DX] Fixes #4588 Enable PreferThisOrSelfMethodCallRector in rector-ci.php (#4597)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-13 12:15:33 +01:00
Abdul Malik Ikhsan
120e531084
[DeadCode] Fixes #4472 Remove method call on $this (#4598)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-13 12:14:25 +01:00
Abdul Malik Ikhsan
aae9a54768
[Symfony] Fixes #4583 Skip AbstractToConstructorInjectionRector when service type not found (#4599) 2020-11-13 12:13:48 +01:00
Tomas Votruba
7c3e803416
[Carbon 2] Init (#4595)
* [Carbon] Init new rules

* add ChangeDiffForHumansArgsRector

* [Carbon] Add ChangeCarbonSingularMethodCallToPluralRector

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-13 00:45:58 +00:00
github-actions[bot]
26efdc6622
[automated] Re-Generate Nodes/Rectors Documentation (#4594)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-11-13 01:38:40 +01:00
Tomas Votruba
a4a8f57eab
laravel call on static (#4593)
* add non-static call too

* laravel - add select/select one new param

* [ci-review] Apply coding standards

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-12 22:19:55 +00:00
Tomas Votruba
9dbf490a10
add non-static call too (#4592) 2020-11-12 22:08:18 +00:00
Tomas Votruba
aba4be85bb [Laravel] Update compoare sign 2020-11-12 21:45:45 +00:00
Tomas Votruba
14396a0d38 typo 2020-11-12 21:40:13 +00:00
Tomas Votruba
4318df9c17
[Laravel] Add AddGuardToLoginEventRector (#4591)
* [Laravel] Add AddGuardToLoginEventRector

* [CI] decouple daily_pull_requests
2020-11-12 21:35:25 +00:00
Abdul Malik Ikhsan
3d2c7c30bd
[CodingStyle] Failing test case for cannot change this to self (#4590)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-12 21:50:36 +01:00
Tomas Votruba
7e3f8bdafc
[Laravel] Add AddMockConsoleOutputFalseToConsoleTestsRector (#4589)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-12 21:47:25 +01:00
Abdul Malik Ikhsan
657a21ba54
[Doctrine] Fixes #4566 Rename ServiceEntityRepositoryConstructorToDependencyInjectionWithRepositoryPropertyRector to ServiceEntityRepositoryParentCallToDIRector (#4587) 2020-11-12 16:53:11 +01:00
Tomas Votruba
aa91f11a3f
[Laravel 5.7] Add ChangeQueryWhereDateValueWithCarbonRector (#4586)
* [Laravel] Add ChangeQueryWhereDateValueWithCarbonRector

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-12 15:28:50 +00:00
Abdul Malik Ikhsan
c88811f816
[BetterStandardPrinter] Fixes #4476 @ORM Constraint should not be changed (#4585) 2020-11-12 15:47:24 +01:00
Abdul Malik Ikhsan
31397c1cf8
[BetterStandardPrinter] Fixes #4581 @Orm\Column should not be changed (#4584)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-12 11:25:25 +01:00
Tomas Votruba
4c6da2c4bf
[Laravel 5.7] Add parent boot rule (#4580)
* move file to templates, to remove confusion in the root

* use stable symplify

* [Laravel] Add AddParentBootToModelClassMethodRector

* [ci-review] Generate Rector & Nodes documentation

* [ci-review] propagate monorepo dependencies

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-11 17:09:57 +00:00
Abdul Malik Ikhsan
75714bb3d6
[CodeQuality] Fixes #4578 Skip ForToForeachRector on complex init (#4579) 2020-11-11 17:08:28 +00:00
Abdul Malik Ikhsan
0e5386c5d8
[BetterStandardPrinter] Fixes #3673 Doctrine Annotation comment should not be changed (#4577) 0.8.49 2020-11-11 16:14:31 +01:00
Abdul Malik Ikhsan
11fbc4c1c9
[BetterStandardPrinter] Fixes #4274 #4573 Annotation callback and Route values should not be changed (#4576)
* [BetterStandardPrinter] Fixes #4274 Annotation callback value should not changed to const

* backtrack fix

* update regex link

* namespace fix

* [ci-review] Apply coding standards

* [ci-review] Rector Rectify

* php 7.2 syntax

* Fixes #4573

* regex fix

* rework, need to one by one step

* handle route annotation

* phpstan

* [ci-review] Apply coding standards

* move content patch functionalities to new service : ContentPatcher

* [ci-review] Rector Rectify

* clean up phpstan

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-11 13:06:46 +00:00
Abdul Malik Ikhsan
db18c7de19
[PHP 8.0] Improve NullsafeOperatorRector : Check against !== null (#4572)
* [PHP 8.0] Improve NullsafeOperatorRector : Check against !== null

* [ci-review] Apply coding standards

* [ci-review] Rector Rectify

* phpstan

* try process next only

* not identical process only direct if after assign

* phpstan

* [ci-review] Rector Rectify

* not identical with non-null check

* not identical with non-null check

* add yoda condition

* phpstan

* [ci-review] Apply coding standards

* move check if cond using assign identical/not identical to IfManipulator service

* cs fix

* [ci-review] Rector Rectify

* [ci-review] Apply coding standards

* move NullSafe process to NullsafeManipulator service

* phpstan

* [ci-review] Apply coding standards

* use instanceof check

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-11 11:48:47 +00:00
Abdul Malik Ikhsan
ef442dca03
[PHP 8.0] Improve NullsafeOperatorRector : No need ?-> on very first call (#4571)
* [PHP 8.0] Improve NullsafeOperatorRector : No need ?-> on very first call

* use bool check is start if

* phpstan

* phpstan and code example update

* [ci-review] Generate Rector & Nodes documentation

* [ci-review] Apply coding standards

* using $isStartIf = true default

* clean up

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-10 10:09:39 +00:00
Abdul Malik Ikhsan
b4fd52021d
[PHP 8.0] Improve NullsafeOperatorRector : Skip no direct usage after if in next statement at last (#4565)
* [PHP 8.0] Improve NullsafeOperatorRector : Skip no direct usage after if

* [ci-review] Apply coding standards

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-09 13:14:57 +00:00
Tomas Votruba
44063910e6 remove unused config 2020-11-08 22:37:03 +00:00
Tomas Votruba
abb3c18570 remove unused config 2020-11-08 22:36:39 +00:00
Ronny López
531275df5b
Fix StrStartsWithRector to allow strpos not identical operation (#4562) 2020-11-08 23:35:05 +01:00
Tomas Votruba
b39caa53cc [CI] try to fix ref on forks 2020-11-08 22:27:13 +00:00
Abdul Malik Ikhsan
660f51019a
[PHP 8.0] Fixes #4527 Add NullsafeOperatorRector (#4557)
Co-authored-by: rector-bot <tomas@getrector.org>
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-11-08 23:15:16 +01:00
Abdul Malik Ikhsan
4764fd1ac3
[DeadCode] Fixes #4561 Skip RemoveUnusedPrivatePropertyRector removes used Parameter (#4564)
* Add test case for not removing used constructor parameter

* Fixes #4561 Closes #4563

* [ci-review] Generate Rector & Nodes documentation

* [ci-review] Apply coding standards

* phpstan

* reduce complexity

* [ci-review] Rector Rectify

Co-authored-by: Tim Siebels <siebels.tim@gmail.com>
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-08 18:22:24 +00:00
David Meert
eff32d7f76
fix: PHP_Parser T_Match issue with php 7 (#4560) 2020-11-06 00:02:58 +01:00
Tomas Votruba
3940e42d25 rector update 2020-11-05 02:01:47 +01:00
Tomas Votruba
f841c8c470 fix cs 2020-11-05 01:50:43 +01:00
Krystian Marcisz
a92f4c1e2d
[DoctrineCodeQuality] Remove redundant default values from annotations (#4542)
* Move duplicated getAttributableItems() method to abstract parent

* Add removeItem() method to AbstractTagValueNode class

* Add RemoveRedundantDefaultAnnotationValuesRector rule with tests

* Link second test case of RemoveRedundantDefaultAnnotationValuesRector

* Add to set and docs

* Rename variable in DoctrineClassAnalyzer::matchDoctrineEntityTagValueNode()

* Remove redundant docblocks in RemoveRedundantDefaultAnnotationValuesRector

* Extract hasItemWithDefaultValue method in RemoveRedundantDefaultAnnotationValuesRector

* Optimize RemoveRedundantDefaultAnnotationValuesRector

* Split rule into two separate: one for Property and one for Class_

* PHP CS Fixer

* PHPStan
2020-11-04 22:51:11 +01:00
Abdul Malik Ikhsan
600334eafa
Fixes #4499 Code duplication on interface_exists and trait_exists inside if condition (#4553)
* debug content forat interface_exists

* add link to the post about format preserving

* Fixes #4499 Closes #4548

* [ci-review] Rector Rectify

* allow 0 space

* ensure matches[0] = matches[1] . matches[1]

* ensure count matches is 2

* phpstan

* [ci-review] Rector Rectify

* add test

* phpstan

* handle no {}

* clean up

* [ci-review] Rector Rectify

* fixture fix

* phpstan

* add @see https://github.com/rectorphp/rector/issues/4499 reference issue

Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-04 22:32:49 +01:00
Abdul Malik Ikhsan
0cc7b66a1e
[FileSystem] Improve MovedFileWithNodesFactory : SKip if desiredGroupName already inside oldClassName (#4554) 2020-11-04 15:55:22 +01:00
Abdul Malik Ikhsan
44864580a0
[Nette 3.0] Register ConvertAddUploadWithThirdArgumentTrueToAddMultiUploadRector to nette-30 config set (#4552) 2020-11-04 05:27:33 +00:00
Abdul Malik Ikhsan
01092de6bb
[Nette 3.0] Fixes #4387 : Add ConvertAddUploadWithThirdArgumentTrueToAddMultiUploadRector (#4551)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-04 05:45:10 +01:00
Tomas Votruba
11031629d6 prevent spamming with long file contents of added files 2020-11-04 05:26:31 +01:00