1372 Commits

Author SHA1 Message Date
Tomas Votruba
f38dc68649
[Naming] Skip union type to resolve param name (#4742) 2020-12-01 15:57:41 +01:00
TomasVotruba
275ef81062 fix missing deafault replace empty string 2020-12-01 15:00:00 +01:00
Tomas Votruba
2030badc19
[PHP 8.0] Add nette utils strings replace, static fixes (#4741)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-12-01 14:52:24 +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
Abdul Malik Ikhsan
d0cb30f9ed
[DX] Fixes #4724 Filename too long, rename ChangeQuerySetParametersMethodParameterFromArrayToArrayCollectionRector to ChangeSetParametersArrayToArrayCollectionRector (#4729) 2020-11-30 11:11:11 +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
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
dade40765a
trait refactoring (#4718)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-27 22:29:40 +01:00
Tomas Votruba
499d452f99
Various improvements (#4717) 2020-11-27 21:39:42 +01:00
Markus Staab
ae0d38e1f0
added failing ChangeIfElseValueAssignToEarlyReturnRector test, regarding lost comments (#4698) 2020-11-27 17:38:07 +01:00
Markus Staab
04abc7af5c
create LostCommentBeforeElseIf failing test (#4697) 2020-11-27 17:33:16 +01:00
Tomas Votruba
0eb6e29176
drop MinimalVersionChecker, is checked by composer itself (#4715)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-27 17:32:38 +01:00
Markus Staab
972e0457cb
ChangeAndIfToEarlyReturnRector: added a failing testcase for continue-in-foreach (#4696)
* added a failing testcase

* initial try to fix 4693

* fix existing if_in_foreach test with wrong expected result

* Restore if_in_foreach.php.inc

* adusted wrong test expectation of if_in_foreach.php

* use betterNodeFinder->findFirstParentInstanceOf

* fix test expectation in if_in_foreach fixture

* fixed method name which was misleading

* fix variable name

* adjust impl

* Restore if_in_foreach.php.inc

* rm unused use

* fix impl
2020-11-27 16:10:48 +00:00
Markus Staab
fe47bc2cc7
ChangeAndIfToEarlyReturnRector: fix test expectation in if_in_foreach fixture (#4711)
* fix test expectation in if_in_foreach fixture

* fixed method name which was misleading

* fix variable name

* adjust impl
2020-11-27 13:59:56 +00:00
Tomas Votruba
f718d90cd2
remove extra space after declare, if there already is one (#4710) 2020-11-27 12:39:01 +00:00
Tomas Votruba
51ab276d57
[Downgrade PHP 7.1] feature/downgrade iterable pseudo type (#4706)
* [Downgrade PHP 7.1] iterable pseudo-type

* fix PHP version type

* cleanup

* static fixes

Co-authored-by: Norbert Orzechowicz <norbert@orzechowicz.pl>
2020-11-27 12:00:56 +00:00
Markus Staab
74a17fde01
ArrayThisCallToThisMethodCallRector: use betterNodeFinder->findFirstParentInstanceOf() (#4707) 2020-11-27 11:43:53 +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
Abdul Malik Ikhsan
35d8693187
[NetteUtilsCodeQuality] Fixes #4686 Add SubstrMinusToStringEndsWithRector (#4687)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-26 13:33:51 +01:00
Tomas Votruba
8e7c4bfc96 [CI] do not push to forks 2020-11-24 21:30:17 +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
Abdul Malik Ikhsan
a38debb672
[DX] Fixes #4205 Change phpversion from string to php constant int type (#4679)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-24 16:32:49 +01:00
Abdul Malik Ikhsan
1c9cfafdda
[Solid] Fixes #4677 Skip MoveVariableDeclarationNearReferenceRector on multiple usage in Switch -> cases (#4678) 2020-11-23 22:23:44 +01: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
cb57430655
[Renaming] Add renaming support for blade.php templates in Laravel (#4672)
* [CI] fix monorepo split

* naming, add blade.php suffix

* [Renaming] Add class rename support for laravel blade templates

* skip test fixture
2020-11-23 11:35:42 +00:00
Abdul Malik Ikhsan
715b616ada
[Solid] use Variable node type for for MoveVariableDeclarationNearReferenceRector (#4670)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-23 11:40:29 +01:00
Tomas Votruba
131357aac6
[CodingStyle] Fix lowercase misses in importing, decouple ImportSkipper to collector with ClassNameImportSkipVoters (#4665)
* add import doc block test

* [CodingStyle] Decouple ImportSkipper to ClassNameImportSkipVoters

* drop same short namespace check, not used anywhere
2020-11-20 13:37:53 +00:00
Tomas Votruba
26b71cce1d
[Laravel] Improve static to DI set (#4662) 2020-11-20 01:26:04 +01:00
Tomas Votruba
014985e943
[CodingStyle] Add static support to PreferThisOrSelfMethodCallRector (#4660)
* [CodingStyle] Add static support to PreferThisOrSelfMethodCallRector

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-19 12:37:50 +00:00
github-actions[bot]
a791be06c0
[automated] Apply Coding Standard (#4657)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2020-11-19 02:09:31 +01:00
Abdul Malik Ikhsan
f004f290c7
[Solid] Improve MoveVariableDeclarationNearReferenceRector : skip variable with usage in multiple level (#4643)
* [Solid] Improve MoveVariableDeclarationNearReferenceRector : skip variabel with usage in multiple level

* function name and var name

* stop calling parent attribute when previous of parent is an Expression with Assign with same variable

* phpstan

* deep up usage

* deeeeep level

* stop while when previous is Expression with Assign same var

* final touch

* [ci-review] Rector Rectify

* keep comment

* cast isFoundNext

* fixed

* separate method

* [ci-review] Rector Rectify

* clean up fixtures

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-18 21:26:54 +00:00
Tomas Votruba
9e49fe97fe
[PSR-4] autoprefix on namespace add (#4653)
* check

* prepare prefix-name case

* [PSR-4] Fqnize names without name importing

* fixup! [PSR-4] Fqnize names without name importing

* static fixes

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-18 21:25:59 +00:00
Abdul Malik Ikhsan
5989a6c53b
[PHP 7.4] Fixes #4647 Make limit Value in AddLiteralSeparatorToNumberRector configurable (#4648) 2020-11-18 21:38:04 +01:00
Tomas Votruba
c71c73340d
[PSR-4] fix case of missing namespace (#4651) 2020-11-18 21:37:17 +01:00
Abdul Malik Ikhsan
2d9841594f
[CodingStyle] Skip RemoveDoubleUnderscoreInMethodNameRector on first numeric on new name (#4645) 2020-11-18 17:09:42 +01:00
Abdul Malik Ikhsan
1b354f3e59
[CodingStyle] Improve RemoveParamReturnDocblockRector: handle namespaced @param & @return (#4642)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-18 11:02:10 +01:00
Abdul Malik Ikhsan
d788fd051a
[CodingStyle] Skip RemoveDoubleUnderscoreInMethodNameRector when method name only __ (#4640) 2020-11-18 10:57:50 +01:00
Abdul Malik Ikhsan
c58f35a41e
[StrictTypes] Fixes #4429 Add ParamTypeToAssertTypeRector (#4624)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-18 10:56:51 +01:00
Tomas Votruba
870a0f3822
[Laravel 5.8] Add CallOnAppArrayAccessToStandaloneAssignRector, PropertyDeferToDeferrableProviderToRector, MakeTaggedPassedToParameterIterableTypeRector (#4637)
* [Laravel 5.8] Add remember method

* [Laravel] Add PropertyDeferToDeferrableProviderToRector

* [Laravel] Add CallOnAppArrayAccessToStandaloneAssignRector

* [Laravel] Add MakeTaggedPassedToParameterIterableTypeRector

* [CI] changelog weekly only

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-18 01:22:40 +00:00
Norbert Orzechowicz
05688bd36b
[Downgrade PHP 7.1] Class constant visibility (#4633) 2020-11-17 11:45:31 +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
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
Abdul Malik Ikhsan
4c243e1c9c
[Naming] Fixes #4621 : Skip rename when after rename has numeric in first char (#4623) 2020-11-16 13:04:32 +01:00
Abdul Malik Ikhsan
7fcbac3230
[CodeQuality] ForToForeachRector improvement on ArrayDimFetch handling (#4613)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-11-15 17:12:48 +01:00
Tomas Votruba
5e344c7920
[PHPUnit] Add AssertSameTrueFalseToAssertTrueFalseRector (#4614) 2020-11-15 15:09:24 +00:00
Tomas Votruba
aef5b580a6
[PHPUnit 8.0] Replace confusing ReplaceAssertArraySubsetRector with doms plug and play approach (#4611) 2020-11-15 13:30:43 +00:00
Tomas Votruba
d7d4603218
improve SpecificAssertContainsRector for union type (#4610) 2020-11-15 02:41:46 +01:00