Commit Graph

4058 Commits

Author SHA1 Message Date
Tomas Votruba
c83ac3683e
Decouple specific rules from NonPhpFileProcessor to NonPhpRectorInterface contract (#6285) 2021-05-02 11:50:34 +00:00
Tomas Votruba
2037d55d6b
[PHP 8.1] Add ReturnNeverTypeRector (#6283) 2021-05-02 10:46:55 +00:00
Tomas Votruba
f925b62d9b
Report add array doc nodes (#6274) 2021-05-01 10:59:25 +00:00
Abdul Malik Ikhsan
5b386ab5fe
[CodeQuality] Register NarrowUnionTypeDocRector to code-quality config set (#6269) 2021-04-30 12:35:34 +02:00
Abdul Malik Ikhsan
e6157560c1
[CodeQuality] Add NarrowUnionTypeDocRector (#6262)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-30 10:28:36 +02:00
Tomas Votruba
52c4888374
[Downgrade 7.2] Fix DowngradeStreamIsattyRector with return (#6266) 2021-04-29 13:58:00 +00:00
Maxim Tugaev
cfa8295e95
AnnotationToAttributeRector: array handling (#6259) 2021-04-28 15:04:23 +02:00
Abdul Malik Ikhsan
3153a088a3
[Privatization] Handle Reference Method/Static Call from outside file on ChangeReadOnlyPropertyWithDefaultValueToConstantRector (#6256)
* Add failing test fixture for ChangeReadOnlyPropertyWithDefaultValueToConstantRector

* Closes #6214

* phpstan

* CS fix

* phpstan

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* fix ReturnThisRemoveRector on check "vendor" dir

* phpstan

* phpstan

* [ci-review] Rector Rectify

* phpstan

* [ci-review] Rector Rectify

* php 7.3

* phpstan

* use isBuiltIn() check

* [ci-review] Rector Rectify

* move Functionality to FunctionLikeReflectionParser

* return false on ClassMethod not found

* phpstan

* [ci-review] Rector Rectify

Co-authored-by: zingimmick <zingimmick@outlook.com>
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-28 13:03:41 +00:00
Tomas Votruba
e83b7f2538
[PHPStan] Resolve dependency juggling (#6258) 2021-04-28 09:33:25 +00:00
Tomas Votruba
cf9d8c202d
Failing test: Node type is not updated after executing rector (#6255)
Co-authored-by: Michal Lulco <lulco@efabrica.sk>
2021-04-28 00:11:40 +00:00
Maxim Tugaev
a5a99317b7
AnnotationToAttributeRector: ensure bool param in attribute (#6254) 2021-04-27 11:41:29 +00:00
Tomas Votruba
5cda5de4ac
Decouple Rector PHPStan rules to own package (#6242) 2021-04-25 23:12:14 +00:00
Tomas Votruba
414a656ab9
Fix AUTOLOAD_PATHS and BOOTSTRAP_FILES in tests (#6239) 2021-04-25 09:23:15 +00:00
Tomas Votruba
f9dc93cb1a
Fix WrapEncapsedVariableInCurlyBracesRector reporting (#6220)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-23 19:32:59 +00:00
TomasVotruba
d5efa10ed0 remove extras space between diff and list rules 2021-04-23 00:25:03 +02:00
Tomas Votruba
159acc8512
remove notifyFileChange() (#6206) 2021-04-22 23:51:32 +02:00
Tomas Votruba
1d0ba2a439
Add AbstractTestCase (#6205) 2021-04-22 21:36:50 +00:00
Tomas Votruba
45db3289b9
Fix type (#6200) 2021-04-22 11:58:54 +00:00
Tomas Votruba
94df140c4d
[Downgrade] Report changed widening in another class (#6193)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-22 11:29:04 +00:00
Tomas Votruba
ff57c49662
[PHP 7.2] Add covariant param support for trait methods (#6190)
* [Downgrade PHP 7.2] Handle trait methods too

* move DowngradeParameterTypeWideningRector to Class_ namespace

* [ci-review] Rector Rectify

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-22 00:02:38 +02:00
Tomas Votruba
eda5bf1ea3
[DeadCode] Add RemoveUnusedPrivateMethodParameterRector (#6168)
* [DeadCode] Add RemoveUnusedPrivateMethodParameterRector

This reverts commit c815334bed.

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-19 15:19:14 +02:00
Abdul Malik Ikhsan
fa6fc49c59
[NodeAnalyzer] Use ClassAnalyzer for anonymous class check (#6162)
* use ClassAnalyzer in ParsedNodeCollector

* use ClassAnalyzer in BetterNodeFinder

* use Pin ParentClassToTraitsRector

* use in ChangeSingletonToServiceRector

* use in ValueObjectClassAnalyzer

* use in PropertyAddingPostRector

* use in fixture

* use isAnonymous() in ClassAnalyzer
2021-04-18 15:01:22 +02:00
TomasVotruba
d3295a7d1e fix incorrect varialbe name 2021-04-15 23:07:07 +02:00
TomasVotruba
8976681b20 remove StaticNodeInstanceOf 2021-04-15 22:45:10 +02:00
Tomas Votruba
b8071fb7bc
Make use of inline parser over extreme node construction (#6145)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-15 17:34:49 +00:00
Tomas Votruba
0aa4e9dcad
Extract ErrorFactory (#6132)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-14 12:01:03 +00:00
Tomas Votruba
9c147eb846
make use of file rector errors (#6131) 2021-04-14 04:35:28 +02:00
Tomas Votruba
1e24618a9e
File reports (#6130) 2021-04-14 02:15:10 +00:00
Tomas Votruba
b03fa60c52
Fix empty docblocks (#6128)
* working prototype for nested arrays

* add data provider
2021-04-13 20:58:34 +02:00
Tomas Votruba
5bde10c181
Various doc parser fixes (#6125) 2021-04-13 18:51:41 +00:00
Tomas Votruba
8b402bfe02
Make use of File object instead of passing around provider of file info, tokens, stmts etc. (#6110)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-13 00:12:48 +00:00
Tomas Votruba
b0dc20a462
make ComposerFileProcessor run on non-root paths of composer.json (#6111) 2021-04-12 20:47:56 +00:00
Tomas Votruba
ad36b21383
Shorten output rule (#6114) 2021-04-12 21:16:36 +02:00
Tomas Votruba
37d5978025
Standardize added file testing + remove doTestExtraFile() from AbstractRectorTestCase (#6113) 2021-04-12 19:00:57 +00:00
Tomas Votruba
ad7af917e2
Improve assert added and moved nodes (#6106) 2021-04-12 13:24:37 +00:00
Tomas Votruba
06f85e4a68
Refactor file processors towards universal collector (#6085)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-12 10:34:04 +00:00
Tomas Votruba
1e4a0745a1
Remove removed nodes (#6099)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-11 11:14:46 +00:00
Tomas Votruba
809d617708
Refactor OptionalParametersAfterRequiredRector to remove dependency from NodeRepository (#6098) 2021-04-11 10:27:20 +00:00
Tomas Votruba
b121d8e10a
Remove mapToDocString() and use describe() instead (#6095) 2021-04-10 23:28:08 +00:00
Tomas Votruba
8b62025ce0
Cleanup composer update run (#6094)
* cleanup compoesr update run

* rename provideConfigFile() to provideConfigFilePath()

* merge AbstractComposerRectorTestCase to AbstractRectorTestCase

* rename ComposerProcessorNonPhp to ComposerFileProcessor
2021-04-10 22:12:50 +02:00
Tomas Votruba
417e819e40
cleanup (#6093) 2021-04-10 19:29:43 +00:00
Tomas Votruba
26a5b86892
[Privatization] Remove MakeUnusedClassesWithChildrenAbstractRector as risky and full context is needed (#6091) 2021-04-10 20:18:49 +02:00
Tomas Votruba
f82a8dc995
Refactor AnnotationExtractor fomr FileDiff value object to standalone RectorsChangelogResolver service (#6088) 2021-04-10 16:22:25 +00:00
Abdul Malik Ikhsan
4587a7adcb
[Privatization] Skip ChangeReadOnlyPropertyWithDefaultValueToConstantRector on StaticCall by Ref Param (#6084)
Co-authored-by: Zing <zingimmick@outlook.com>
2021-04-10 18:09:57 +02:00
TomasVotruba
00a3e43117 fix string match return type 2021-04-10 17:29:36 +02:00
Tomas Votruba
9517556487
remove findClassMethodByTypeAndMethod() (#6086)
* remove findClassMethodByTypeAndMethod()

* [ci-review] Rector Rectify

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-10 17:23:00 +02:00
Sebastian Schreiber
2b671a27d5
[FEATURE] Output changelog url in OutputFormatterInterface (#6073) 2021-04-10 16:54:24 +02:00
Tomas Votruba
8472eadff4
Misc file processor improvements (#6080) 2021-04-10 14:01:36 +00:00
Tomas Votruba
9e6e3f7a92
Simplify set provider (#6077)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-10 11:38:25 +00:00
Abdul Malik Ikhsan
4d78e28f25
[NodeTypeResolver] Fixes #6065 Use existing NodeTypeResolver object on Auto Imports short name (#6069) 2021-04-09 23:00:57 +02:00