Commit Graph

10011 Commits

Author SHA1 Message Date
Tomas Votruba
a127bf16eb
revert [Experimental] Add safe_types option - #3535 (#4120) 2020-09-03 18:02:07 +00:00
TomasVotruba
3da57841db fix cakephp41 set 2020-09-03 19:52:58 +02:00
TomasVotruba
64912f3375 fix cs 2020-09-03 19:47:41 +02:00
TomasVotruba
a1f66b98da fix cakephp41 set 2020-09-03 19:17:31 +02:00
TomasVotruba
7214d83d9a fix inlined value object 2020-09-03 15:56:52 +02:00
Julian Pollmann
bdb3750948
FixMissing Ruleset does not throw SetNotFoundException (#4117) 2020-09-03 15:55:13 +02:00
Abdul Malik Ikhsan
8604515b74
Fixes #3448 : Fixes relative path link on dump-rectors generate class link documentation (#4115)
* Fixes #3448 : Fixes relative path link on dump-rectors generate class link documentation

Signed-off-by: Abdul Malik Ikhsan <samsonasik@gmail.com>

* ensure use ltrim to remove existing ./ prefix if any

* verify deep directory with /

* run composer docs
2020-09-03 11:45:53 +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
740ccda385
[CodingStyle] Drop SimplifyBoolIdenticalTrueRector, does not bring expected value (#4113) 2020-09-02 20:12:58 +00:00
Tomas Votruba
57cc6c31ce
show set path in PHAR (#4112) 2020-09-02 21:14:24 +02:00
Tomas Votruba
c1b2824ab4
show command - display loaded sets + fix set provider (#4111) 2020-09-02 17:26:33 +02:00
Adamo Crespi
8311a55573
Fix #4109: Require webmozart/assert. (#4110) 2020-09-02 16:03:50 +02:00
Leonardo Losoviz
761b4b2e88
Added "Rector Configuration" section (#4107) 2020-09-02 15:40:29 +02:00
Tomas Votruba
41121a94f0
add ActiveRectorsProvider, fix reporting 0 rules registered (#4106) 2020-09-02 12:54:11 +00:00
Abdul Malik Ikhsan
99588fedff
remove leftover generated file rector-temp-phpstan103667.neo (#4104) 2020-09-02 12:13:21 +00:00
Abdul Malik Ikhsan
9465173276
Fixes #3930 : TypedPropertyRector should not remove DocBlock comment when it specifies the values contained in an array (#4102) 2020-09-02 14:01:45 +02:00
Abdul Malik Ikhsan
108c6fd52f
Typo fix: NESTED_STIRNGS to NESTED_STRINGS (#4101)
Signed-off-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
2020-09-02 11:56:12 +02:00
Chun-Sheng, Li
471e820d4e
Add self call fixtures for AssertResourceToClosed (#4103) 2020-09-02 11:53:55 +02:00
Tomas Votruba
83e2db04d8
[CodingStyle] Skip annotation var on already set mixed[] array (#4100)
* [CodingStyle] Skip big constants for var

* skip mixed[] var constant, on purpose

* [rector] skip mixed[] var constant, on purpose

Co-authored-by: rector-bot <tomas@getrector.org>
2020-09-01 20:04:49 +00:00
TomasVotruba
549bf1a648 allow PHP 8.0 2020-09-01 21:13:54 +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
Leonardo Losoviz
02e703b9b9
Configurable downgrade (#4099) 2020-09-01 18:12:01 +02:00
Chun-Sheng, Li
020c7b82b0
[PHPUnit] Add self call fixtures for AssertEqualsToSame rule (#4098) 2020-09-01 18:11:30 +02:00
Abdul Malik Ikhsan
3d2a35d63e
Fixes #4013 ConsoleExecuteReturnIntRector ignores already type casted variable (#4095)
* #4013: Don't force type hint if already forced.

* Fixes #4013 ConsoleExecuteReturnIntRector ignores already type casted variable

Signed-off-by: Abdul Malik Ikhsan <samsonasik@gmail.com>

* remove no expected change already casted variable fixture

Signed-off-by: Abdul Malik Ikhsan <samsonasik@gmail.com>

* remove unneded $hasReturn fill on check node->expr instanceof Int_

Co-authored-by: Aerendir <hello@aerendir.me>
2020-09-01 15:57:00 +02: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
Abdul Malik Ikhsan
cf1725fa6f
Typo fix: allowDevDependnecies to allowDevDependencies (#4093)
Signed-off-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
2020-09-01 11:37:21 +02:00
Alister Bulman
9fb4ff339d
Replace types with container access from fe72e003e. fixes #4090 (#4092) 2020-09-01 11:37:01 +02:00
Tomas Votruba
7256dbe667
symplify fixes (#4088)
* notify param/return doc changes

* prevent array doc override
2020-08-31 20:32:33 +00:00
TomasVotruba
0d2f79710c fix phar release 2020-08-31 11:35:01 +02:00
Tomas Votruba
b281fb1260
StaticCall to MethodCall (#4085)
* drop MessageAsArrayRector, as only rule in guzzle

* [Transform] Move StaticCallToMethodCallRector to Transform

* merge FacadeStaticCallToConstructorInjectionRector to StaticCallToMethodCallRector

* add ArrayArgumentToDataProvider

* [Transform] Move PropertyAssignToMethodCallRector to Transform
2020-08-31 08:48:14 +00:00
Tomas Votruba
082f1c6294
[Transform] Move StaticCallToMethodCallRector to Transform (#4084)
* drop MessageAsArrayRector, as only rule in guzzle

* [Transform] Move StaticCallToMethodCallRector to Transform
2020-08-31 00:26:25 +00:00
Tomas Votruba
df6e083324
drop MessageAsArrayRector, as only rule in guzzle (#4083) 2020-08-31 00:16:12 +00:00
Tomas Votruba
042f08f71b
Drop YAML config support (#4081)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-30 23:29:39 +02:00
Tomas Votruba
3a7d197b34
update FuncNameToStaticCallName to FuncCallToStaticCall (#4080) 2020-08-30 20:12:49 +00:00
dobryy
4e91b78c7b
[Naming] Rename the rule to make it correspond with what rule does (#4076)
* [Naming] Rename the rule to make it correspond with what rule does

* [Naming] Update doc
2020-08-30 21:01:33 +02:00
Tomas Votruba
3d03ec4beb
Removing single-rule elastic package set, merge Decomplex set to CodingStyle, merge FrameworkMigration to NetteToSymfony (#4079)
* drop elasticsearch-dsl50, used for single change, unmaintained

* [CodingStyleAdvanced] Move UseMessageVariableForSprintfInSymfonyStyleRector from single-rule set Decomplex to CodingStyleAdvanced

* merge FrameworkMigration with 1 class to NetteToSymfony

* [Transform] Move ServiceGetterToConstructorInjectionRector to Transform set

* [Transform] Move ReplaceParentCallByPropertyCallRector to Transform package

* [Transform] Move StaticCallToFunctionRector to Transform

* update docs

* [Transform] Move NewToStaticCallRector to Transform
2020-08-30 18:48:37 +00:00
Tomas Votruba
4584359f96
[Transform] Move FuncCallToMethodCallRector to Transform category (#4077) 2020-08-30 19:59:59 +02:00
Tomas Votruba
989c3f4168
[Transform] Move HelperFunctionToConstructorInjectionRector to Transform package (#4074)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-30 18:55:16 +02:00
Tomas Votruba
e698e83687
[Transform] Decouple new set that changes nodes (#4073)
* [Transform] Move PropertyToMethodRector from Generic to Transform category

* move AbstractIsAbleRector to Generic

* [Transform] Move MethodCallToPropertyFetchRector from Generic to Transform

* [Transform] Move MethodCallToStaticCallRector from Generic to Transform

* [Transform] Move MethodCallToAnotherMethodCallWithArgumentsRector from Generic to Transform
2020-08-30 15:47:36 +02:00
geryguilbon
5d521b4d9f
BUGFIX: Correction of parsing error while executing command 'composer complete-check' (#4072) 2020-08-30 13:12:21 +00:00
Tomas Votruba
2a6df65a5b
Fix static class call (#4068)
* [CodingStyle] Add static call case to alias removal

* handle static call class alias remove

* [rector] handle static call class alias remove

* [cs] handle static call class alias remove

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-30 12:58:34 +00:00
Tomas Votruba
3226d2d36c
naming (#4070) 2020-08-30 14:56:39 +02:00
Tomas Votruba
ff6d6571e6
[Order] Add abstract class, check for changed order and move category to Class_, to prevent minus types (#4069)
* [Order] report applied rule only on change

* add AbstractConstantPropertyMethodOrderRector, use explicit Class_ and Trait_ over minus

* update docs

* add PropertyNameRankAndPosition value object

* static fixes

* add ClassMethodRankeable and RankeableInterface, to get rid of arrays

* add PropertyRankeable

* add ClassConstRankeable

* add sortByRanksAndGetNames()

* [rector] add sortByRanksAndGetNames()

* [cs] add sortByRanksAndGetNames()

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-30 12:45:03 +00:00
Tomas Votruba
55c45b8c2b
fix return void (#4067) 2020-08-30 07:55:32 +00:00
Tomas Votruba
7312185dc3
fix return type for yield from (#4066) 2020-08-30 06:57:43 +00:00
Tomas Votruba
f8b485305f
Add multiple annotation support on class (#4064)
* add test case for #3230

* position

* add support for multi doc annotations

* [rector] add support for multi doc annotations

* [cs] add support for multi doc annotations

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-29 23:12:20 +00:00
Tomas Votruba
4a2ba04b05
report @var changes (#4063) 2020-08-29 20:18:32 +02:00
Tomas Votruba
6b39193992
report doc changes (#4060) 2020-08-29 18:18:24 +02:00
Tomas Votruba
07708488a2
Fix dump rectors (#4059)
* fix missing Whatever rector

* [rector] fix missing Whatever rector

* [cs] fix missing Whatever rector

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-29 14:43:32 +00:00
Tomas Votruba
351e59fa3b
Fix array type (#4058)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-29 16:20:27 +02:00