10681 Commits

Author SHA1 Message Date
Jan Kuchař
305388d45d
Add failing test fixture for AddArrayReturnDocTypeRector - array shape is replaced by structural type (#5013)
# Failing Test for AddArrayReturnDocTypeRector

Based on https://getrector.org/demo/4afc86f8-de78-4f13-bed4-3644f1b16d6d
2020-12-28 12:38:34 +01:00
Leonardo Losoviz
44e817fa0b
Access classes installed on DEV through their strings (#4897)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-28 12:20:51 +01:00
Abdul Malik Ikhsan
bd1bd30762
[CodingStyle] Add UnSpreadOperatorRector (#5015)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-28 12:08:40 +01:00
Tomas Votruba
a7544e85e1
Cleanup exclusion manager test (#5012)
* merge CODING_STYLE_ADVANCED to CODE_QUALITY_STIRCT

* rename split ExclusionManager test to single one
2020-12-27 23:24:28 +00:00
Tomas Votruba
520335251d
[scoper] keep phpstan.phar to avoid conflict in install (#5009)
* fix scoping of Symfony autodiscovery namespace

* scoped: add along phpstan run

* wait longer, the old version is used

* keep phpstan.phar
0.9.0
2020-12-27 21:14:39 +00:00
Tomas Votruba
34a2a497b3
[scoper] symplify prefix pick (#5011)
* use local composer.json for scoped dir

* remove dead directory

* remove dynamic return type extension, not used

* [ci] add along phpstan install

* [scoper] add psr-4 prefixing
2020-12-27 20:31:30 +00:00
TomasVotruba
4f66248507 push 2020-12-27 14:29:03 +01:00
TomasVotruba
a2b2a0e053 build on push dev 2020-12-27 14:27:42 +01:00
TomasVotruba
978fdcdfd8 try symplify scoping 2020-12-27 14:05:05 +01:00
TomasVotruba
087972f8d0 UPGRADE: add --set moving 2020-12-27 13:20:36 +01:00
TomasVotruba
b5e3933e75 UPGRADE: add set moving 2020-12-27 12:46:50 +01:00
Abdul Malik Ikhsan
d8e13e9144
[AbstractRector] Add rollbackComments (#5005) 2020-12-27 10:54:05 +01:00
Tomas Votruba
8de8cddaf6
[PHP 8.0] Skip accessed variable before property assign (#5008)
Co-authored-by: Jan Kuchař <honza@kucharovi.cz>
2020-12-27 02:07:52 +00:00
TomasVotruba
f49c14618a clean 2020-12-27 02:45:00 +01:00
Tomas Votruba
28a02fbfcd
Add failing test fixture for RemoveCodeAfterReturnRector
# Failing Test for RemoveCodeAfterReturnRector

Based on https://getrector.org/demo/efb7f3ed-e28a-4f31-b83f-50adfb17d309
2020-12-27 02:39:11 +01:00
Tomas Votruba
8c516e4f5c
[PHP 8.0] Skip promotion property if worked with before assign (#5006)
* test: ClassPropertyAssignToConstructorPromotionRector: should ignore early returns

* correct file location

* [PHP 8.0] Skip usage of variable before assign in promotion property

Co-authored-by: Jan Kuchař <honza@kucharovi.cz>
2020-12-27 01:04:31 +00:00
TomasVotruba
5e358ec38a fix property varlike vs var name 2020-12-27 00:41:30 +01:00
Tomas Votruba
c871fd5994
[scoper] adding Symfony version test, name prefix by date for easier diffs (#4997) 2020-12-26 22:04:46 +01:00
Tomas Votruba
b37cfab141
[ci] enable ramsey (#5001) 2020-12-26 15:10:44 +00:00
Tomas Votruba
ec92bcc95e
[phpstan] enable file lenght rule (#4999)
* enable file lenght rule

* longer file, just to show ci worked

* [ci] add ValidateFileLengthCommand

* [phpstan] drop PathsAreNotTooLongRule

* [Downgrade] Shorten property promotion rector rule

* [Symfony] Shorten AutoWireWithClassNameSuffixForMethodWithRequiredAnnotationRector name

* shorten fixture name

* rename ChangeControlArrayAccessToAnnotatedControlVariableRector to AnnotateMagicalControlArrayAccessRector

* rename ReplaceMagicEventPropertySubscriberWithEventClassSubscriberRector to ReplaceMagicPropertyWithEventClassRector

* rename GetConfigWithDefaultsArgumentToArrayMergeInCompilerExtensionRector to MergeDefaultsInGetConfigCompilerExtensionRector

* rename ChangeCollectionTypeOptionTypeFromStringToClassReferenceRector to ChangeStringCollectionOptionToConstantRector

* decouple ProjectFilesFinder
2020-12-26 14:53:21 +00:00
Tomas Votruba
32272a97a1
[PHPStan] Added PathsAreNotTooLongRule phpstan rule (#4998)
* Added PathsAreNotTooLongRule phpstan rule

* static fixes

Co-authored-by: Markus Staab <m.staab@complex-it.de>
2020-12-26 13:35:23 +00:00
TomasVotruba
6ed1b26ee7 prefix by date 2020-12-26 12:21:15 +01:00
TomasVotruba
3e5615a973 scoping cleanup 2020-12-26 12:18:44 +01:00
TomasVotruba
35ed548173 update README 2020-12-26 12:13:35 +01:00
Abdul Malik Ikhsan
3ef72c375f
[DeadDocBlock] Skip RemoveNonExistingVarAnnotationRector on has other comment before var (#4988)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-26 11:30:52 +01:00
Tomas Votruba
d4883d44d9
[Prefixed Rector] Add package-scoper approach (#4559) 2020-12-26 00:17:31 +01:00
Tomas Votruba
4e06c46253
[cs] add variable types (#4996) 2020-12-25 22:10:35 +00:00
Tomas Votruba
ed475a2e3c
[static] no nullable node (#4995)
* move phpstan.neon cusotm rules to rector-rules.neon, to cleanup main config

* enable forbidden rule on nullable nodes

* bump to Symplify 9.0.17

* make name non-nullable

* skip non-nullable

* skip null dim
2020-12-25 20:50:50 +00:00
Tomas Votruba
d256bbd8c0
change rector-ci.php to rector.php (#4994) 2020-12-25 19:11:33 +01:00
Tomas Votruba
51dd6b899a
[SOLID] Drop UseInterfaceOverImplementationInConstructorRector, very subjective (#4993) 2020-12-25 17:24:53 +00:00
Tomas Votruba
a4f8a23ecf
[CodeQuality] Move MoveVariableDeclarationNearReferenceRector (#4992) 2020-12-25 17:48:15 +01:00
Tomas Votruba
db89b5eefa
[CodeQuality] Move MoveVariableDeclarationNearReferenceRector (#4989)
* [CodeQuality] Move MoveVariableDeclarationNearReferenceRector

* move code-quality-strict rules to own namespace

* move MoveVariableDeclarationNearReferenceRector to CodeQualityStrict

* add ClassConstFetchFactory

* static fixes
2020-12-25 16:22:19 +00:00
Tomas Votruba
a2dbaedb0e
[Privatization] Move MakeUnusedClassesWithChildrenAbstractRector here (#4987) 2020-12-25 15:45:17 +01:00
Tomas Votruba
bfcdd22a7c
[Privatization] Move FinalizeClassesWithoutChildrenRector here (#4986) 2020-12-25 14:59:14 +01:00
Tomas Votruba
cffd7ea0ac
[CodingStyle] Move PHPStormVarAnnotationRector (#4985)
* [CodingStyle] Move PHPStormVarAnnotationRector

* [ci-review] Rector Rectify

* [DeadDocBlock] Move RemoveNonExistingVarAnnotationRector here (#4984)

* [DeadDocBlock] Move RemoveNonExistingVarAnnotationRector here

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>

* [ci-review] Rector Rectify

* cleanup docs

* static fixes

* [ci-review] Rector Rectify

* remove duplicated

* multi use case

* misc

* [ci-review] Rector Rectify

* fixes

* remove order set, slow

* move UseMessageVariableForSprintfInSymfonyStyleRector from solid set to coding-style

* make unique-named variables to prevent accidental override and improve readability

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-25 13:20:13 +00:00
Abdul Malik Ikhsan
ec5daad132
[Util] Add StaticInstanceOf (#4979)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-25 12:53:26 +01:00
Tomas Votruba
61b72a8d7c
[DeadDocBlock] Move RemoveNonExistingVarAnnotationRector here (#4984)
* [DeadDocBlock] Move RemoveNonExistingVarAnnotationRector here

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-25 00:56:59 +00:00
Tomas Votruba
d465ec83e2
[DeadCode] Move RecastingRemovalRector from PHPStan set (#4983)
* [DeadCode] Move RecastingRemovalRector from PHPStan set

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-25 00:22:45 +00:00
TomasVotruba
0326aec71c renames on regex 2020-12-25 00:28:36 +01:00
TomasVotruba
d337b5753f cleanup 2020-12-25 00:18:02 +01:00
TomasVotruba
b911612ba3 fix yaml suffix 2020-12-24 23:05:50 +01:00
Tomas Votruba
5a47e36b72
Add Visibility consts (#4981) 2020-12-24 23:01:30 +01:00
Tomas Votruba
d03fb14c3f
fix parent visilibty (#4980) 2020-12-24 21:58:07 +01:00
TomasVotruba
9c2cde103c update dockerignore 2020-12-24 17:45:45 +01:00
Tomas Votruba
319d6bfca1
add phpstan-for-rector config path, consolidate return type extensions - re-use from Symplify (#4973)
* add phpstan-for-rector config path, to separate phpstan and extensions that help Rector with precise types

* move type value object to value object

* moving

* remove KernelGetContainerAfterBootReturnTypeExtension, use one from symplify

* remove ContainerGetDynamicMethodReturnTypeExtension to ContainerGetReturnTypeExtension

* remove nette extension

* add nette-extension

* removed delegated rule

* delegate implmenets + code sample PHPStan rule to symplify
2020-12-24 16:31:24 +00:00
Abdul Malik Ikhsan
ca0b4cfdc7
[EarlyReturn] Register ChangeOrIfReturnToEarlyReturnRector to early-return set (#4975)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-24 17:28:56 +01:00
Abdul Malik Ikhsan
9433616c63
[EarlyReturn] Add ChangeOrIfReturnToEarlyReturnRector (#4974)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-24 14:20:16 +01:00
Abdul Malik Ikhsan
cb5a36434e
[PHP 7.4] Skip TypedPropertyRector on standalone null type (#4972)
Fixes #4956
2020-12-24 11:02:32 +01:00
TomasVotruba
8771bffab4 fix path 2020-12-24 00:48:35 +01:00
Tomas Votruba
f6900e687c
[PHP 8.0] Skip exception in match, must be expr (#4971)
* [PHP 8.0] Skip exception in match, must be expr

* add test case for var strings

* [ci-review] Rector Rectify

* skip universal

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-23 23:44:16 +00:00