10034 Commits

Author SHA1 Message Date
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
Leonardo Losoviz
7a498e328e
Split downgrade sets (#4175)
Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-09-09 10:32:28 +02:00
Bastian Konetzny
ee1894e5f8
Fixed invalid method name in code sample. (#4177) 2020-09-09 10:27:53 +02:00
Leonardo Losoviz
27fa9556d8
Added downgrade rules (#4172)
Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-09-08 17:18:49 +02:00
Leonardo Losoviz
b54a40aa61
[Downgrade PHP 8.0] mixed and static types (#4162)
Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-09-08 16:10:42 +02:00
Abdul Malik Ikhsan
bcb9580353
apply run ecs check-heredoc-nowdoc command to packages and rules directory (#4138) 2020-09-08 15:27:17 +02:00
Leonardo Losoviz
4197899608
Downgrade union type (#4150)
Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-09-08 15:25:38 +02:00
TomasVotruba
bed168b2e7 remove non-existing dir from sonar 2020-09-08 15:06:13 +02:00
Leonardo Losoviz
4eacc84b22
Organize downgrades by PHP version (#4147)
Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-09-08 13:12:38 +02:00
Tomas Votruba
6508aedd13
[Downgrade PHP 8.0] Add union types to doc types (#4082) 2020-09-08 12:00:38 +02:00
Abdul Malik Ikhsan
46e2b450b3
add check markdown github action workflow for fix README.md markdown file (#4134) 2020-09-08 11:41:32 +02:00
Leonardo Losoviz
ffd1e7fbec
Restructure class hierarchy to implement downgrade rules (#4142) 2020-09-08 11:40:56 +02:00
Tomas Votruba
a32b4fed64
add jean85-pretty-version (#4141) 2020-09-08 01:12:41 +00:00
Markus Staab
a03446e139
make EXCLUDE_PATHS work across different OSes (#4128) 2020-09-07 17:55:43 +02:00
Abdul Malik Ikhsan
6e2f798fe2
run ecs markdown-code-format to README.md (#4129) 2020-09-07 17:55:04 +02:00
Tomas Votruba
1a2e9cbb33
static fixes (#4140) 2020-09-07 17:40:46 +02:00
Leonardo Losoviz
a0f99c2c7f
Downgrade arrow functions (#4137)
* Extracted rule into abstract class for reuse

* Implemented rule

* Added rule to downgrade set

* Fixed rector-ci errors

* Fixed cs

* Preserve return type

* Direct assignment of parameters

* Use interface instead of abstract methods

* Moved abstract class under Php72

* Added test for params with type
2020-09-07 15:38:03 +02:00
Leonardo Losoviz
c6203e96d2
Downgrade null coalescing operator (#4135)
* Return `null` to signify no change to the node

* Implemented rector

* Added new rule to downgrade set

* Test requires PHP 7.4

* Wrapped code inside class
2020-09-07 14:50:42 +02:00
Hans-Helge Buerger
d6ff3a96cb
Fix example: exclude directory in config (#4136) 2020-09-07 11:19:24 +02:00
geryguilbon
a57d5b8882
Improved rule FollowRequireByDirRector (#4133) 2020-09-06 20:35:24 +02:00
Leonardo Losoviz
0deb805a31
Commented out vendor locking (#4132) 2020-09-05 12:34:38 +02:00
Leonardo Losoviz
71682d2b52
Abstract downgrade type + Implementation for object type (#4118) 2020-09-04 11:57:12 +02:00
jjthiessen
ff5b60826f
Correct various mysql_* to mysqli_* conversion bugs (#4119)
Co-authored-by: Jonathan Thiessen <jonathan.thiessen@terago.ca>
2020-09-03 20:49:31 +02:00
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 v0.8.6 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) v0.8.5 2020-09-02 21:14:24 +02:00
Tomas Votruba
c1b2824ab4
show command - display loaded sets + fix set provider (#4111) v0.8.4 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) v0.8.3 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>
v0.8.2
2020-09-01 20:04:49 +00:00
TomasVotruba
549bf1a648 allow PHP 8.0 v0.8.1 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>
v0.8.0
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