129 Commits

Author SHA1 Message Date
TomasVotruba
0481b2c9b9 add changelog link 2021-05-08 23:36:55 +02:00
TomasVotruba
5fa7ec524a naming 2021-05-08 21:52:37 +02:00
TomasVotruba
270016ce23 skip type without PHP declaration 2021-05-08 21:20:03 +02:00
TomasVotruba
05f53cefda fix path to vendor 2021-05-08 20:06:00 +02:00
Tomas Votruba
9efcda0536
[Downgrade Php 7.0] Add other scalar type recast (#6393) 2021-05-08 19:41:03 +02:00
TomasVotruba
e7ea2f625d fix way too early return 2021-05-08 15:59:17 +02:00
Tomas Votruba
5784f734f8
[DowngradePhp70] Add DowngradeGeneratedScalarTypesRector (#6392) 2021-05-08 15:14:35 +02:00
Tomas Votruba
d7a5324e6b
skip empty methods, e.g. interface or abstract method (#6391) 2021-05-08 11:40:51 +00:00
Tomas Votruba
7a33e856fd
[Downgrade PHP 7.0] Add string retype on object (#6390) 2021-05-08 10:55:30 +00:00
Tomas Votruba
dc0bcdbcd8
downgrade types opt-in (#6388) 2021-05-08 02:07:18 +02:00
TomasVotruba
af559edbe9 add changelog link 2021-05-08 01:36:24 +02:00
TomasVotruba
94bd7c822b rename DowngradeTypeDeclarationRector to DowngradeScalarTypeDeclarationRector 2021-05-08 01:34:29 +02:00
Tomas Votruba
b5b312bdc0
[Downgrade PHP 7.0] Fix coalesce with expr (#6387) 2021-05-07 22:40:29 +00:00
Tomas Votruba
189df35831
[Downgrade 7.0] Number classes, simplify (#6386) 2021-05-07 21:58:06 +00:00
Tomas Votruba
3cdbd48a79
[DowngradePhp70] Add class out of trait (#6385) 2021-05-07 22:45:51 +02:00
Tomas Votruba
550d147808
[DowngradePhp70] Add anonymous class out of trait (#6384) 2021-05-07 20:43:36 +00:00
Tomas Votruba
327f5fc126
[DowngradePhp70] Add SplitGroupedUseImportsRector + allow to return list of stmt[] in refactor() (#6364)
* rename SeparateMultiUseImportsRector to SeparateMultiUseImportsRector

* [PHP 7.0] Add SplitGroupedUseImportsRector

* allow to return multiple nodes to avoid addStmts() and removeNode() combo

* dot not FQN namespace and use improts
2021-05-06 01:44:08 +02:00
Abdul Malik Ikhsan
bbba5304ad
[DowngradePhp70] Add DowngradeSessionStartArrayOptionsRector (#6282) 2021-05-02 10:29:26 +02:00
Abdul Malik Ikhsan
9e91a8d401
[DowngradePhp70] Add DowngradeDefineArrayConstantRector (#6270)
* [DowngradePhp70] [WIP] Add DowngradeDefineArrayConstantRector

* add fixture

* create const

* it works

* skip inside method or inside function

* register DowngradeDefineArrayConstantRector to downgrade-php70 config set

* skip not in expression

* phpstan

* final touch

* ensure expression expr is a define func call

* final touch

* [ci-review] Rector Rectify

* working prototype

* update to Expression

* config

* phpstan

* final touch

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2021-05-01 09:43:20 +02:00
Abdul Malik Ikhsan
94cf4314e6
Fix DowngradeSpaceshipRector sample code (#6252) 2021-04-26 21:52:21 +00:00
Abdul Malik Ikhsan
2eb5af1aad
[DowngradePhp70] Add DowngradeSpaceshipRector (#6243)
* [DowngradePhp70] Add DowngradeSpaceshipRector

* register to downgrade-php70 config set

* CS fix

* phpstan

* [ci-review] Rector Rectify

* property fetch

* more fixtures

* implemented, skip namespaced variable

* implemented, skip namespaced variable

* better approach

* use variable named left, right

* move to new variable battleShipCompare

* [ci-review] Rector Rectify

* final touch

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-26 13:52:50 +02:00
Tomas Votruba
f9dc93cb1a
Fix WrapEncapsedVariableInCurlyBracesRector reporting (#6220)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-23 19:32:59 +00:00
Abdul Malik Ikhsan
91377902b2
[DowngradePhp70] Add DowngradeNullCoalesceRector (#6208) 2021-04-23 09:21:57 +02:00
Tomas Votruba
507bd85c3e
[Downgrade] Report only changed return types (#6191) 2021-04-22 10:04:58 +00:00
Abdul Malik Ikhsan
bd2c7aee9f
[DowngradePhp70] Add DowngradeAnonymousClassRector (#6122)
* [DowngradePhp70] [WIP] Add DowngradeAnonymousClassRector

* typo

* add test

* check is anonymous

* adding new Anonymous class before class

* anonymous class must have New_ parent

* getting args

* without param

* with args fixture

* adding with args

* debug

* with args

* getting args from next attribute

* try move to New_

* skip not anonymous

* try using New_

* [ci-review] Rector Rectify

* it works with New_ node

* with addNodeBeforeNode()

* class exists fixture

* adding increment class if exists

* implemented increment class name for inside class

* handle no namespace

* in function

* in function no namespace

* works

* register to downgrade php70 set

* [ci-review] Rector Rectify

* typo fix

* phpstan

* [ci-review] Rector Rectify

* add handle in closure

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-14 19:55:20 +02:00
Abdul Malik Ikhsan
4d4fb3611f
[DowngradePhp70] Add DowngradeStrictTypeDeclarationRector (#6107)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-04-12 17:28:54 +02:00
Tomas Votruba
d897902ccf
[Downgrade] Keep better phpdoc type (#5862) 2021-03-15 18:58:04 +01:00
Tomas Votruba
721f619a1d
Post moving cleanup (#5827) 2021-03-12 23:52:38 +00:00
Tomas Votruba
157c39aefc
[DX] move src/tests rules from micro-packages to single PSR-4 structure (#5826) 2021-03-12 23:20:25 +01:00