Commit Graph

1386 Commits

Author SHA1 Message Date
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
f5a06553ce
[CodeQuality] Add InlineIsAInstanceOfRector (#2364) 2022-05-27 00:01:06 +02:00
Abdul Malik Ikhsan
f0a1b688f3
[DowngradePhp80] Apply PHPStan 1.7.x-dev compatible for PhpParameterReflection (#2336) 2022-05-20 12:16:54 +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
9163864800
Remove DowngradeGeneratedScalarTypesRector as way hacky to particular string solution, better use patching (#2289) 2022-05-11 16:21:59 +00:00
Tomas Votruba
0052951dd0
Bump Symplify and PHPStan rules version (#2218)
Co-authored-by: GitHub Action <action@github.com>
2022-05-03 14:53:25 +00:00
Abdul Malik Ikhsan
039181ac6c
[DeadCode] Remove RemoveCodeAfterReturnRector, already handled at RemoveUnreachableStatementRector (#2199)
* [DeadCode] Remove RemoveCodeAfterReturnRector, already handled at RemoveUnreachableStatementRector

* clean up
2022-05-01 12:46:52 +07:00
Tomas Votruba
08bb10de6b
[CodeQuality] Add InlineArrayReturnAssignRector (#2183)
* [CodeQuality] Add InlineArrayReturnAssignRector

* enable rule in code-quality

* [ci-review] Rector Rectify

Co-authored-by: GitHub Action <action@github.com>
2022-04-28 14:46:43 +00:00
Tomas Votruba
ae45be1cf3
[DX] Add note warning about using old config (#2174)
* fix cs

* use import short classes

* add notificaiton in case of loading of old ContainerConfigurator

* add imports short classes
2022-04-26 22:53:49 +00:00
Tomas Votruba
eaaecc39d7
Remove PREVIOUS_STATEMENT from StatementNodeVisitor (#2146) 2022-04-24 16:19:51 +00:00
Abdul Malik Ikhsan
91f6470cbc
[DX] Update to use Method Call from RectorConfig on rector configs ( config/set dir) (#2108)
* [DX] Update to use Method Call from RectorConfig on rector configs ( config/set dir)

* typo fix

* [ci-review] Rector Rectify

Co-authored-by: GitHub Action <action@github.com>
2022-04-20 18:23:30 +00:00
Tomas Votruba
03fbf02ec4
[DX] Run UpgradeRectorConfigRector on /configs/set (#2099) 2022-04-20 07:05:49 +00:00
Abdul Malik Ikhsan
91b8573525
[PHPStan] Set compatible with upcoming PHPStan 1.6.x with set NodeConnectingVisitor tags (#2014)
* [PHPStan] Set compatible with upcoming PHPStan 1.6.x with set NodeConnectingVisitor tags

* update phpstan 1.6.x-dev and conditional tags

* try require phpstan/phpstan:1.6.x-dev in packages_tests workflow

* remove ->tag call as register in PHPStan conditionalTags

* clean up tweak packages-tests
2022-04-16 00:30:56 +07:00
Abdul Malik Ikhsan
09499098eb
[TypeDeclaration] Register ParamAnnotationIncorrectNullableRector to type-declaration config set (#2071)
* [TypeDeclaration] Register ParamAnnotationIncorrectNullableRector to type-declaration config set

* [ci-review] Rector Rectify

* clean up unneeded ClassMethodReturnTypeOverrideGuard usage

* [ci-review] Rector Rectify

Co-authored-by: GitHub Action <action@github.com>
2022-04-14 16:52:49 +02:00
Abdul Malik Ikhsan
d0c25cc4b9
[TypeDeclaration] Register ReturnAnnotationIncorrectNullableRector and VarAnnotationIncorrectNullableRector to type-declaration config set (#2062)
* [TypeDeclaration] Register ReturnAnnotationIncorrectNullableRector and VarAnnotationIncorrectNullableRector

* [ci-review] Rector Rectify

Co-authored-by: GitHub Action <action@github.com>
2022-04-13 18:34:56 +02:00
Abdul Malik Ikhsan
363f4083d5
[TypeDeclaration] Make TypedPropertyFromAssignsRector configurable with INLINE_PUBLIC (#2052)
Co-authored-by: GitHub Action <action@github.com>
2022-04-13 18:28:07 +02:00
Tomas Votruba
c35cc97d38
[DX] Add phpVersion() method to RectorConfig + make use of new config class in test configs (#2065)
Co-authored-by: GitHub Action <action@github.com>
2022-04-12 16:33:33 +02:00
Fabien Villepinte
799b77a8ed
Fix typo in a comment (#2064) 2022-04-12 14:49:14 +02:00
Tomas Votruba
8d92c466fd
[DX] Use RectorConfig in configs (#2063)
* use RectorConfig in configs

* update variable name

* remove extra spaces

* apply on configs

* apply on e2e

* update markdown files

* remove extra spaces
2022-04-12 13:46:07 +02:00
Tomas Votruba
60f1dadd6f
Merge FollowRequireByDirRector to almost identical AbsolutizeRequireAndIncludePathRector (#2048) 2022-04-10 22:04:59 +02:00
Tomas Votruba
0227d24e36
Merge InArrayAndArrayKeysToArrayKeyExistsRector to ArrayKeysAndInArrayToArrayKeyExistsRector with almost identical behavior (#2047) 2022-04-10 19:42:40 +00:00
Tomas Votruba
9b8e161878
merge SimplifyDuplicatedTernaryRector to UnnecessaryTernaryExpressionRector, almost identical rule (#2046) 2022-04-10 19:01:30 +00:00
Tomas Votruba
a2ee46d16e
Refactor SymplifyUselessVariableRector to avoid using PREVIOUS_NODE, use current scope instead (#2045) 2022-04-10 20:12:34 +02:00
Tomas Votruba
c20f2301fe
Add RectorConfigurator for custom configuration methods and avoid conflicts with Symfony API (#2019)
Co-authored-by: Grzegorz Korba <grzegorz.korba@codito.pl>
2022-04-08 18:45:24 +00:00
Abdul Malik Ikhsan
9f9b29c741
[DowngradePhp54] Add DowngradeThisInClosureRector (#1995) 2022-04-02 17:40:58 +02:00
Abdul Malik Ikhsan
232257df31
[DowngradePhp81] Add DowngradeArrayIsListRector (#1996) 2022-04-02 15:08:53 +02:00
Abdul Malik Ikhsan
a20320d8ca
[Php55] Move GetCalledClassToSelfClassRector + GetCalledClassToStaticClassRector from php 7.4 to 5.5 SetList (#1972) 2022-03-28 11:10:13 +02:00
Abdul Malik Ikhsan
90bbd4e1a0
[Php74] Add GetCalledClassToSelfClassRector (#1971)
Co-authored-by: GitHub Action <action@github.com>
2022-03-27 20:38:09 +02:00
Tomas Votruba
15c8106871
[Order] Deprecate rather coding standard related set, use OrderedClassElementsFixer instead (#1910) 2022-03-07 13:07:18 +01:00
Tomas Votruba
8057e33f91
[TypeDeclaration] Add ArrayShapeFromConstantArrayReturnRector (#1908) 2022-03-07 12:28:39 +01:00
Tomas Votruba
4c890be2c1
Remove old PHPSpec 3 and 4 sets (#1902) 2022-03-03 19:56:35 +00:00
Tomas Votruba
e2cc867255
[PhpSpecToPHPUnit] Deprecate historical set, mostly for experimental in early days (#1901) 2022-03-03 20:51:15 +01:00
Abdul Malik Ikhsan
35b07ce068
[Scoped] Using php-parallel-lint latest with --no-dev (#1855) 2022-02-22 00:21:40 +00:00
Stefan Doorn
b765bdb683
Enable MemoryCacheStorage in more CI setups (#1853) 2022-02-21 17:57:19 +01:00
Tomas Votruba
92d04a5547
Deprecate RemovingStatic rules as very narrow use case in generic rules (#1819) 2022-02-15 23:38:07 +01:00
Tomas Votruba
9fe44263f9
[DX] Inline PARALLEL_SYSTEM_ERROR_COUNT_LIMIT option to keep user scope outside internal system (#1818) 2022-02-15 22:58:51 +01:00
Jack Leigh
c4b25ec066
Remove min php version from OptionalParametersAfterRequiredRector (#1814) 2022-02-15 16:27:48 +01:00
Tomas Votruba
4f13982aab
[DX] Make progress bar less verbose on CI (#1797)
Co-authored-by: GitHub Action <action@github.com>
2022-02-11 12:06:34 +00:00
Tomas Votruba
9953b6cab1
[console] add rector console output style with CI friendly progress bar redraw (#1793) 2022-02-09 18:51:13 +00:00
Tomas Votruba
bc0eac36f4
Fix PHPStan parser for different PHP version parsing (#1791) 2022-02-09 12:09:37 +00:00
Tomas Votruba
dbadefcdf0 fix parser config 2022-02-09 10:28:22 +01:00
Tomas Votruba
e9fb346ea5
[PHPStan] Run PHPStan rich parser in tests to know the types + process code with tolerant parses on 1st run (#1790) 2022-02-09 09:10:39 +00:00
Tomas Votruba
94ef798f75
[parser] use simple parser to remove unsupported code (#1789) 2022-02-09 00:59:39 +00:00
Abdul Malik Ikhsan
6aa48e1034
[DowngradePhp71] Add DowngradePhp71JsonConstRector (#1784) 2022-02-09 05:20:49 +07:00
Abdul Malik Ikhsan
78a42c7b8a
[DowngradePhp73] Add DowngradePhp73JsonConstRector (#1782)
* [DowngradePhp73] Add DowngradePhp73JsonConstRector

* register

* clean up

* clean up

* [ci-review] Rector Rectify

* phpstan

Co-authored-by: GitHub Action <action@github.com>
2022-02-09 05:12:41 +07:00
Abdul Malik Ikhsan
ca5b89baad
[Core] Refactor InfiniteLoopValidator (#1771)
* [Core] Refactor InfiniteLoopValidator

* pass rector class

* check found

* verify rector class

* remove InfiniteLoopTraversingException

* remove manual check on rules

* test possibly null already transformed for DowngradeJsonDecodeNullAssociativeArgRector

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* test for skip some method call infinity already transformed

* finally, created by rule check can be cleaned up

* clean up ALREADY_CHANGED_ON_COUNT attribute check on CountOnNullRector

Co-authored-by: GitHub Action <action@github.com>
2022-02-06 17:27:29 +07:00
Abdul Malik Ikhsan
0a63fe4d52
[DowngradePhp72] Add DowngradePhp72JsonConstRector (#1765) 2022-02-04 15:01:13 +01:00
Abdul Malik Ikhsan
f632fa0957
[DowngradePhp80] Add DowngradeStringReturnTypeOnToStringRector (#1750)
* [DowngradePhp80] Add DowngradeStringReturnTypeOnToStringRector

* implemented

* implemented

* eol

* implemented

* implemented

* desc

* [ci-review] Rector Rectify

* register to downgrade-php80 config

Co-authored-by: GitHub Action <action@github.com>
2022-02-01 00:44:50 +07:00
ReynierPM
15e28c6de8
[RemoveFinalFromConstRector] (#1732) 2022-01-26 19:33:01 +01:00