Commit Graph

242 Commits

Author SHA1 Message Date
Tomas Votruba
695c190be3 Updated Rector to commit 94b5561ca87ee6825a098c7c506b774582bf3354
94b5561ca8 chore: bump min version of github actions (fix deprecations) (#5675)
2024-03-01 20:02:28 +00:00
Tomas Votruba
7bb5d0c0c4 Updated Rector to commit 5b3d656a003e72540050d47e00285341a96b5796
5b3d656a00 [Custom] Add "detect-node" command to help with writing custom rules (#5576)
2024-02-07 16:28:52 +00:00
Tomas Votruba
b0211bc3d8 Updated Rector to commit fa75fcf0d1445f90cff9199875aba352671795f9
fa75fcf0d1 [Performance][PhpVersionResolver] Cache resolve platform/require from composer.json on ProjectComposerJsonPhpVersionResolver (#5542)
2024-02-01 23:54:40 +00:00
Tomas Votruba
94c55b84c0 Updated Rector to commit 1608ae8c9497bbfaf78ce54130ec304963ac6f2a
1608ae8c94 [Windows] Utilize Nette\Utils\FileSystem instead of Symfony\Component\Filesystem\Filesystem to write file (#5514)
2024-01-28 22:41:37 +00:00
Tomas Votruba
c155c9cbaa Updated Rector to commit 040b839e71ec558c83553bc1462924e96993f6f0
040b839e71 [Windows] Rework add windows support on tests CI (#5504)
2024-01-28 08:50:44 +00:00
Tomas Votruba
e47a59adcc Updated Rector to commit b107a16f98aecf2a5ff969e30ff48595daadc06d
b107a16f98 [Performance] Reduce repetitive FileSystem::read() on AbstractRectorTestCase (#5511)
2024-01-28 03:50:21 +00:00
Tomas Votruba
bfa367259d Updated Rector to commit 6d0abe7b49908c66940c7b4065cd28f0d66fbf45
6d0abe7b49 [Autoload] Remove src/core_namespace_aliases.php (#5476)
2024-01-17 11:38:29 +00:00
Tomas Votruba
0d611d897a Updated Rector to commit 07df7dc1a344c52711441149d61251a4fe10366d
07df7dc1a3 Remove collector interface and fix SpatieEnumClassToEnumRector already has underscore to double underscore (#5473)
2024-01-16 10:21:57 +00:00
Tomas Votruba
ec3d78eef4 Updated Rector to commit 5a3a59c50c7810296274eb4408737c8f2f8921e7
5a3a59c50c Remove collectors, as performance very costly and not practically useful (#5470)
2024-01-15 22:10:40 +00:00
Tomas Votruba
c888002735 Updated Rector to commit 4005683997ceadfff65d19328e4eb2d0b5b3bbae
4005683997 [Scoper] Include src/core_namespace_aliases.php on last after project autoload (#5420)
2024-01-02 13:36:58 +00:00
Tomas Votruba
7e7a2f067a Updated Rector to commit 476cfb00cb6a94cb64badf9472ee78f33bdf44b3
476cfb00cb disable fallback for now
2024-01-02 02:40:38 +00:00
Tomas Votruba
0513315056
Change file system approach of MultipleClassFileToPsr4ClassesRector to file without namespace node (#4522)
* Change file system approach of MultipleClassFileToPsr4ClassesRector to file without namespace node

* update DecoupleClassMethodToOwnClassRector

* [ci] add rebase jobp

* disable fail fast for unit tests

* misc
2020-10-31 12:59:40 +00:00
Tomas Votruba
489efd1adf
[docs] add command for used node stats + simplify node docs, so it uses most needed examples over are nodes (e.g. /=) (#4518) 2020-10-30 22:13:56 +01:00
Tomas Votruba
2c120e283e
Inform about useless second part in tests fixture, after -----, if it is identical (#4514)
* embed skip fixture of same before/after

* [Testing] Add exception on identical second half of the fixture, that should not change

* [ci] use composer 2 for code_analysis

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-30 13:56:55 +00:00
Tomas Votruba
0f2e6d407e
[DoctrineAnnotaitonGenerated] Update to doctrine/annotations 1.11 + fix static (#4479) 2020-10-25 14:43:05 +01:00
Tomas Votruba
6c51f3fb4f
[Restoration] Add InferParamFromClassMethodReturnRector (#4471)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-21 23:06:24 +02:00
Tomas Votruba
75d25a1dcb
[CodeQuality] Decouple complete dynamic properties rector, add skip of Closure::bind() (#4466)
* [ci] temporarily hide split monorepo

* [CodeQuality] Decouple complete dynamic properties rector, add skip of bind()

* [rector] [CodeQuality] Decouple complete dynamic properties rector, add skip of bind()

* [cs] [CodeQuality] Decouple complete dynamic properties rector, add skip of bind()

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-20 20:27:12 +00:00
Tomas Votruba
e845d7cea8
[DoctrineCodeQuality] Add ImproveDoctrineCollectionDocTypeInEntityRector (#4442)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-18 18:29:35 +02:00
Tomas Votruba
8af70b5ac0
[Defluent] Refactoring to multiple rules (#4400)
* [Defluent] Refactoring to multiple rules

* [Defluent] Decouple defluent-only set, it deserved to have own domain

* cleanup

* [rector] cleanup

* [cs] cleanup

* fixup! cleanup

* static fixes

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-14 04:24:29 +00:00
Igor
35537dba84
[SOLID] Change if && to early return (#4344)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-10 18:27:13 +02:00
Tomas Votruba
e47a806300
Remove AbstractFileSystemRector and move to AbstractRector (#4378) 2020-10-09 21:51:09 +02:00
Tomas Votruba
7d56318046
[Legacy] From file system Rector to classic Rector (#4373)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-09 10:11:22 +02:00
Tomas Votruba
5cb49a2d5a
[PSR-4] Move from FileSystemRector to FileWithoutNamespace node (#4372) 2020-10-08 23:28:24 +02:00
Abdul Malik Ikhsan
ae816c2c3d
Fixes #4337 : Make Option::SKIP works again with ParameterProvider (#4339) 2020-10-01 18:55:10 +02:00
Tomas Votruba
70bf2ea830
[DOCS] Switch DumpRectorCommand from console to string printer (#4281)
* monorepob-builder: add v prefix

* monorepob-builder: add v prefix

* bump symplify

* decouple SymfonyConsole from DumpRectorCommand

* moving to migrify php-config-printer

* regenerate docs

* include rules oerview
2020-09-24 18:54:39 +00:00
Tomas Votruba
52ccfc0527
[DX] move Nette FileSytem to SmartFileSystem DI (#4262)
* move Nette FileSytem to SmartFileSystem DI

* move Symfony FileSytem to SmartFileSystem

* [ci] run rector diretly, without composer wrap
2020-09-19 09:27:29 +00:00
Tomas Votruba
4f1beae3fd
[DX] Fix NoAbstractMethodRule cases (#4180)
* decouple IsAbleFuncCallInterface

* decouple WithFunctionToNetteUtilsStringsRectorInterface

* decouple NodeTraversableInterface

* decouple RectorInterfaceAwareInterface

* [ci] disable markdown check to prevent user bothering
2020-09-09 09:07:14 +00:00
Tomas Votruba
1a2e9cbb33
static fixes (#4140) 2020-09-07 17:40:46 +02:00
Tomas Votruba
7ac228c638
[CI] Add type-declaration set (#4089)
* [CI] Add type-declaration set

* [rector] [CI] Add type-declaration set

* [cs] [CI] Add type-declaration set

* skip nullable void

* add anonymous parent/interface support

* refactor MultiExceptionCatchRector to use Catch_ over integers

* type fixes

* fix unoin array type override

* remove unused test cases

* drop overcomplicated InlineValidationRulesToArrayDefinitionRector

* skip assign on var

* [rector] skip assign on var

* [cs] skip assign on var

* [rector] [cs] skip assign on var

* skip assign on var

* fixes

* [rector] fixes

* [cs] fixes

Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-01 17:56:30 +00:00
Tomas Votruba
07708488a2
Fix dump rectors (#4059)
* fix missing Whatever rector

* [rector] fix missing Whatever rector

* [cs] fix missing Whatever rector

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-29 14:43:32 +00:00
dobryy
d40309963c
[Type Declaration] Create new unit test for ArrayTypeMapper with fixes (#4054)
* Create new unit test for ArrayTypeMapper with fixes

* Fix typo in method name that breaks all tests

* Remove skip too many fixtures to implement the fix for these fixtures as a next PR.
2020-08-29 10:41:19 +02:00
Tomas Votruba
190d7cf616
update ecs (#4048)
* remove array return

* misc
2020-08-28 23:10:00 +02:00
Tomas Votruba
4ef653976f
Fix invalid set reporting (#4006)
* do not use internal rectors

* report invalid set

* remove dashes before number in set name

* [rector] remove dashes before number in set name

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-22 19:27:41 +00:00
Tomas Votruba
fd69d845e4
Refactor extra file tests wobbly arrays to typed value objects (#3996) 2020-08-21 13:30:28 +02:00
Tomas Votruba
752a35253b
Remove YAML from tests (#3989)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-19 18:00:27 +02:00
dobryy
2e7bdca4e2
[DX] Rename namespaces respect node type (#3973) 2020-08-18 17:57:30 +02:00
Tomas Votruba
664388561d
Recipe array to object (#3966)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-16 00:49:15 +02:00
Tomas Votruba
1c4b510513
PHPStan: require iterable types (#3936)
* phpstan: require iterable types

* add link on relative path and line

* fix missing class type

* typed array in Rector code + add data provide support resolver

* remove duplicated set

* drop unused yaml ecs config

* add out-of-the-box directory for 3rd party packages

* static fixes

* [rector] static fixes

* [cs] static fixes

* [rector] [cs] static fixes

* generic types

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-11 10:59:04 +00:00
dobryy
29d44284cc
[Order] Order class methods by visibility (#3923)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-07 18:23:40 +02:00
Tomas Votruba
ec28719c6c
make use of NodeConnectingVisitor + improve generate Rector docs (#3925) 2020-08-07 11:30:05 +02:00
dobryy
411d76f9a9
[Order] Make OrderPrivateMethodsByUseRector process file in one run u… (#3889)
* [Order] Make OrderPrivateMethodsByUseRector process file in one run using while loop

* [Order] Enable rule in CI

* [rector] [Order] Enable rule in CI

* [cs] [Order] Enable rule in CI

* [Order] Use constant for number of max attempts and throw exception when exceeded.

* [rector] [Order] Use constant for number of max attempts and throw exception when exceeded.

* [cs] [Order] Use constant for number of max attempts and throw exception when exceeded.

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-05 22:45:36 +02:00
TomasVotruba
e9e7a5dc89 make use SmartFileSystem is available 2020-08-05 16:30:30 +02:00
Tomas Votruba
7212366606
[Naming] Decouple RenameParamToMatchTypeRector (#3906)
* [Naming] Decouple RenameParamToMatchTypeRector

* remove overrlaping useless test fixtures

* [rector] remove overrlaping useless test fixtures

* [cs] remove overrlaping useless test fixtures

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-04 18:30:31 +00:00
dobryy
3aa2fc8727
[Order] Order properties and constants with respect of complexity and position (#3826)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-07-31 22:20:45 +02:00
TomasVotruba
ce480d3983 remove SplitLine value object 2020-07-30 16:40:34 +02:00
TomasVotruba
2291d5540a decopule testing tools 2020-07-30 16:31:57 +02:00
TomasVotruba
2ad011673f [PHP 7.0] Fix variable name on static call 2020-07-30 15:53:21 +02:00
TomasVotruba
fe72e003ed use constants in configs 2020-07-30 13:53:53 +02:00
TomasVotruba
2741893bbf [RectorGenerator] Refactoring to testable code 2020-07-29 20:50:31 +02:00
TomasVotruba
7c01151ec6 Move Core Rector rules to Generic namespace, to prevent mixup with Core code 2020-07-29 02:05:52 +02:00