34 Commits

Author SHA1 Message Date
Tomas Votruba
2ea430b0ec
[PHP 8.0] Fix used variable rename in propperty promotion (#4841)
* [PHP 8.0] Add test case for used variable

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-09 23:40:38 +00:00
Tomas Votruba
e157da77f9
[PHP 8.0] Skip void type in union (#4835) 2020-12-09 19:38:45 +01:00
Tomas Votruba
eac130e705
[PHP 8.0] Make Attribute silent keys explicit, with named args (#4834)
* decouple TagName class

* remove attribute aware from data provider tag value node, as unique class

* add RequiredTagValueNode

* make Attributes explicit, to avoid confusiong
2020-12-09 17:16:36 +00:00
Krystian Marcisz
41ab37165c
[PHP 8.0] Add FinalPrivateToPrivateVisibilityRector (#4794) 2020-12-05 22:33:30 +01:00
Krystian Marcisz
49dceea41a
[PHP 8.0] Add SetStateToStaticRector (#4792) 2020-12-05 21:38:33 +01:00
Tomas Votruba
0b9c72ea9a
[PHP 8.0] Fix property removal in property promotion, if they have doctrine annotations (#4752)
* [PHP 8.0] Keep doctrine proeprty with annotations on property promotion

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-02 14:26:14 +00:00
Abdul Malik Ikhsan
db18c7de19
[PHP 8.0] Improve NullsafeOperatorRector : Check against !== null (#4572)
* [PHP 8.0] Improve NullsafeOperatorRector : Check against !== null

* [ci-review] Apply coding standards

* [ci-review] Rector Rectify

* phpstan

* try process next only

* not identical process only direct if after assign

* phpstan

* [ci-review] Rector Rectify

* not identical with non-null check

* not identical with non-null check

* add yoda condition

* phpstan

* [ci-review] Apply coding standards

* move check if cond using assign identical/not identical to IfManipulator service

* cs fix

* [ci-review] Rector Rectify

* [ci-review] Apply coding standards

* move NullSafe process to NullsafeManipulator service

* phpstan

* [ci-review] Apply coding standards

* use instanceof check

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-11 11:48:47 +00:00
Abdul Malik Ikhsan
ef442dca03
[PHP 8.0] Improve NullsafeOperatorRector : No need ?-> on very first call (#4571)
* [PHP 8.0] Improve NullsafeOperatorRector : No need ?-> on very first call

* use bool check is start if

* phpstan

* phpstan and code example update

* [ci-review] Generate Rector & Nodes documentation

* [ci-review] Apply coding standards

* using $isStartIf = true default

* clean up

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-10 10:09:39 +00:00
Abdul Malik Ikhsan
b4fd52021d
[PHP 8.0] Improve NullsafeOperatorRector : Skip no direct usage after if in next statement at last (#4565)
* [PHP 8.0] Improve NullsafeOperatorRector : Skip no direct usage after if

* [ci-review] Apply coding standards

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-09 13:14:57 +00:00
Ronny López
531275df5b
Fix StrStartsWithRector to allow strpos not identical operation (#4562) 2020-11-08 23:35:05 +01:00
Abdul Malik Ikhsan
660f51019a
[PHP 8.0] Fixes #4527 Add NullsafeOperatorRector (#4557)
Co-authored-by: rector-bot <tomas@getrector.org>
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-11-08 23:15:16 +01: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
8191dca722
add fixture with property @required annotation to attribute (#4353) 2020-10-04 14:33:08 +00:00
Tomas Votruba
5597e57e12
[PHP 8.0] Add importing of Route, fix name to Annotation\Route one (#4352) 2020-10-04 14:24:49 +00:00
Tomas Votruba
08cce4f9d3
[PHP 8.0] Add @route to #[Route] attribute in Symfony 5.2 (#4350)
* move regex link to annotaiton

* improve configs

* [PHP 8.0] Add @Route to #[Route] attribute in Symfony 5.2

* add fully class attribute option

* [rector] add fully class attribute option

* [cs] add fully class attribute option

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-04 12:53:01 +00:00
Tomas Votruba
d0f65ef609
[PHP 8.0] @Required to #[Required] attribute from Symfony 5.2 (#4348)
* move ClassNodeAnalyzer to core

* README: add daily work focus

* spaces

* [PHP 8.0] Add #[Required] Symfony attribute migration

* add RFC links

* [rector] add RFC links

* [cs] add RFC links

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-04 11:12:41 +00:00
Tomas Votruba
8ae3868a57
[Restoration] Add RestoreFullyQualifiedNameRector (#4336)
* [Restoration] Add RestoreFullyQualifiedNameRector

* update docs

* use service aware test case for PHPStan rules

* improve FullyQualifiedNameMatcher

* cs fixes

* add return doc resolution

* composer: bump to symfony 4.4/5.1
2020-10-01 19:45:29 +00:00
Tomas Votruba
5a35553a2f
[PHP 8.0] Add Annotation to Attribute rule based on php-parser (#4292)
* monorepob-builder: add v prefix

* monorepob-builder: add v prefix

* [PHP 8.0] Add Annotation to Attribute rule based on php-parser

* [rector] [PHP 8.0] Add Annotation to Attribute rule based on php-parser

* [cs] [PHP 8.0] Add Annotation to Attribute rule based on php-parser

Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-25 08:17:36 +00:00
Tomas Votruba
55acb3578a
[MagicDisclosure] Add SetterOnSetterMethodCallToStandaloneAssignRector (#3860)
* [MagicDisclosure] Add MethodCallOnSetterMethodCallToStandaloneAssignRector

* merge ChainMethodCallManipulator to ChainMethodCallNodeAnalyzer for better DX

* [MagicDisclosure] Add in arg defluent

* rebase
2020-08-01 11:41:16 +00:00
TomasVotruba
dc14ddd0b9 [PHP 8.0] Add ChangeSwitchToMatchRector 2020-07-30 18:19:53 +02:00
TomasVotruba
dec0975c22 [PHP 8.0] Add ClassPropertyAssignToConstructorPromotionRector 2020-07-26 11:42:14 +02:00
TomasVotruba
a8a6e7bcad rename file to fileInfo 2020-06-30 01:45:05 +02:00
TomasVotruba
7f49658112 change test(string ) to test(SmartFileInfo ) in tests 2020-06-25 20:02:36 +02:00
TomasVotruba
641016f129 [PHP 8.0] Add RemoveUnusedVariableInCatchRector 2020-06-03 09:31:06 +02:00
TomasVotruba
56e2449918 [PHP 8.0] Add TokenGetAllToObjectRector 2020-06-02 18:12:19 +02:00
TomasVotruba
993550c9e9 [PHP 8.0] Add get_debug_type 2020-04-29 23:36:13 +02:00
TomasVotruba
a6b85af2cb [Php80] Add ClassOnObjectRector 2020-04-29 22:02:09 +02:00
TomasVotruba
1612ef2165 [PHP 8.0] Add attributes v2 2020-04-29 00:25:45 +02:00
TomasVotruba
93dffbea56 [PHP 8.0] Add Stringable 2020-04-24 14:09:25 +02:00
TomasVotruba
833435037a [PHP 8] Add str_ends_with 2020-04-24 00:54:57 +02:00
TomasVotruba
8082b3a2f2 [PHP 8.0] Add str_starts_with 2020-04-23 23:06:36 +02:00
TomasVotruba
8f1208d18b drop preg_match support from StrContains, too vague 2020-03-27 15:20:20 +01:00
TomasVotruba
3c3aa39f14 [PHP 80] Add StrContainsRector 2020-03-26 23:57:53 +01:00
TomasVotruba
d608507f2e rename PHP sets to comply with standard 2020-03-24 23:44:42 +01:00