Commit Graph

14463 Commits

Author SHA1 Message Date
Tomas Votruba
1c64bb1fb0 [CI] shorten waiting times for packagist and deploy to speed-up process 2022-06-06 11:35:54 +02:00
Abdul Malik Ikhsan
3ae5f0c834
[Renaming] Handle crash on FuncCall with Arg class name conflict with use statement or namespace on RenameClassRector with auto import enabled (#2431)
* [Renaming] Handle conflict with use statement last name and namespace last name on RenameClassRector

* more fixture

* eol

* [ci-review] Rector Rectify

* Fixed 🎉

* final touch: more fixtures

* final touch: use negation of PHPStan\BetterReflection\Reflection\ReflectionClass

* final touch: clean up

* add fixture for in method call arg

* fix by verify start line < 0

* verify start coumn as well

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* twig CI error

* back

* try with located source check

* use equal to PHPStan\BetterReflection\Reflection\ReflectionFunction

* [ci-review] Rector Rectify

* completely remove RenamedClassesSourceLocator

* Revert completely remove RenamedClassesSourceLocator

This reverts commit 097753b1e742345bb3d3f460aa5719b2f4aa0a19.

* resolved with identifier->isClass()

* final touch: add more test for static call and const fetch

Co-authored-by: GitHub Action <action@github.com>
2022-06-06 10:34:51 +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
Tomas Votruba
b1583c7d86 skip files missing in build rector-src package 2022-06-05 09:16:27 +02:00
Tomas Votruba
bab5ad9f04 improve preload autload paths 2022-06-05 09:04:08 +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
dbb54b83cc
[automated] Re-Generate Nodes/Rectors Documentation (#2438)
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
2022-06-05 00:32:04 +00: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
70261b71b7
[DeadCode] Fix known array type in empty if foreach (#2432) 2022-06-04 13:12:01 +00:00
Tomas Votruba
83f7e9f3ab
[DX] Remove too detailed --type in init command, use fw documentation instead (#2430) 2022-06-04 13:46:21 +02:00
Abdul Malik Ikhsan
506c282f54
[Scoped] Exclude symfony/contracts/HttpClient/Test/HttpClientTestCase.php from parallel-lint check (#2429)
* [Scoped] Exclude symfony/contracts/HttpClient/Test/HttpClientTestCase.php from parallel-lint check

* update script as well

* exclude check the Test directory itself
2022-06-04 12:38:45 +02:00
Abdul Malik Ikhsan
0d1932fec7
[Scoped] Update to symfony 6.1.* and symfony/contracts 3.1.* (#2418)
* update to symfony 6.1

* add parallel lint check

* fix

* fix

* ensure clear cache
2022-06-04 12:09:27 +02: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
36fe5d5d05
[DeadCode] fix RemoveJustPropertyFetchForAssignRector for nested array dim fetch (#2427)
* add test fixture to double nested array dim fetch

* fixup! add test fixture to double nested array dim fetch

* [DeadCode] fix RemoveJustPropertyFetchForAssignRector for nested array dim fetch
2022-06-04 09:15:02 +00:00
Tomas Votruba
f5e34f0393 skip team members from changelog, to give more credit to external contibutors 2022-06-04 10:19:54 +02:00
Tomas Votruba
eedfd1155d remove phpstan enum package, as no longer used 2022-06-04 10:13:07 +02:00
Tomas Votruba
c8814f5422 bump phpunit phpstan package 2022-06-04 10:12:27 +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
Abdul Malik Ikhsan
d2bf080d6b
Update PHPStan to ^1.7.10 (#2424) 2022-06-03 22:40:10 +02:00
Tomas Votruba
c5f35e4a1d
[DeadCode] Add RemoveJustPropertyFetchForAssignRector (#2423) 2022-06-03 10:05:24 +00:00
Tomas Votruba
0df2351b89
[PHP 8.0] Add property support to ConstantListClassToEnumRector (#2422)
* add property enum support

* fixup! add property enum support
2022-06-03 09:56:38 +02:00
Tomas Votruba
7722a57d80
[PHP 8.0] Add return type support to ConstantListClassToEnumRector (#2420)
* add return type support

* lock to last stable phpstan

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: GitHub Action <action@github.com>
2022-06-03 09:15:40 +02:00
Tomas Votruba
e368dabaed
[Downgrade] Add class method param to DowngradeEnumToConstantListClassRector (#2417)
* add param enum downgrade

* [ci-review] Rector Rectify

Co-authored-by: GitHub Action <action@github.com>
2022-06-02 15:08:06 +02:00
Tomas Votruba
340f5b999c
[DowngradePhp80] Add DowngradeEnumToConstantListClassRector (#2416) 2022-06-02 13:56:11 +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
Abdul Malik Ikhsan
d3a921010a
[Php74] Skip nullable mixed on Php 8.0 feature enabled on TypedPropertyRector (#2414) 2022-06-02 09:18:53 +02:00
Abdul Malik Ikhsan
9187ff0430
[Scoped] Update full_build.sh to reflect the current Github workflow for build scoped (#2413)
* [Scoped] Update full_build.sh to reflect the current Github workflow for build scoped

* final touch: move usage comment early

* final touch: back to get dev-dependencies after script done
2022-06-02 09:18:09 +02:00
Abdul Malik Ikhsan
ca6dfe2e1c
[Php80] Mirror additional docblock on importNames() on ClassPropertyAssignToConstructorPromotionRector (#2410)
* [Php80] Mirror additional docblock on importNames() on ClassPropertyAssignToConstructorPromotionRector

* update docblock var to param

* add test for non auto import as well

* Fixed 🎉
2022-06-01 18:30:52 +02:00
Tomas Votruba
e6ebae365b
[PHP 8.0] Add ConstantListClassToEnumRector (#2404)
* [PHP 8.0] Add ConstantListClassToEnumRector

* [ci-review] Rector Rectify

Co-authored-by: GitHub Action <action@github.com>
2022-06-01 15:16:02 +02:00
Tomas Votruba
8eac546e11 use generic patch for RectorConfig 2022-06-01 15:12:57 +02:00
Tomas Votruba
59445debbe remove php-cs-fixer as implicit ECS dependency 2022-06-01 14:58:30 +02:00
Tomas Votruba
07b9a3077c disable dependabot, as mostly breaking with no help; handle upgrades manually 2022-06-01 14:57:21 +02:00
Tomas Votruba
0693c4f46f return intl and mbstring polyfills 2022-06-01 14:54:00 +02:00
Tomas Votruba
424697fdc4 add extensions to rector phpstan types 2022-06-01 10:01:33 +02:00
Tomas Votruba
06b0b325da remove victor, it handles only metafiles, not unused classes 2022-06-01 09:33:22 +02:00
Tomas Votruba
0bdcce2750 try victor-cleaner 2022-06-01 09:30:24 +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
9b7ef717dd [scoped] Keep tracy logger as needed in dump() 2022-05-31 15:03:09 +02:00
Abdul Malik Ikhsan
49b5ef525f
[TypeDeclaration] Ensure return $node only when changed on AddReturnTypeDeclarationRector (#2400) 2022-05-31 14:38:29 +02:00
Abdul Malik Ikhsan
5640d513d2
[Core] Fix bootstrap stubs load on PHP 7.2 when vendor/ excluded via skip() (#2394)
* [Core] Fix bootstrap stubs load on PHP 7.2 when vendor/ excluded via skip()

* [ci-review] Rector Rectify

* final touch: call ->getRealPath() to ensure got real path value

* really final touch: PHPStan

* [ci-review] Rector Rectify

* Add e2e test for rector/rector under php 7.2

* final touch: remove unneeded comment

* really final touch: eol

Co-authored-by: GitHub Action <action@github.com>
2022-05-31 14:38:05 +02:00