776 Commits

Author SHA1 Message Date
Tomas Votruba
52e604c6dd
[scoper] unprefix string classes to match types (#5025) 2020-12-28 23:09:11 +01:00
Tomas Votruba
d4883d44d9
[Prefixed Rector] Add package-scoper approach (#4559) 2020-12-26 00:17:31 +01: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
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
Tomas Votruba
5a47e36b72
Add Visibility consts (#4981) 2020-12-24 23:01:30 +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
Tomas Votruba
61e1ceaf5c
Cover ArrayShape type and other doc nodes (#4967)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-23 22:11:37 +01:00
Tomas Votruba
c5d258e0cc
[Downgrade] Drop ChangePhpVersionInPlatformCheckRector as not useful, paltform check false is good enough (#4939)
* [Downgrade] Drop ChangePhpVersionInPlatformCheckRector as not useful, paltform check false is good enough

* fixup! [Downgrade] Drop ChangePhpVersionInPlatformCheckRector as not useful, paltform check false is good enough
2020-12-22 15:48:25 +00:00
Tomas Votruba
37b3cecda3
Upgrade to php-parser 4.10.4 and PHPStan 0.12.63 (#4926)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-20 22:05:48 +01:00
Tomas Votruba
574c7cd174
[static] Narrow param types, remove duplicated methods (#4921)
* narrow types and other static fixes

* duplicates static fixes

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-20 13:50:55 +01:00
Tomas Votruba
eddb2b29c9
[EarlyReturn] Decouple new rules (#4868) 2020-12-12 16:59:09 +00:00
Tomas Votruba
f197e25793
droping events (#4865)
* drop unused ReportCollector and releted avain chains

* update fixed comma trail downgrade in php-parser

* add post runner interface

* [CodingStyle] Enabe post-inc-dec

* [ci-review] Rector Rectify

* test ci

* bump phpunit

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-12 14:58:47 +00:00
Tomas Votruba
56dedb1786
static fixes (#4864)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-12 14:53:10 +01:00
Tomas Votruba
db5e02e724
static fixes (#4860)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-12 13:08:34 +01:00
Krystian Marcisz
35ceeff106
[Symfony] Split Symfony rules to dedicated namespaces (#4858) 2020-12-11 23:51:20 +01:00
Tomas Votruba
d27997197b
Static updates (#4857) 2020-12-11 18:25:42 +01:00
Leonardo Losoviz
ff2ea86176
Renamed NoParticularNodeRule to ForbiddenNodeRule (#4848)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-11 09:58:51 +01:00
Tomas Votruba
d131d804d9
Bump min PHP version to 7.3 (#4838)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-09 23:25:53 +01:00
Tomas Votruba
c68fd43b65
Bump to Symplify 9 (#4830)
* composer: bump to Symplify 9

* fix cs

* update InputDetector to StaticInputDetector

* add missign symplify/ packages

* remove already included phpstan configs

* [CI] test lowest deps on PHP 7.3, as minimum for Symplify 9

* bump doctrine/inflector and sebastian/diff

* [CI] symplify PHP 7.3 testing
2020-12-09 15:41:23 +00:00
Leonardo Losoviz
7c991a9898
[Downgrade PHP 7.0] Remove param and return types (#4819)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-08 13:02:26 +01:00
Tomas Votruba
ca353017e2
[Utils] Add OnlyOneClassMethodRule (#4814)
* [Utils] Add OnlyOneClassMethodRule

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-07 00:48:01 +00:00
Tomas Votruba
8bfb36d0b2
[Downgrade] [PHP 7.3] Downgrade trailing commas in function calls (#4796)
Co-authored-by: Tommy Quissens <tommy.quissens@storefront.be>
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-05 22:40:10 +01:00
Tomas Votruba
520b8a9a85
[DeadDocBlock] decouple return and param rules (#4782)
* decopule return and parma rules

* enable in CI

* cleanup

* protected class-string vs string
2020-12-05 00:31:05 +00:00
Tomas Votruba
5201e949a1
[PHPStanExtensions] Add ForbiddenMethodCallOnTypeRule + move from docComment and Comments to PhpDocInfo (#4780)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-05 00:22:12 +01:00
TomasVotruba
0f8893bbc2 fix symfony-php-config location 2020-12-01 23:03:47 +01:00
Tomas Votruba
267989bb05
[Docs] Add docblock docs (#4740)
* skip getUser() as the method is final

* drop comment along with removed node, as in other removed nodes

* [docs] add doc block docs
2020-12-01 01:09:50 +00:00
Tomas Votruba
3d721e8ca8
drop symfony\process for single call (#4735) 2020-11-29 18:47:29 +01:00
Tomas Votruba
79f3611dc9
remove ci-detector, make no-progress-bar api compatible with other CI tools (#4734) 2020-11-29 18:37:13 +01:00
Tomas Votruba
d962e3f6b0
[Downgrade] Add composer platform check (#4721) 2020-11-28 00:16:19 +01:00
Tomas Votruba
377c734975
drop old compiler (#4716) 2020-11-27 17:54:14 +01:00
Tomas Votruba
9150af563a
make use symplify/php-doc-parser (#4703)
* make use Symplify/PhpDocParser

* report line

* remove monorepo-builder, not needed anymore

* use php action 2

* fixup! use php action 2
2020-11-27 12:23:25 +00:00
Tomas Votruba
080e5cbe00
use symplify/skipper (#4689) 2020-11-26 23:09:21 +01:00
Tomas Votruba
0993088cda
[SymfonyPhpConfig] Use Symplify package instead + simplify set validation (#4694)
* [SymfonyPhpConfig] Use Symplify package instead

* [SymfonyPhpConfig] Drop forgotten custom-jobs Rectors

* [CI] simplify set validation

* from inline functions to Static class

* cleanup

* decouple rector.php to allow static analysis and coding standards
2020-11-26 16:44:27 +00:00
Tomas Votruba
4c9b816537 fix symplfy/vendor-patches name 2020-11-26 11:32:31 +00:00
Tomas Votruba
2577e66a3b move last migrify package to symplify 2020-11-25 22:40:44 +00:00
Tomas Votruba
0456cc088c
[Docs] Improve rule doc generator to generat rules_overview with categories (#4688)
* numbers

* update ECS config to Symplify 9

* regenerate rules with categorize

* [CI] disable automated rebase, as not working propperly

* update misc
2020-11-25 21:34:34 +00:00
HDVinnie
3fc5163f01
update: drop migrify/php-config-printer for symplify/php-config-printer (#4684)
* update: composer.json

- Package migrify/php-config-printer is abandoned. Using symplify/php-config-printer instead.

* update: migrify to symplify

* update: composer.json

Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>

Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-11-24 16:14:21 +00:00
Tomas Votruba
a7705ed0a5
[Symplify 9] First update + switch to RuleDocGenerator (#4616)
* [composer] bump to Symplify 9

* [Symplify 9] Update phpstan rules

* bump to Symplify 9 BETA2

* update AbstractKernel from Tests to Testing namespace

* decoupling removing node trait

* remove fluent calls

* removing variadic

* [CodingStyle] Improve AnnotateThrowablesRector

* bump deps

* Make use of RuleDocGenerator

* first short

* [DocumentationGenerator] Drop deprecated package, RuleSetGenerator now handles it

* import namespace

* update docs
2020-11-16 17:50:38 +00:00
Tomas Votruba
615f0c4ee4 [composer] allow 8.3.* Symplify deps 2020-11-15 15:16:14 +00:00
Tomas Votruba
2ea43de66d composer: use migrify 0.4 2020-11-14 20:19:55 +00:00
Tomas Votruba
7c3e803416
[Carbon 2] Init (#4595)
* [Carbon] Init new rules

* add ChangeDiffForHumansArgsRector

* [Carbon] Add ChangeCarbonSingularMethodCallToPluralRector

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-13 00:45:58 +00:00
Tomas Votruba
4c6da2c4bf
[Laravel 5.7] Add parent boot rule (#4580)
* move file to templates, to remove confusion in the root

* use stable symplify

* [Laravel] Add AddParentBootToModelClassMethodRector

* [ci-review] Generate Rector & Nodes documentation

* [ci-review] propagate monorepo dependencies

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-11 17:09:57 +00:00
Tomas Votruba
297ec316af
move suffix filesystem 3 (#4540) 2020-11-01 21:31:13 +01:00
Tomas Votruba
c03b66f7cd
move suffix filesystem 2 (#4529)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-01 16:39:04 +01:00
Tomas Votruba
8542a3bcbc
Move from Filesystem rules to FileNode (#4528)
* make MoveServicesBySuffixToDirectoryRector with non-filesystem rector

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Apply coding standards

* fixup! make MoveServicesBySuffixToDirectoryRector with non-filesystem rector

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-31 21:39:09 +00:00