Abdul Malik Ikhsan
9679ed6d77
[DeadCode] Skip using coealesce assign operator on return on RemoveUnusedPrivatePropertyRector ( #2476 )
...
Co-authored-by: GitHub Action <action@github.com>
2022-06-11 14:14:26 +02:00
Abdul Malik Ikhsan
a5340c6f06
[Renaming] Do not rename docblock same name not found in use inside namespace ( #2471 )
...
* Another failing test for #7209
* Closes #2468
* rename fixture
* fix
* Fix
* Fix
* fix
* fxi
* final touch: clean up
* final touch: clean up
* re-trigger CI
Co-authored-by: Einar Gangsø <mail@einargangso.no>
2022-06-11 13:54:13 +02:00
Tomas Votruba
797cb38b88
Clean PHPStan errors ( #2475 )
2022-06-10 14:43:16 +00:00
Tomas Votruba
e7ec08fe91
[phpdoc-parser] Add new TokenIterator to preload, to fix removed endline bug ( #2466 )
2022-06-09 14:46:58 +02:00
Abdul Malik Ikhsan
cb1473a3ac
[Renaming] Do not rename class with same name inside different namespace on RenameClassRector ( #2455 )
...
* Another failing test for #7209
* fixture
* fixture
* Closes #2452
* try
* try
* back
* Fixed 🎉
* final touch: add example used in union
Co-authored-by: Einar Gangsø <mail@einargangso.no>
2022-06-09 09:32:19 +02:00
Abdul Malik Ikhsan
ff931e4b74
[CodingStyle] Skip non-empty-string on VarConstantCommentRector ( #2451 )
2022-06-09 08:09:34 +02:00
Abdul Malik Ikhsan
1a84313089
[Renaming] Skip rename docblock on conflict with alias on RenameClassRector ( #2450 )
...
* Another failing test for #7209
* fixture
* Closes #2448
* [ci-review] Rector Rectify
* clean up
* final touch: clean up
* final touch: clean up
Co-authored-by: Einar Gangsø <mail@einargangso.no>
Co-authored-by: GitHub Action <action@github.com>
2022-06-07 14:47:02 +02:00
Tomas Votruba
38a9718b52
[CS] Fix dynamic and broken indent detection, allow to configure spacing via RectorConfig::indent() method ( #2442 )
2022-06-06 11:51:58 +02:00
Dominik Ritter
df5bd5fb79
[DX] Make ClassAnnotationMatcher differentiate between known and unknown classes ( #2319 )
...
Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
2022-06-06 10:32:34 +02:00
Abdul Malik Ikhsan
40d9102eab
[Renaming] Do not Rename Docblock inner Namespace on RenameClassRector ( #2441 )
...
* Add failing test for rector/rector#7209
* update fixture
* Closes #2440
* fixture
Co-authored-by: Einar Gangsø <mail@einargangso.no>
2022-06-06 07:53:42 +02:00
Abdul Malik Ikhsan
8b4df18bde
[Renaming] Keep comment on RenameClassRector ( #2439 )
...
* [Renaming] Keep comment on RenameClassRector
* Fixed 🎉
* Fixed 🎉
2022-06-05 08:49:06 +02:00
Tomas Votruba
63cd74893d
[DeadCode] Improve RemoveJustPropertyFetchRector and apply ( #2435 )
2022-06-04 18:02:21 +00:00
Tomas Votruba
b0a6173550
[DeadCode] Add RemoveJustPropertyFetchRector ( #2433 )
2022-06-04 17:31:24 +00:00
Tomas Votruba
183493eab8
[DeadCode] Fix RemoveUnusedPrivatePropertyRector with left part of array dim fetch ( #2428 )
...
* add fixture with private array dim fetch property
* fix RemoveUnusedPrivatePropertyRector with left part of array dim fetch
* [ci-review] Rector Rectify
Co-authored-by: GitHub Action <action@github.com>
2022-06-04 11:33:15 +02:00
Tomas Votruba
6b9984175f
[Naming] Fix PseudoNamespaceToNamespaceRector reporting on change ( #2426 )
...
* fix PseudoNamespaceToNamespaceRector reporting on change
* remove overly abstraction with visitor factories
* [ci-review] Rector Rectify
Co-authored-by: GitHub Action <action@github.com>
2022-06-04 08:09:40 +00:00
Tomas Votruba
c3581f9d33
Skip used in new ctor ( #2425 )
2022-06-04 07:37:23 +00:00
Abdul Malik Ikhsan
283a9af3f0
[Renaming] Skip docblock rename different namespace on RenameClassRector ( #2419 )
...
* [Renaming] Skip docblock rename different namespace on RenameClassRector
* debug
* [ci-review] Rector Rectify
* debug
* [ci-review] Rector Rectify
* \ between namespace and name
* up
* debug
* debug
* check no namespace
* up
* Fixed 🎉
* final touch: add GroupUse_ support
* final touch: add GroupUse_ support
* final touch: clean up
* really final touch: clean up
* final touch: ensure no subnamespace check as check against getLast()
* final touch: remove unnneeded string cast
Co-authored-by: GitHub Action <action@github.com>
2022-06-04 09:31:58 +02:00
Abdul Malik Ikhsan
e8f058a6e4
[e2e] Add e2e for parallel process with current directory contains space ( #2421 )
...
* [e2e] Add e2e for parallel process with current directory contains space
* [e2e] Add e2e for parallel process with current directory contains space
* dir name
* Fixed 🎉
* phpstan
* final touch: eol
* clean up
* clean up
* final touch: use escapeshellarg()
* Add note for why escapeshellarg() is needed in parallel
2022-06-03 22:41:31 +02:00
Tomas Votruba
a73dafd30a
[PHP 8.0] Add method param to ConstantListClassToEnumRector ( #2415 )
...
* add skipped fixtures
* skip non-scalar types
* prepare parameter update
* add ConstExprClassNameDecorator, add PhpDocNodeDecoratorInterface
2022-06-02 10:58:19 +02:00
Tomas Votruba
ba0869a9a5
use directly ParamTagValueNode ( #2412 )
2022-06-02 09:19:57 +02:00
Tomas Votruba
6ada6d67a5
[PHP 8.0] Fix double annotation change on annotation to attribute ( #2403 )
2022-05-31 23:38:46 +02:00
Abdul Malik Ikhsan
b48271e18f
[DowngradePhp82] Add DowngradeReadonlyClassRector to downgrade readonly class ( #2322 )
...
* [DowngradePhp82] Add DowngradeReadonlyClassRector to downgrade final readonly class
* apply readonly property promotion
* fixture
* phpstan
* [ci-review] Rector Rectify
* add DowngradeLevelSetList::DOWN_TO_PHP_81
* add test to ensure no flip-flop between add and removing readonly when downgrade to php 8.0
* more test
* more test
* combination test
* final touch: typo fix
* not property promotion
* static properties cannot be readonly
* static properties cannot be readonly
* note
* note
* note
* test
Co-authored-by: GitHub Action <action@github.com>
2022-05-31 23:20:12 +02:00
Tomas Votruba
f01725a084
Use php-parser to work with literal _ number separator ( #2321 )
...
Co-authored-by: GitHub Action <action@github.com>
2022-05-31 21:09:06 +00:00
Tomas Votruba
73055d87fb
[Attribute] Fix UseAliasNameMatcher for the last part of use import rename ( #2402 )
...
Co-authored-by: GitHub Action <action@github.com>
2022-05-31 17:40:56 +02:00
Tomas Votruba
02803bf7d5
[Attributes] Add UseAliasNameMatcherTest ( #2401 )
2022-05-31 14:40:51 +00:00
Tomas Votruba
db57fbaae4
Remove myclabs/php-enum dependency ( #2388 )
...
* next
* use TypeKind in PHPStan enum type check
* turn ObjectReference into constant enumlike
* prefer selt/this to constant enum
2022-05-29 22:33:23 +00:00
Abdul Malik Ikhsan
f4237155a2
[DowngradePhp81] Handle crash parent Arg is missing scope on DowngradeFirstClassCallableSyntaxRector ( #2386 )
...
* [DowngradePhp81] Handle crash parent Arg is missing scope on DowngradeFirstClassCallableSyntaxRector
* Fixed 🎉
* clean up
* fixture name
2022-05-29 18:06:08 +02:00
Tomas Votruba
012e9ad553
Add annotation to attribute core rename in AnnotationToAttributeRector ( #2384 )
...
* fix fixture name
* [PHP 8.0] Add test case for partial import annotation to attribute rename
2022-05-28 02:19:51 +02:00
Tomas Votruba
37df55a2fd
[DX] Remove non-PHP file formatting based on editorconfig, rather let external coding standard tools handle the file format ( #2378 )
2022-05-27 18:40:49 +02:00
Tomas Votruba
2c46d4fc4d
[DX] Drop YamlFileFormatter as Rector does not process YAML ( #2376 )
2022-05-27 17:33:40 +02:00
Tomas Votruba
a7e6b685e9
[DX] Remove XmlFileFormatter, as Rector does not handle it ( #2375 )
2022-05-27 15:26:22 +00:00
Tomas Votruba
a9dd89b1cc
[DX] Remove CommandNaming magic, check rector class exists in RectorConfig ( #2372 )
2022-05-27 16:58:29 +02:00
Tomas Votruba
45eef47f27
[DX] Various config merge, improve RectorConfig methods ( #2371 )
2022-05-27 15:30:05 +02:00
Tomas Votruba
7adde5807c
[DX] Move configure to direct call in RectorConfig ( #2367 )
2022-05-27 10:52:46 +00:00
Abdul Malik Ikhsan
bfff1df4dd
[PhpDocInfo] Fixes Partial value update got duplicated on DoctrineAnnotationTagValueNode change ( #1862 )
...
* [PhpDocInfo] Fixing Partial value update got duplicated on PhpDocInfo change
* Fixed 🎉
* Fixed 🎉
* clean up
* Fixed 🎉
* [ci-review] Rector Rectify
* rollback mirror check
* check end equals to length identifier and silent value
* check SpacelessPhpDocTagNode
* tweak
* more fixtures
* back
* [ci-review] Rector Rectify
* [ci-review] Rector Rectify
* back
* back
* debug reprint
* back
* fix ?
* try
* try
* [ci-review] Rector Rectify
* [ci-review] Rector Rectify
* add failing fixture
* debug
* another approach
Co-authored-by: GitHub Action <action@github.com>
2022-05-27 17:41:18 +07:00
Abdul Malik Ikhsan
3da22b0231
[Php81] Skip ArrayDimFetch from ArrayObject in Assign var on ReadOnlyPropertyRector ( #2363 )
...
* [Php81] Skip ArrayDimFetch from ArrayObject in Assign var on ReadOnlyPropertyRector
* Fixed 🎉
* eol
2022-05-26 09:13:59 +02:00
Tomas Votruba
66dbb1e307
Allow to rename method if in interface ( #2362 )
...
* add test fixture
* allow rename method in interface
2022-05-25 21:35:18 +00:00
Abdul Malik Ikhsan
9c6b3d708c
[TypeDeclaration] Skip curly {@inheritdoc} on AddArrayReturnDocTypeRector ( #2359 )
2022-05-25 09:26:56 +02:00
Abdul Malik Ikhsan
8efa7151e6
[FamilyTree] Use parent->hasNativeMethod() on ClassChildAnalyzer->resolveParentClassMethods() ( #2357 )
2022-05-24 22:49:28 +02:00
Abdul Malik Ikhsan
3fe07aa6a1
[Experiment][Naming] Keep GroupUse Stmt on UseImportsResolver::resolveForNode() ( #2349 )
...
Co-authored-by: GitHub Action <action@github.com>
2022-05-22 22:57:59 +02:00
Ruud Kamphuis
a59e9cece6
Fix return type of FileInfoParser::parseFileInfoToNodesAndDecorate ( #2344 )
...
It returns `PhpParser\Node\Stmt[]` instead of `PhpParser\Node[]`.
2022-05-22 14:17:58 +07:00
Tomas Votruba
08a35afeb1
remove symfony routes json paramter as unused
2022-05-22 09:12:04 +02:00
Tomas Votruba
b4120a8850
[DX] Use direct method on node, instead of token position ( #2340 )
2022-05-21 08:43:58 +00:00
Tomas Votruba
fcadc67328
add symfony php config option to allow loading route factory ( #2339 )
2022-05-21 08:42:08 +00:00
Abdul Malik Ikhsan
36fd8fa619
[NodeTypeResolver] Remove DummyTraitClass check as the class no longer exists ( #2338 )
2022-05-20 19:59:01 +02:00
Malte Schlüter
4d31934258
Add new rule to add annotations from router configuration to symfony controllers ( #2306 )
2022-05-13 12:08:27 +02:00
Tomas Votruba
1ec5e2d35b
restore links
2022-05-12 21:13:03 +02:00
Tomas Votruba
47bea33c2e
use changelog annotations to display useful into under the change
2022-05-12 21:07:36 +02:00
Abdul Malik Ikhsan
78aaf7ee0b
[Php82] Add ReadOnlyClassRector ( #2296 )
...
* [Php82] Add ReadOnlyClassRector
* skip has non-readonly property
* note
* note
* note
* [ci-review] Rector Rectify
* skip has AllowDynamicProperties attribute
* skip already readonly
* [ci-review] Rector Rectify
* skip property promotion not readonly
* no params means no property promotion, skip if no property defined
* note
* note
* skip final class, possibly extendable
* add fixture
* add @see
* visibility union ndoe rules/Privatization/NodeManipulator/VisibilityManipulator.php
* visibility union ndoe rules/Privatization/NodeManipulator/VisibilityManipulator.php
* remove already readonly fixture
* comment
* skip anonymous class fixture
* skip non-final class fixture
* skip allow dynamic fixture
* class check
* skip has writable property fixture
* skip no properties
* skip property promotion writable
* debug
* [ci-review] Rector Rectify
* fix
* eol
* fix
* [ci-review] Rector Rectify
* final touch: add up-to-php82 level setlist
Co-authored-by: GitHub Action <action@github.com>
2022-05-12 22:44:59 +07:00
Tomas Votruba
3bae3b9e75
[Downgrade] Separate multi level dependency in DowngradeArraySpreadRector ( #2298 )
2022-05-12 08:50:48 +00:00