42 Commits

Author SHA1 Message Date
Abdul Malik Ikhsan
7867fe927a
[AUTO_IMPORT_NAMES] Failing fixture for #4650 to skip already in use statement (#4785)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-07 13:20:59 +01:00
Abdul Malik Ikhsan
1e667b454f
[CI] Add PHP 8.0 to Github actions tests (#4779) 2020-12-05 12:10:44 +01:00
Tomas Votruba
da6d703687
Improve Blade class renames (#4676)
* [Console] Use single point of command naming

* use blade in process command

* filter out blade templates from PHP files

* make test process blade as non php file

* add failing test

* remove duplicated tests

* rename php to php.inc suffix to make it skip to CI tools

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-23 19:16:48 +00:00
Tomas Votruba
cb57430655
[Renaming] Add renaming support for blade.php templates in Laravel (#4672)
* [CI] fix monorepo split

* naming, add blade.php suffix

* [Renaming] Add class rename support for laravel blade templates

* skip test fixture
2020-11-23 11:35:42 +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
a1e50263d2
[cs] improve configured rules types (#4491)
* [cs] improve configured rules types

* [ci] update env variable
2020-10-27 14:00:39 +00:00
Tomas Votruba
1c8fac5242
Add meta node FileWithoutNamespace (#4355)
* [CakePHP] Promote AppUsesStaticCallToUseStatementRector to File

* [CakePHP] Change ImplicitShortClassNameUseStatementRector to FileWithoutNamespace approach

* [Renaming] Update PseudoNamespaceToNamespaceRector to use FileWithnoutNamespace

* [rector] [Renaming] Update PseudoNamespaceToNamespaceRector to use FileWithnoutNamespace

* [cs] [Renaming] Update PseudoNamespaceToNamespaceRector to use FileWithnoutNamespace

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-05 08:39:02 +00:00
Igor
7d5ab130fb
[Renaming] Move RenamePropertyRector to appropriate set (#4303) 2020-09-27 23:33:32 +02:00
Abdul Malik Ikhsan
bfbd0ba7c1
[renaming] Fixes #4295 add \ prefix on FQ method call (#4297) 2020-09-25 14:52:39 +02:00
dobryy
28a55c973e
[DX] Add Rule that checks that Rule + value object have same starts (#4202)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-12 23:19:08 +02:00
Tomas Votruba
dfe158e2da
[DX] Various value objects added (#4034)
* [DX] Add TypeToStaticCall

* [DX] Add ClassConstantRename

* [DX] Add IssetUnsetToMethodCall

* [DX] Add MethodToYield

* drop unamtained shopware sets

* [DX] Add RenamedAnnotationInType

* [DX] Add MethodCallWrap

* [DX] Add RenamedProperty

* [DX] Add StringToClassConstant

* [DX] Add ArgumentSwap

* simplify rename function rector

* [DX] Add RemovedFunctionArgument

* [DX] Add MethodCallToService

* [DX] Add UnprefixedMethodToGetSet

* [DX] Add PseudoNamespaceToNamespaceRector

* [DX] Add FunctionArgumentSwap

* [DX] Add StaticCallToFunction

* [DX] Add ParentCallToProperty

* [DX] Add ParentDependency

* [DX] Add CallWithParamRename

* [DX] Added MethodCallRenameWithAddedArguments

* [DX] Add PropertyToMethodCall

* [DX] Add PropertyToMethodCall

* [rector] [DX] Add PropertyToMethodCall

* [cs] [DX] Add PropertyToMethodCall

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-26 10:54:53 +00:00
Tomas Votruba
872f13b27d
rename to value object constants (#4018) 2020-08-24 22:37:12 +00:00
Tomas Votruba
c1653070f5
[phpstan] Add rule for complex config (#4015)
* [phpstan] Add ForbiddenComplexArrayConfigInSetRule

* add MethodCallRename value object

* [SymfonyPhpConfig] Add array to value object configuration rule

* apply first MethodCallRename value object
2020-08-24 22:26:14 +00:00
Tomas Votruba
41b679cb2a
[DX] Replacing arrays with objects (#4008)
* [phpstan] Add forbidden array destruct to prevent array mess

* use ArrayCallable value object

* add OpeningAndClosingSpace

* drop ConstructorInjectionToActionInjectionRector, antipattern

* use value objects

* [rector] use value objects

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-23 09:39:09 +00:00
dobryy
2e7bdca4e2
[DX] Rename namespaces respect node type (#3973) 2020-08-18 17:57:30 +02:00
Tomas Votruba
7cda57615c
rename FunctionToStaticCallRector to FuncCallToStaticCallRector (#3895)
* rename FunctionToStaticCallRector to FuncCallToStaticCallRector

* rename FunctionToNewRector to FuncCallToNewRector

* remove RenameFuncCallToStaticCallRector, duplicate of FuncCallToStaticCallRector
2020-08-04 08:25:41 +00:00
Tomas Votruba
76b4ab7586
[Defluent] New set + various improvements (#3853)
* remove dead-else branch

* add defluent set

* fix type to match

* use constants over strings

* fixup! use constants over strings

* Add fluent as arg support to DefluentMethodCallRector

Co-authored-by: rector-bot <tomas@getrector.org>
2020-07-31 23:08:16 +00:00
TomasVotruba
fe72e003ed use constants in configs 2020-07-30 13:53:53 +02:00
TomasVotruba
853b515870 add ConfigurableRectorInterface 2020-07-29 21:02:29 +02:00
TomasVotruba
821ce6f515 [Renaming] Remove RenameMethodCallRector, ported to RenameMethodRector 2020-07-14 00:32:04 +02:00
TomasVotruba
08823bb449 skip self-class rename in RenameMethodRector 2020-07-14 00:22:31 +02:00
TomasVotruba
4614a50c86 improve test fixture names 2020-07-14 00:16:15 +02:00
TomasVotruba
1172778120 prevent RenameMethodRector from renaming already existing method 2020-07-13 23:59:43 +02:00
TomasVotruba
a8a6e7bcad rename file to fileInfo 2020-06-30 01:45:05 +02:00
TomasVotruba
828d8cf67f prevent remove false template 2020-06-29 13:50:36 +02:00
TomasVotruba
7f49658112 change test(string ) to test(SmartFileInfo ) in tests 2020-06-25 20:02:36 +02:00
TomasVotruba
f713c16afd make use of Symplify/EasyTesting 2020-06-25 19:15:40 +02:00
TomasVotruba
94cc4e84e8 add rename class support in twig/latte as well 2020-06-23 13:48:53 +02:00
Vladyslav Startsev
9eb94a9a68 added support post class move rename in XML files 2020-06-22 01:01:17 +03:00
TomasVotruba
baee588461 add rename neon/yaml file content case 2020-06-21 19:03:39 +02:00
TomasVotruba
b5c5ae0f34 prevent exception on class duplicate rename, just skip 2020-06-11 18:22:28 +02:00
TomasVotruba
f115fd6da6 Add support for rename of @property 2020-06-08 10:57:30 +02:00
Carlos C Soto
a8c07e624a Fix RenameAnnotationRector for null phpdoc 2020-05-19 13:56:16 -05:00
TomasVotruba
b0836bde3c use propety over property property 2020-04-29 13:53:06 +02:00
TomasVotruba
5600cf8d4d move node adding to PostRector 2020-04-01 01:41:56 +02:00
TomasVotruba
38fbcb28e5 move name-importing to PostRector 2020-03-31 20:13:18 +02:00
TomasVotruba
31023ee27b # This is a combination of 2 commits.
# This is the 1st commit message:

fix importing of non-existing classes

# The commit message #2 will be skipped:

# fixup! fix importing of non-existing classes
2020-03-27 16:42:50 +01:00
TomasVotruba
557c2521df unused import is responsibility of coding standard 2020-03-27 16:40:52 +01:00
TomasVotruba
6fba2c610c cannot work with non-existing class 2020-03-27 16:40:52 +01:00
Den Girnyk
30c337e82c
Fix 'auto_import_names' tests fixtures path 2020-03-27 14:47:52 +02:00
TomasVotruba
42c5141d70 [Renaming] Add RenameFuncCallToStaticCallRector 2020-02-13 17:12:38 +01:00
TomasVotruba
3e5dd77bb6 move Rector-rule based packages from /packages to /rules 2020-02-11 13:41:37 +01:00