Commit Graph

12585 Commits

Author SHA1 Message Date
Abdul Malik Ikhsan
ba990a2ec7
[Php74] Skip cast (string) on ReflectionType on ChangeReflectionTypeToStringToGetNameRector (#510) 2021-07-25 16:25:08 +02:00
Abdul Malik Ikhsan
cefa0d516b
[Config] Clean up rector.php skip option config (#509) 2021-07-25 13:37:44 +00:00
Tomas Votruba
a5d59dab8b
Remove PropertyAdder, extra layer without value (#507) 2021-07-25 12:29:26 +00:00
Abdul Malik Ikhsan
875156d6d0
[PHPStan] Clean up PHPStan ignore error messages (#508) 2021-07-25 12:10:26 +00:00
Tomas Votruba
34fff11f80
Remove deprecated addConstructorDependencyToClass() from AbstractRector class, use PropertyToAddCollector directly instaed (#506) 2021-07-25 11:31:23 +00:00
Abdul Malik Ikhsan
34c3e8fce9
[TypeDeclaration] Handle (object) cast on CompleteVarDocTypePropertyRector (#503) 2021-07-25 13:30:32 +02:00
Tomas Votruba
dfbd366b74
[Transform] Add MethodCallToMethodCallRector (#505)
Co-authored-by: GitHub Action <action@github.com>
2021-07-25 13:02:20 +02:00
Abdul Malik Ikhsan
93add0f6c9
[TypeDeclaration] Return null when $classLike is null on AllAssignNodePropertyTypeInferer::inferProperty() (#504)
Co-authored-by: GitHub Action <action@github.com>
2021-07-25 12:48:53 +02:00
Tomas Votruba
a4f8a77418 include injected property in deps 2021-07-25 09:41:00 +02:00
Tomas Votruba
4456c4690b extend AutowiredClassMethodAnalyzer with property 2021-07-25 09:33:35 +02:00
Abdul Malik Ikhsan
771a3390b0
[TypeDeclaration] Handle simple class name as string for non-native class (#501)
Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
Co-authored-by: Markus Staab <maggus.staab@googlemail.com>
Co-authored-by: Markus Staab <markus.staab@redaxo.de>
Co-authored-by: GitHub Action <action@github.com>
2021-07-24 13:44:10 +02:00
Tomas Votruba
3d1ec1d85d bump docs 2021-07-23 18:26:12 +02:00
Tomas Votruba
9d51f3c47f
[Naming] Fix imported trait names (#500) 2021-07-23 16:32:29 +02:00
Tomas Votruba
e3a1f9399b
Fix trait check in ClassManipulator (#497) 2021-07-23 12:37:16 +00:00
Abdul Malik Ikhsan
5967ffa267
Fix along other packages gha (#492) 2021-07-23 06:04:44 +00:00
Tomas Votruba
db2e76b99c load stubs in config 2021-07-23 01:26:20 +02:00
Tomas Votruba
34f7170479 misc 2021-07-23 01:14:21 +02:00
Tomas Votruba
c2589622b4 add stubs for nette 2021-07-23 01:05:25 +02:00
Tomas Votruba
2e3b2d172e skip non_DI dir 2021-07-23 01:00:41 +02:00
Tomas Votruba
e8d975e147 add nette/di stubs 2021-07-23 00:54:29 +02:00
Tomas Votruba
e45aaa4385 add composer for downgrade 2021-07-23 00:34:19 +02:00
Tomas Votruba
ee5c692cd8 add Composer stubs for downgrade 2021-07-23 00:21:13 +02:00
Tomas Votruba
ae501a749b bump rector/extension-instlaller 2021-07-23 00:18:48 +02:00
Tomas Votruba
42f40fae08
[PHP 8.1] Add ReadOnlyPropertyRector (#491)
Co-authored-by: GitHub Action <action@github.com>
2021-07-23 00:16:11 +02:00
Tomas Votruba
083d68eb93
[PHP 8.1] Add FinalizePublicClassConstantRector + downgrade alternative (#490)
* bump to nikic/php-parser 4.12

* bump to stable typo3-rector

* [PHP 8.1] Add FinalizePublicClassConstantRector

* [DowngradePhp81] Add DowngradeFinalizePublicClassConstantRector

* ignore Comparator from downgrade in myclabs/enum

* add AccessoryNonEmptyStringTypeMapper

* [ci-review] Rector Rectify

* narrow non-empty string to string type

Co-authored-by: GitHub Action <action@github.com>
2021-07-22 23:34:25 +02:00
Tomas Votruba
2e0c88975e
Add errors even if no diff (#489) 2021-07-22 19:28:42 +00:00
Tomas Votruba
178f3f643c
bump docs (#488) 2021-07-22 20:30:23 +02:00
Abdul Malik Ikhsan
c98696c276
[DeadCode] Skip RemoveUnusedPrivatePropertyRector on property used by Trait in Source (#481)
* [DeadCode] Skip RemoveUnusedPrivatePropertyRector on property used by Trait in Source

* eol

* rename

* getting trait via ReflectionProvider

* getting from AstResolver

* using NodeScopeAndMetadataDecorator

* default nodes to $classLike->stmts

* debug

* get

* Fixed 🎉

* phpstan and cs fix

* static

* clean up

* move locate trait to AstResolver
2021-07-22 17:15:27 +00:00
Dominik Peters
0f9dd92f6c
Fix ClassPropertyAssignToConstructorPromotionRector to skip properties that have attributes (#468)
* Add failing test fixture for ClassPropertyAssignToConstructorPromotionRector

# Failing Test for ClassPropertyAssignToConstructorPromotionRector

Based on https://getrector.org/demo/1ebe95c8-2d22-6d0e-b6ff-7be843d783d4

The ClassPropertyAssignToConstructorPromotionRector should ignore properties that have properties linked to them. Looking at the demo it seems to have gotten rid of both properties, which I did not expect/want it to do

* Update coordinate.php.inc

reverse order of use statement and namespace

* fix: skip properties that have attributes

* copy over attrGroups from  to  to keep them

* added test case for multiple attributes

Co-authored-by: Dominik Peters <d.peters@billiger-mietwagen.de>
2021-07-22 19:07:09 +02:00
Abdul Malik Ikhsan
99e5c8add0
[Stubs] Fix Regression Scoped autoload introduced in 0.11.38 (#484)
* [Stubs] Fix Regression Scoped autoload introduced in 0.11.38

* phpstan

* comment
2021-07-22 19:05:10 +02:00
Abdul Malik Ikhsan
17db511043
[TypeDeclaration] Handle nullable array param type on AddArrayParamDocTypeRector (#485)
* Add failing test fixture for AddArrayParamDocTypeRector

# Failing Test for AddArrayParamDocTypeRector

Based on https://getrector.org/demo/1ebe8b81-128c-6c70-9515-338e645e9149

* is array maybe

* Fix #482

* fixture fail

* Fixed 🎉

* cs

* clean up

* clean up

Co-authored-by: Robin Richtsfeld <robin.richtsfeld@gmail.com>
2021-07-22 18:54:48 +02:00
Abdul Malik Ikhsan
039c173279
[Core] Avoid "Backtrack limit was exhausted" error on BetterStandardPrinter (#487)
* [Core] Avoid "Backtrack limit was exhausted" error on BetterStandardPrinter

* update

* using mU

* allow static modifier

* allow direct static function

* function can be final too

* fix

* fix
2021-07-22 18:53:08 +02:00
Abdul Malik Ikhsan
1747d9899a
[DeadCode] Skip next used as variable variable on RemoveUnusedVariableAssignRector (#486)
* [DeadCode] Skip next used as variable variable on RemoveUnusedVariableAssignRector

* [ci-review] Rector Rectify

* clean up

* clean up

Co-authored-by: GitHub Action <action@github.com>
2021-07-22 16:39:31 +02:00
Tomas Votruba
bba606c609
Fix alias object imports (#480) 2021-07-21 14:13:06 +00:00
Abdul Malik Ikhsan
dc10595b7c
[Privatization] Handle empty construct change property to local variable on ChangeLocalPropertyToVariableRector (#479)
* fixing 6559

* Fixed 🎉

* different name  to show it only change the property fetch

* Fixed 🎉

* fixture name

* skip no typed property never changing, means it is null

* eol

* phpstan

* skip never assigned, means null

* skip never assigned, means null
2021-07-21 13:42:20 +00:00
Tomas Votruba
24a32dfefb
Fix docs double import (#478) 2021-07-21 15:37:24 +02:00
Tomas Votruba
242fa16610 avoid using deprecated method directly 2021-07-21 11:27:17 +02:00
Tomas Votruba
bc9d2d48d5
[DX] Add MissedRectorDueVersionChecker (#465) 2021-07-21 11:26:10 +02:00
NotionCommotion
bc29f1bb50
Update how_to_add_test_for_rector_rule.md (#473)
Described how tests must use the development repo.
2021-07-21 11:04:08 +02:00
Abdul Malik Ikhsan
1478d8eb78
[Core] Comment @todo tweak FileProcessor::parseFileInfoToLocalCache() (#477) 2021-07-21 10:50:55 +02:00
NotionCommotion
820cb16122
Update README.md (#472)
Added note regarding minimum PHP version in composer.json.
2021-07-21 10:48:06 +02:00
Abdul Malik Ikhsan
031d14f6e4
[Core] Ensure no infinite loop in PhpFileProcessor (#476) 2021-07-21 08:43:15 +00:00
Abdul Malik Ikhsan
83419c4376
[CodeQuality] Handle both ExplicitBoolCompareRector + CountArrayToEmptyArrayComparisonRector usage (#474) 2021-07-21 10:39:13 +02:00
Abdul Malik Ikhsan
692e9e3db4
Rector 7.0 Native init steps (#475) 2021-07-21 10:29:55 +02:00
Tomas Votruba
9953c4f59c fix cs 2021-07-20 22:48:58 +02:00
Abdul Malik Ikhsan
7427f6df2a
[DowngradePhp80] Allow FuncCall on DowngradeNamedArgumentRector (#466)
Co-authored-by: GitHub Action <action@github.com>
2021-07-20 22:48:41 +02:00
Tomas Votruba
0fe1656da6
[DeadCode] Fix RemoveUnusedPromotedPropertyRector for private trait-used promoted param (#470)
Co-authored-by: annuh <annevandevenis@gmail.com>
2021-07-20 20:45:59 +00:00
Abdul Malik Ikhsan
48ccb539d4
[DeadCode] Handle null start token position attribute in NodeByTypeAndPositionCollector (#469) 2021-07-20 21:13:11 +07:00
Tomas Votruba
269a76303d
skip Windows-broken rules (#463) 2021-07-19 23:02:22 +02:00
Tomas Votruba
0d3e54357f
extract VendorLocationDetector (#462) 2021-07-19 22:46:06 +02:00