4047 Commits

Author SHA1 Message Date
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 c815334bed781c555f08dff82ce7861d758e9e7a.

* [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
Tomas Votruba
9be459dd76
Workaround invalid tag value node on add return array (#6068)
* Skip invalid return tag

* skip @var and @param invalid tags too

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-09 19:36:06 +02:00
Sebastian Schreiber
4296d35903
[FEATURE] Use generic processor interface for non php files (#6060) 2021-04-09 18:44:00 +02:00
Tomas Votruba
8e8446a909
remove METHOD_NAME attribute to promote single source of node (#6063) 2021-04-09 12:45:07 +02:00
Tomas Votruba
d9b70b6354
fix ConfigFileAwareInterface in src code (#6058) 2021-04-08 15:54:31 +02:00
Tomas Votruba
cb60705d78
Restore parent relations on new nodes (#6057) 2021-04-08 12:44:26 +00:00
Tomas Votruba
b75db9403d
[Composer] Open AbstractComposerRectorTestCase (#6055) 2021-04-08 12:30:43 +02:00
Tomas Votruba
32a7122444
remove unneeded TagValueNodeConfiguration (#6050) 2021-04-07 14:09:15 +00:00
TomasVotruba
126da19c86 deprecated tag value node configuration 2021-04-07 14:04:07 +02:00
Abdul Malik Ikhsan
0a9c6a8400
[CodeQuality] Register SimplifyIfNullableReturnRector to code-quality config set (#6047)
* [CodeQuality] Register SimplifyIfNullableReturnRector to code-quality config set

* handle next expression

* handle next expression

* handle next expression

* naming

* phpstan

* fixture fix

* fix

* check next early

* mirror comment not @var

* phpstan

* phpstan

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* phpstan

* more fixture for mirror comment without @var

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-07 00:00:14 +02:00
Tomas Votruba
b03536c0f5
Improve token iterator usage (#6046)
* use token iterator

* add spaceless tag

* [ci-review] Rector Rectify

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-06 20:36:50 +02:00
Tomas Votruba
31566dc869
Traverse phpdoc with use of PhpDocNodeVisitor (#6045)
* make use of new simple-php-doc-parser

* add ParamPhpDocNodeVisitor

* remove uneeded contracts

* skip bool instanceof

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-06 19:33:09 +02:00