214 Commits

Author SHA1 Message Date
Tomas Votruba
f672eace0e
[DX] Add init-recipe command to create recipe config in root (#4789)
* [DX] Add init-recipe command to initlaize recipe

* update docs
2020-12-05 13:20:13 +00:00
Tomas Votruba
1f56646989
PHPStan rule decouple to Symplify (#4786)
* use ForbiddenMethodCallOnTypeRule from symplify

* fixup! use ForbiddenMethodCallOnTypeRule from symplify

* merge CommentCombiner to CommentsMerger
2020-12-05 11:41:55 +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
Abdul Malik Ikhsan
4087029cb9
[BetterStandardPrinter] Fixes #4691 Donot convert string literal comment (#4727)
* [BetterStandardPrinter] Fixes #4691 Donot change convert string literal comment

* handle spacing

* [ci-review] Rector Rectify

* fix conflict

* [ci-review] Rector Rectify

* try --debug

* Trigger notification

* phpstan

* phpstan

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-30 09:51:11 +00:00
TomasVotruba
0b3f6446f3 remove duplicated rule in phpstan.neon 2020-11-29 19:00:26 +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
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
Tomas Votruba
da6d703687
Improve Blade class renames (#4676)
* [Console] Use single point of command naming

* use blade in process command

* filter out blade templates from PHP files

* make test process blade as non php file

* add failing test

* remove duplicated tests

* rename php to php.inc suffix to make it skip to CI tools

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-23 19:16:48 +00:00
Tomas Votruba
a6bec3d07e
remove RequireClassTypeInClassMethodByTypeRule (#4634) 2020-11-17 12:22:53 +01:00
Tomas Votruba
eeec7d8cb9
rename to RequireClassTypeInClassMethodByTypeRule (#4632) 2020-11-17 02:24:39 +01:00
github-actions[bot]
a1f6027821
[automated] Apply Coding Standard (#4631)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-11-17 01:57:48 +01:00
Tomas Votruba
661b2f0a65
[Symplify 9] Follow up + phpstan rules tidying (#4625)
* improve static

* improve phpstan rules

* [PHPStanExtensions] Drop CheckCodeSampleBeforeAfterAlwaysDifferentRule, already part of domain in CodeSample

* cleanup
2020-11-16 23:32:24 +00:00
Tomas Votruba
3b1e31ef8c
[docs] add 10 more relevant node construction examples (#4615) 2020-11-16 20:48:06 +01: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
3940e42d25 rector update 2020-11-05 02:01:47 +01:00
Tomas Votruba
5147844615
change RenameSpecFileToTestFileRector filesystem to normal one (#4525) 2020-10-31 16:20:30 +00: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
34b4d10ea2
[docs] more node cleanup (#4519)
* [TypeDeclaration] Add better return type coverage

* drop less common node snippets
2020-10-30 21:58:39 +00:00
Tomas Votruba
489efd1adf
[docs] add command for used node stats + simplify node docs, so it uses most needed examples over are nodes (e.g. /=) (#4518) 2020-10-30 22:13:56 +01:00
Tomas Votruba
2c120e283e
Inform about useless second part in tests fixture, after -----, if it is identical (#4514)
* embed skip fixture of same before/after

* [Testing] Add exception on identical second half of the fixture, that should not change

* [ci] use composer 2 for code_analysis

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-30 13:56:55 +00:00
Abdul Malik Ikhsan
449801e1f3
Add regex uri to regex constant (#4504)
Co-authored-by: Jan Lohage <j2L4e@users.noreply.github.com>
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-29 19:04:33 +01:00
Tomas Votruba
e845d7cea8
[DoctrineCodeQuality] Add ImproveDoctrineCollectionDocTypeInEntityRector (#4442)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-18 18:29:35 +02:00
Abdul Malik Ikhsan
63615f4197
[PHPStan] Fixes #4433 Add CheckCodeSampleBeforeAfterAlwaysDifferentRule (#4439) 2020-10-18 14:14:55 +02:00
Tomas Votruba
8af70b5ac0
[Defluent] Refactoring to multiple rules (#4400)
* [Defluent] Refactoring to multiple rules

* [Defluent] Decouple defluent-only set, it deserved to have own domain

* cleanup

* [rector] cleanup

* [cs] cleanup

* fixup! cleanup

* static fixes

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-14 04:24:29 +00:00
Tomas Votruba
cb991af9c6
hotfix mysql connection resolving (#4399) 2020-10-12 21:06:24 +02:00
Tomas Votruba
01514ab9a8
[SimplePhpDocParser] Add README + getParam*() helper methods (#4393) 2020-10-11 16:17:43 +02:00
TomasVotruba
40db4ee347 static fixes 2020-10-11 00:55:28 +02:00
Tomas Votruba
a8f55f339f
[DX] Update dump nodes to not-use symfony style (#4356)
* [DX] Update dump nodes to not-use symfony style

* [rector] [DX] Update dump nodes to not-use symfony style

* [cs] [DX] Update dump nodes to not-use symfony style

Co-authored-by: rector-bot <tomas@getrector.org>
2020-10-05 09:29:07 +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
Abdul Malik Ikhsan
ae816c2c3d
Fixes #4337 : Make Option::SKIP works again with ParameterProvider (#4339) 2020-10-01 18:55:10 +02:00
Tomas Votruba
7aad4bbf2f
[PHPStan] Enable regex constant rule (#4279) 2020-09-23 11:16:40 +02:00
Tomas Votruba
d9dd72cd6c
[DOC] Add more spaces between node code samples (#4271) 2020-09-22 15:46:02 +02:00
Tomas Votruba
a73fc88add
[Docs] update docs with node examples (#4269) 2020-09-22 11:27:44 +02:00
Marek Šimeček
cace25434f
[Docs] Update node docs with examples how to create them - part 2 (#4261)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-21 22:45:35 +02:00
Tomas Votruba
52ccfc0527
[DX] move Nette FileSytem to SmartFileSystem DI (#4262)
* move Nette FileSytem to SmartFileSystem DI

* move Symfony FileSytem to SmartFileSystem

* [ci] run rector diretly, without composer wrap
2020-09-19 09:27:29 +00:00
Marek Šimeček
e0cb8c228b
node docs (#4259) 2020-09-18 16:06:24 +02:00
Tomas Votruba
3c67d23c0e
[Docs] Fixup (#4257)
* fix cs

* misc

* [rector] misc

Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-18 10:28:44 +00:00
Tomas Votruba
2243583537
[Docs] update docs and type check (#4241) 2020-09-18 11:50:55 +02:00
Igor
a3c9dabdf6
Fix PHPStan constants issues (#4248) 2020-09-17 21:24:34 +02:00
dobryy
4e04d96b9c
[DX] PHPStan rule to check getNodeTypes() return classes of PhpParser\Node (#4210)
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2020-09-12 23:14:31 +00:00
dobryy
4fee8c6773
[DX] PHPStan rule to check, that value objects do not have value object suffix (#4206)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-13 01:08:21 +02:00
dobryy
28a55c973e
[DX] Add Rule that checks that Rule + value object have same starts (#4202)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-12 23:19:08 +02:00
dobryy
a6444fb801
[DX] Configurable rule must have configure code sample, and vice versa (#4174)
* [DX] Configurable rule must have configure code sample, and vice versa

* Add ConfiguredCodeSample

* heredocs

* code sample

* fix class

* drop AbstractConfigurableMatchTypeRector

Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-09-11 11:21:48 +02:00
dobryy
f69ea0e023
[Naming] Rename foreach value variable to match method return type (#4130)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-09 10:52:43 +02:00
dobryy
4ca8148453
[DX] Add rule to check "Tests" in namespace for *Test.php files (#4114) 2020-09-03 10:56:19 +02:00
Tomas Votruba
7ac228c638
[CI] Add type-declaration set (#4089)
* [CI] Add type-declaration set

* [rector] [CI] Add type-declaration set

* [cs] [CI] Add type-declaration set

* skip nullable void

* add anonymous parent/interface support

* refactor MultiExceptionCatchRector to use Catch_ over integers

* type fixes

* fix unoin array type override

* remove unused test cases

* drop overcomplicated InlineValidationRulesToArrayDefinitionRector

* skip assign on var

* [rector] skip assign on var

* [cs] skip assign on var

* [rector] [cs] skip assign on var

* skip assign on var

* fixes

* [rector] fixes

* [cs] fixes

Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-01 17:56:30 +00:00
dobryy
95bbb3063c
[DX] Add rule to check not "Tests" namespace outside "tests" directory (#4091)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-01 11:37:59 +02:00
Tomas Votruba
351e59fa3b
Fix array type (#4058)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-29 16:20:27 +02:00
Tomas Votruba
650dcc8ef0
beware reference (#4039) 2020-08-27 12:19:22 +02:00
Tomas Votruba
dbda0beee8
[DX] Last value objects (#4035)
* [DX] Add CallToFluent

* [DX] Add ArrayToFluentCall

* [DX] Add FactoryMethod
2020-08-26 14:25:28 +00:00