Commit Graph

294 Commits

Author SHA1 Message Date
Abdul Malik Ikhsan
64f93c848d
Try fix stub ReflectionUnionType not found in CI php 7.2 (take 2) (#2374) 2022-05-27 15:02:23 +00:00
Abdul Malik Ikhsan
03da98750a
Try fix stub ReflectionUnionType not found in CI php 7.2 (#2373) 2022-05-27 14:48:27 +00:00
Alexander Schranz
99840deb9d
Update the branch alias for dev-main (#2365) 2022-05-27 08:44:07 +00:00
Abdul Malik Ikhsan
dc9189280f
[PHPStan] Update to PHPStan ^1.7.0 (#2354)
* [PHPStan] Update to PHPStan ^1.7.0

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* already 1.7.1

* skip pull from PHPStan PhpPropertyReflection

* rename fixture

* debug

* Fixed 🎉

* keep mysqli object use case

Co-authored-by: GitHub Action <action@github.com>
2022-05-24 19:55:12 +07:00
Abdul Malik Ikhsan
f25715b7b3
[Php73] Skip Encapsed on StringifyStrNeedlesRector + Temporary Pin PHPStan 1.6.9 (#2352)
* [Php73] Skip Encapsed on StringifyStrNeedlesRector

* phpstan

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* Fixed 🎉

* eol

* update requirement to PHPStan 1.7.0

* temporary pin to 1.6.9

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: GitHub Action <action@github.com>
2022-05-24 15:29:10 +07:00
Tomas Votruba
adb6e68c2a
[automated] Re-Generate Nodes/Rectors Documentation (#2343)
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
2022-05-22 00:30:58 +00:00
Abdul Malik Ikhsan
f0a1b688f3
[DowngradePhp80] Apply PHPStan 1.7.x-dev compatible for PhpParameterReflection (#2336) 2022-05-20 12:16:54 +02:00
Abdul Malik Ikhsan
e33bcf19be
[Core] Override pModifiers() method to set final and abstract modifiers early on BetterStandardPrinter (#2328)
Co-authored-by: GitHub Action <action@github.com>
2022-05-18 12:41:43 +02:00
Tomas Votruba
96400215b5
[automated] Re-Generate Nodes/Rectors Documentation (#2314)
* [automated] Re-Generate Nodes/Rectors Documentation

* use option 2

Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
2022-05-15 09:35:22 +00:00
Tomas Votruba
28dc9cebb2
Prepare NamedToUnnamedArgs for PhpParameterReflection change in PHPStan 1.7 (#2305) 2022-05-13 11:21:30 +02:00
Tomas Votruba
3d499125b8
Add Scope refresh for changed or new nodes (#2292) 2022-05-12 08:33:27 +02:00
Tomas Votruba
39e552c4c9
Various little improvement (#2297) 2022-05-12 08:07:50 +02:00
Tomas Votruba
9163864800
Remove DowngradeGeneratedScalarTypesRector as way hacky to particular string solution, better use patching (#2289) 2022-05-11 16:21:59 +00:00
Tomas Votruba
27476c0909
add few fixtures (#2279) 2022-05-10 16:25:25 +00:00
Tomas Votruba
fa073d4408
[CodeQuality] Add SimplifyIfExactValueReturnValueRector (#2278) 2022-05-10 18:08:30 +02:00
Lenny4
4468743419
[FEAT] refacto OrderAttributesRector (#2243)
* [FEAT] refacto OrderAttributesRector to allow strategy instead of specific array

* [DOC] update doc OrderAttributesRector

* [FIX] add option default value

* [REFACTO] create SpecificOrder folder

* [TU] add tu AlphabeticallOrder

* [FIX] use isAlphabetically instead of duplicate function logic

* [FIX] fix phpstan errors

* [FIX] fix NoNestedFuncCallRule ignore rule for OrderAttributesRector
2022-05-09 12:44:14 +02:00
Tomas Votruba
d89c23267c
[automated] Re-Generate Nodes/Rectors Documentation (#2262)
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
2022-05-08 00:27:47 +00:00
Abdul Malik Ikhsan
e97288c13e
[Scoped] Rollback Symplify\SmartFileSystem\SmartFileInfo require at bootstrap.php (#2256) 2022-05-07 13:38:43 +00:00
Abdul Malik Ikhsan
6baafbc5a6
[Scoper] Remove SmartFileInfo and ContainerConfigurator setup on bootstrap.php (#2253)
* [Scoper] Remove SmartFileInfo and ContainerConfigurator setup on bootstrap.php

* add e2e for ContainerConfigurator

* add comment

* define autoload

* define autoload

* move to e2e-diff

* move to e2e-diff
2022-05-07 17:54:44 +07:00
Abdul Malik Ikhsan
81ba0c90bd
[Scoper] Remove PHPStanStubLoader: move to dedicated file to define native classes (#2249)
* [Scoper] Remove PHPStanStubLoader: move to dedicated file to define native classes

* clean up

* load internal early, just in case

* [ci-review] Rector Rectify

Co-authored-by: GitHub Action <action@github.com>
2022-05-07 16:21:59 +07:00
Abdul Malik Ikhsan
1f6c7a6a20
[Scoper] Clean up bootstrap.php: move enum definitions to dedicated file and require in BootstrapFilesIncluder (#2248)
* [Scoper] Clean up bootstrap.php: move enum definitions to dedicated file and require in BootstrapFilesIncluder

* eol

* [ci-review] Rector Rectify

Co-authored-by: GitHub Action <action@github.com>
2022-05-07 08:41:36 +00:00
Tomas Votruba
1c828eea13 work around bug with autoload collistion with custom PHPStan rule test 2022-05-01 20:08:53 +02:00
Abdul Malik Ikhsan
039181ac6c
[DeadCode] Remove RemoveCodeAfterReturnRector, already handled at RemoveUnreachableStatementRector (#2199)
* [DeadCode] Remove RemoveCodeAfterReturnRector, already handled at RemoveUnreachableStatementRector

* clean up
2022-05-01 12:46:52 +07:00
Tomas Votruba
08bb10de6b
[CodeQuality] Add InlineArrayReturnAssignRector (#2183)
* [CodeQuality] Add InlineArrayReturnAssignRector

* enable rule in code-quality

* [ci-review] Rector Rectify

Co-authored-by: GitHub Action <action@github.com>
2022-04-28 14:46:43 +00:00
Tomas Votruba
19284802ae
Decouple aliased object type specifier + updgrade to PHPStan 1.6 (#2170)
* make of use array

* shorten instanceof

* update rules tests union order

* fix array index order

* update anonymous class references

* [skip ci] bump phpstan to 1.6 min
2022-04-26 11:42:01 +02:00
Tomas Votruba
2f5a525e65
Revert adding RemoveNamespaceRector (#2133) 2022-04-23 12:05:46 +02:00
Tomas Votruba
11fdd74f8a
build docs (#2090) 2022-04-17 21:16:39 +02:00
Abdul Malik Ikhsan
b8d0606305
[Doc] Typo fix; autoimportNames -> importNames (#2086) 2022-04-17 06:06:33 +00:00
Tomas Votruba
46d2c00038
[automated] Re-Generate Nodes/Rectors Documentation (#2085)
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
2022-04-17 00:27:12 +00:00
javaDeveloperKid
6cb95c1be3
Update rector_rules_overview.md (#2082)
* Update rector_rules_overview.md

* Update TypedPropertyFromStrictGetterMethodReturnTypeRector.php
2022-04-16 16:31:19 +00:00
Abdul Malik Ikhsan
91b8573525
[PHPStan] Set compatible with upcoming PHPStan 1.6.x with set NodeConnectingVisitor tags (#2014)
* [PHPStan] Set compatible with upcoming PHPStan 1.6.x with set NodeConnectingVisitor tags

* update phpstan 1.6.x-dev and conditional tags

* try require phpstan/phpstan:1.6.x-dev in packages_tests workflow

* remove ->tag call as register in PHPStan conditionalTags

* clean up tweak packages-tests
2022-04-16 00:30:56 +07:00
Tomas Votruba
d7590ea66c
Bump PHPStan, ECS and Symplify to 10.2 + make use of brand new ECSConfig (#2076) 2022-04-14 23:22:08 +02:00
dorrogeray
d30a86313f
[Feature] Add configurable InlineSimplePropertyAnnotationRector for inlining of simple annotations (#2070)
* [Feature] Add configurable InlineSimplePropertyAnnotationRector for inlining of simple annotations

* [Feature] CR fix - use AllowEmptyConfigurableRectorInterface

* [Feature] CR fix - ltrim @ if user provides it in configuration by accident

* [Feature] CR fix - Renaming in tests

Co-authored-by: Jiří Bok <jiri.bok@protonmail.com>
2022-04-14 10:06:16 +02:00
dorrogeray
c509923516
[Feature] Add ParamAnnotationIncorrectNullableRector for fixing incorrect null type in @param (#2069)
Co-authored-by: Jiří Bok <jiri.bok@protonmail.com>
2022-04-14 10:03:45 +02:00
Abdul Malik Ikhsan
363f4083d5
[TypeDeclaration] Make TypedPropertyFromAssignsRector configurable with INLINE_PUBLIC (#2052)
Co-authored-by: GitHub Action <action@github.com>
2022-04-13 18:28:07 +02:00
Tomas Votruba
dd96863b8e
[ci] separate e2e test with changed attributes (#2066) 2022-04-12 17:52:46 +02:00
Tomas Votruba
c35cc97d38
[DX] Add phpVersion() method to RectorConfig + make use of new config class in test configs (#2065)
Co-authored-by: GitHub Action <action@github.com>
2022-04-12 16:33:33 +02:00
Tomas Votruba
8d92c466fd
[DX] Use RectorConfig in configs (#2063)
* use RectorConfig in configs

* update variable name

* remove extra spaces

* apply on configs

* apply on e2e

* update markdown files

* remove extra spaces
2022-04-12 13:46:07 +02:00
Tomas Votruba
51e89c3f32
[docs] Improve first-time contributors docs (#2061) 2022-04-12 10:52:46 +02:00
dorrogeray
a1ac1b6fdf
[Feature] Add ReturnAnnotationIncorrectNullableRector for fixing incorrect null type in @return (#2060)
Co-authored-by: Jiří Bok <jiri.bok@protonmail.com>
2022-04-12 08:52:34 +02:00
dorrogeray
d4c5ec6dfa
[Feature] Add VarAnnotationIncorrectNullableRector for fixing incorrect null type in @var (#2053)
* [Feature] Add VarAnnotationIncorrectNullableRector for fixing incorrect null type in @var

* [Feature] Code review fixes + Applied rector

Co-authored-by: Jiří Bok <jiri.bok@protonmail.com>
2022-04-11 15:02:33 +02:00
Tomas Votruba
0c69df8c24 rebuild docs 2022-04-10 22:05:48 +02:00
Tomas Votruba
0227d24e36
Merge InArrayAndArrayKeysToArrayKeyExistsRector to ArrayKeysAndInArrayToArrayKeyExistsRector with almost identical behavior (#2047) 2022-04-10 19:42:40 +00:00
Tomas Votruba
a2ee46d16e
Refactor SymplifyUselessVariableRector to avoid using PREVIOUS_NODE, use current scope instead (#2045) 2022-04-10 20:12:34 +02:00
Abdul Malik Ikhsan
9b46906e39
[Strict] Add support string|null|false on BooleanInBooleanNotRuleFixerRector (#2035)
* [Strict] Add support string|null|false on BooleanInBooleanNotRuleFixerRector

* fixed 🎉

* test in trat as non empty true as well

* add test for string and null only, tested with both TREAT_AS_NON_EMPTY true and false

* multi union types on DisallowedEmptyRuleFixerRector
2022-04-10 13:01:19 +07:00
Tomas Votruba
76667332cf
[automated] Re-Generate Nodes/Rectors Documentation (#2041)
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
2022-04-10 00:25:21 +00:00
Abdul Malik Ikhsan
be530c5e2f
[Removing] Add RemoveNamespaceRector (#2013)
Co-authored-by: GitHub Action <action@github.com>
2022-04-06 14:32:48 +02:00
Abdul Malik Ikhsan
9f9b29c741
[DowngradePhp54] Add DowngradeThisInClosureRector (#1995) 2022-04-02 17:40:58 +02:00
Abdul Malik Ikhsan
aedfc65a48
[DeadCode] Remove RemoveUnusedAssignVariableRector in favor of RemoveUnusedVariableAssignRector (#1988) 2022-04-01 09:13:23 +02:00
Abdul Malik Ikhsan
a20320d8ca
[Php55] Move GetCalledClassToSelfClassRector + GetCalledClassToStaticClassRector from php 7.4 to 5.5 SetList (#1972) 2022-03-28 11:10:13 +02:00