Commit Graph

12585 Commits

Author SHA1 Message Date
Tomas Votruba e3f20c1fb6
[docker] remove docker building from release repository (#614) 2021-08-08 18:42:15 +02:00
Tomas Votruba a8b01f217b
[automated] Re-Generate Nodes/Rectors Documentation (#619)
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
2021-08-08 00:14:44 +00:00
Tomas Votruba 1ac0bf7dbe
[automated] Re-Generate preload.php (#618)
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
2021-08-08 00:14:14 +00:00
Abdul Malik Ikhsan 72df0f63c5
[DeadCode] Mirror comment on RemoveUnusedNonEmptyArrayBeforeForeachRector (#610) 2021-08-07 13:32:36 +02:00
Abdul Malik Ikhsan b64b1b26e0
[DeadCode] Skip RemoveUnreachableStatementRector on use of $this->markTestIncomplete() (#612) 2021-08-07 13:32:14 +02:00
Abdul Malik Ikhsan ed08fd3636
[DeadCode] Skip RemoveDeadStmtRector on property fetch on __get (#609)
Co-authored-by: GitHub Action <action@github.com>
2021-08-07 13:31:26 +02:00
Abdul Malik Ikhsan 7e0859efe1
[DeadCode] Skip non-typed property for RecastingRemovalRector (#608) 2021-08-07 13:24:57 +02:00
Abdul Malik Ikhsan 6f0814042f
[DeadCode] Skip RemoveEmptyMethodCallRector on used directly by other method call (#607) 2021-08-07 13:24:22 +02:00
Abdul Malik Ikhsan 2d22795af1
[DeadCode] Skip RemoveDeadConstructorRector on empty constructor with class extends (#611) 2021-08-07 13:23:31 +02:00
Abdul Malik Ikhsan d4d2e7a4d5
[Testing] Fixing MultipleFilesChangedTrait under macOs (#605)
* [Testing] Fixing mMultipleFilesChangedTrait under macOs

* final touch

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* use relative path as key

Co-authored-by: GitHub Action <action@github.com>
2021-08-06 22:02:18 +02:00
Abdul Malik Ikhsan bb384013c3
[CodeQuality] CodeQuality config set list clean up (#606)
* [CodeQuality] CodeQuality config set list clean up

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: GitHub Action <action@github.com>
2021-08-06 22:01:54 +02:00
Tomas Votruba 45766e1d95
Decopule ChildClassMethodDecorator, and DependencyClassMethodDecorator (#600) 2021-08-06 10:39:44 +02:00
Michal Lulco c2acf79190
Added test for Rectors making additional changes (#545)
* Added test for Rectors making additional changes

* Fix empty expected content

* fix - added missing parameter

* Moved multiple files change to trait and added docs

* Rewritten test for Update file name by class name

* Separate test using multiple files changed trait

* Separated test

* Created separated test with separated rector

* Fix phpstan

* Changed namespace for dummy rector
2021-08-06 08:39:47 +02:00
Dominik Peters 7398a6637c
Add failing test fixture for RemoveUnusedPrivateMethodRector (#604)
* Add failing test fixture for ReturnTypeFromReturnNewRector

# Failing Test for ReturnTypeFromReturnNewRector

Based on https://getrector.org/demo/1ebef269-093c-6afe-9c29-afdc8959befb

refs https://github.com/rectorphp/rector/issues/6595

* Add failing test fixture for RemoveUnusedPrivateMethodRector

# Failing Test for RemoveUnusedPrivateMethodRector

Based on https://getrector.org/demo/1ebf50d7-992f-63ba-9a8a-bd39c81b9232

refs: https://github.com/rectorphp/rector/issues/6613

* fix test case skip_abstract_private_method_in_trait.php.inc

* remove file from previous PR

* fix fixture by moving namespace to top

* import TraitUse

* use AstResolver

* added test case to check if non-abstract private methods are considered

* refac: moved "is used" checks into it's own class to reduce class complexity

* rename constructor arg to represent class name
2021-08-06 08:35:13 +02:00
Abdul Malik Ikhsan e740a93886
[TypeDeclaration] Handle return self and static on ReturnTypeFromReturnNewRector (#603)
* Add failing test fixture for ReturnTypeFromReturnNewRector

# Failing Test for ReturnTypeFromReturnNewRector

Based on https://getrector.org/demo/1ebef269-093c-6afe-9c29-afdc8959befb

refs https://github.com/rectorphp/rector/issues/6595

* Closes #602 Fixes https://github.com/rectorphp/rector/issues/6595

* final touch

* centralize check in TypeFactory

* mixed

* clean up

Co-authored-by: Dominik Peters <kuhlesdominik@gmx.de>
2021-08-05 23:29:21 +02:00
Abdul Malik Ikhsan 7c937fa451
[DeadCode] Skip do { } while() on RemoveUnreachableStatementRector (#601)
* [DeadCode] Skip do { } while() on RemoveUnreachableStatementRector

* eol

* move to const
2021-08-05 17:03:26 +00:00
Tomas Votruba f668ee2279
[NodeRepository] Remove ChildReturnPopulator (#599) 2021-08-05 14:38:06 +02:00
Abdul Malik Ikhsan 738cea7736
[DeadCode] Skip array_map in class extends Exception on RemoveUnusedPrivateMethodRector (#598)
Co-authored-by: GitHub Action <action@github.com>
2021-08-05 14:28:14 +02:00
Tomas Votruba ad15c5f694
[TypeDeclaration] Removing NodeRepository from ParamTypeDeclarationRector (#597)
Co-authored-by: GitHub Action <action@github.com>
2021-08-05 08:22:02 +00:00
Abdul Malik Ikhsan 3eb503653f
[BetterStandardPrinter] Using Expr_ArrowFunction->returnType with print return type double colon right after the bracket (#596) 2021-08-05 07:38:58 +02:00
Abdul Malik Ikhsan e4b356c117
[Defluent] Skip create variable from not PropertyFetch on ReturnFluentChainMethodCallToNormalMethodCallRector (#595) 2021-08-04 18:05:38 +02:00
Tomas Votruba 6d7b885de8
Move php56 build metafiles to https://github.com/rectorphp/rector-php56 (#594) 2021-08-04 14:03:57 +00:00
Tomas Votruba 37b06023b6
[DeadCode] Fix removal of variable-used promoted property (#593) 2021-08-04 15:37:55 +02:00
Abdul Malik Ikhsan 1f538c6871
[Scoper] No need to re-generate preload.php on scoping (#592) 2021-08-04 10:45:17 +02:00
Abdul Malik Ikhsan 9d37638fce
[GHA] Add automate regenerate preload.php weekly PR (#588)
* [GHA] Add automate regenerate preload.php weekly PR

* cs fix after preload

* no need space
2021-08-04 09:28:17 +02:00
Abdul Malik Ikhsan 897e3da3b3
[Defluent] Do not remove return from parameter and property on ReturnNewFluentChainMethodCallToNonFluentRector (#589)
* [Defluent] Do not remove return on ReturnNewFluentChainMethodCallToNonFluentRector

* [Defluent] Do not remove return on ReturnNewFluentChainMethodCallToNonFluentRector

* eol

* eol

* from parameter

* need to check on property as well

* Fixed 🎉

* final touch: clean up
2021-08-04 09:25:40 +02:00
Abdul Malik Ikhsan 529eb40360
[DowngradePhp80] Handle both DowngradeTypedPropertyRector and DowngradeMixedTypeDeclarationRector Name parameter (#591)
* Demonstrate issue with DowngradeMixedTypeDeclarationRector

* Closes #590 Fixes https://github.com/rectorphp/rector/issues/6611

* final touch: better check as already FullyQualified no need convert

* final touch: clean up

Co-authored-by: Brandon Olivares <programmer2188@gmail.com>
2021-08-04 09:23:17 +02:00
Tomas Votruba 0a51a73ad6
[CodeQuality] Remove MoveVariableDeclarationNearReferenceRector for too wide domain, not capable on most of real projects (#587) 2021-08-03 19:55:29 +02:00
Abdul Malik Ikhsan aff0c5d90c
[Scoper] Remove Doctrine\Inflector\Inflector from exclude class (#582) 2021-08-03 19:10:53 +02:00
Abdul Malik Ikhsan c1b12be00d
[Defluent] Skip interface on DefluentReturnMethodCallRector (#584)
Co-authored-by: GitHub Action <action@github.com>
2021-08-03 17:19:26 +02:00
Abdul Malik Ikhsan 0515b036a8
[GHA] Fix Along other packages on prefixed rector (#586) 2021-08-03 13:47:31 +00:00
Brandon Olivares 202b47a593
Upgrade phpstan/phpstan to 0.12.94 (#585) 2021-08-03 20:32:38 +07:00
Abdul Malik Ikhsan ae55eac4c9
[TypeDeclaration] Allow Function_ and ArrowFunction on ReturnTypeFromReturnNewRector (#583) 2021-08-03 13:53:45 +02:00
Abdul Malik Ikhsan 0888a92985
[CodeQuality] Skip class with constructor parameter for ClassConstFetch on CallableThisArraToAnonymousFunctionRector (#581)
Co-authored-by: Zing <zingimmick@outlook.com>
Co-authored-by: GitHub Action <action@github.com>
2021-08-03 12:11:45 +02:00
Tomas Votruba 2e7256bde8
fix native method fetch (#579) 2021-08-02 19:45:35 +00:00
Tomas Votruba 23bf1ca771
static fixes (#578) 2021-08-02 19:24:42 +00:00
Tomas Votruba d936944aed
[TypeDeclaration] Fix param type change in class method (#577) 2021-08-02 19:12:49 +00:00
Tomas Votruba b3480900f3
[CodingStyle] Remove YieldClassMethodToArrayClassMethodRector, rather PHPStorm job (#576)
Co-authored-by: GitHub Action <action@github.com>
2021-08-02 17:39:36 +00:00
Tomas Votruba 00fb10f8a5 fix cs 2021-08-02 17:52:34 +02:00
Tomas Votruba 8c4c7d0ae7 recursion is not needed, as Rector now works till there is something to change 2021-08-02 17:52:30 +02:00
Tomas Votruba 5145487e37 recursion is not needed, as Rector now works till there is something to change 2021-08-02 17:50:38 +02:00
Tomas Votruba 66e21558ba
[PHPOffice] Extract package to standalone project (#575) 2021-08-02 17:47:23 +02:00
Tomas Votruba 89511623cd update docs 2021-08-02 16:54:22 +02:00
Tomas Votruba f515dd655e typos in docs 2021-08-02 16:46:52 +02:00
Abdul Malik Ikhsan e5b00c449c
[VersionBonding] Correctly shows missed rectors that will not run (#574) 2021-08-02 14:33:49 +00:00
Tomas Votruba e3ce320151
[Transform] Remove specific custom Rector without generic usage (#573) 2021-08-02 11:51:51 +00:00
Abdul Malik Ikhsan 4d816080ee
[Config] Set config/, utils/ to rector config paths (#571)
Co-authored-by: GitHub Action <action@github.com>
2021-08-02 11:33:54 +02:00
Abdul Malik Ikhsan 2c71aa6976
[VersionBonding] Update rector warning message for min PHP version project (#572) 2021-08-02 11:30:13 +02:00
Abdul Malik Ikhsan b34ff8ca13
[Defluent] Skip clone uses trait on DefluentReturnMethodCallRector (#558)
* [Defluent] Skip clone uses trait on DefluentReturnMethodCallRector

* debug

* Fixed 🎉

* phpstan

* final touch

* revert return null on parseFileNameToDecoratedNodes()

* phpstan

* phpstan

* phpstan

* phpstan
2021-08-01 18:50:05 +02:00
Abdul Malik Ikhsan 0a30f6f7ee
[FamilyTree] Using AstResolver->resolveClassFromName() on PropertyUsageAnalyzer (#559) 2021-08-01 18:49:27 +02:00