9963 Commits

Author SHA1 Message Date
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
Tomas Votruba
41a9b63c6f
fix ci (#4057) 2020-08-29 11:03:40 +02:00
dobryy
8321344601
Fix typo in method name that breaks all tests (#4055) 2020-08-29 10:43:18 +02:00
dobryy
d40309963c
[Type Declaration] Create new unit test for ArrayTypeMapper with fixes (#4054)
* Create new unit test for ArrayTypeMapper with fixes

* Fix typo in method name that breaks all tests

* Remove skip too many fixtures to implement the fix for these fixtures as a next PR.
2020-08-29 10:41:19 +02:00
Tomas Votruba
190d7cf616
update ecs (#4048)
* remove array return

* misc
2020-08-28 23:10:00 +02:00
Dmytro Naumenko
41d5f5567f
[TryCatch] Try/Catch with filled Finally can not be dead (#4053) 2020-08-28 23:08:45 +02:00
Dmytro Naumenko
12691991bb
[Code Quality] If the whole concatenated string is longer than 120 chars, skip it (#4052) 2020-08-28 18:08:25 +02:00
Tom Pavelec
36b24b2bfc
fix: swapped naming of camel and pascal cases (#4047) 2020-08-28 18:07:15 +02:00
Chun-Sheng, Li
0a589f9f68
Add AssertResourceToClosedResourceRector rule (#4037)
* Add AssertResourceToClosedResourceRector rule

* Using @source and @see comment annotations
2020-08-28 07:01:40 +02:00
dobryy
f6fba29169
[Type Declaration] The smallest possible fixture fixed ReturnUuid (#4044)
* the smallest possible fixture fixed

* fix default key integer

Co-authored-by: TomasVotruba <tomas.vot@gmail.com>
2020-08-28 07:00:03 +02:00
dobryy
5b4797af85
[Type Declaration] Fix unwrapping of multiple union types (#4043) 2020-08-27 21:05:00 +02:00
Tom Pavelec
dffcae0c82
Fixed some edge cases of creating constant name from value (#4041) 2020-08-27 17:08:49 +02:00
Tomas Votruba
650dcc8ef0
beware reference (#4039) 2020-08-27 12:19:22 +02:00
Tomas Votruba
3220d3d93a
misc (#4036) 2020-08-27 11:06:47 +02:00
Dmytro Naumenko
60aa571c71
Fixed RemoveMissingCompactVariableRector to handle array arguments properly (#4023) 2020-08-27 11:00:46 +02:00
Dmytro Naumenko
7d56c0aad9
Fix variable name resolving for static method calls (#4021)
* Fix variable name resolving for static method calls

* Enhanced error reporting
2020-08-27 10:59:10 +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
Tomas Votruba
dfe158e2da
[DX] Various value objects added (#4034)
* [DX] Add TypeToStaticCall

* [DX] Add ClassConstantRename

* [DX] Add IssetUnsetToMethodCall

* [DX] Add MethodToYield

* drop unamtained shopware sets

* [DX] Add RenamedAnnotationInType

* [DX] Add MethodCallWrap

* [DX] Add RenamedProperty

* [DX] Add StringToClassConstant

* [DX] Add ArgumentSwap

* simplify rename function rector

* [DX] Add RemovedFunctionArgument

* [DX] Add MethodCallToService

* [DX] Add UnprefixedMethodToGetSet

* [DX] Add PseudoNamespaceToNamespaceRector

* [DX] Add FunctionArgumentSwap

* [DX] Add StaticCallToFunction

* [DX] Add ParentCallToProperty

* [DX] Add ParentDependency

* [DX] Add CallWithParamRename

* [DX] Added MethodCallRenameWithAddedArguments

* [DX] Add PropertyToMethodCall

* [DX] Add PropertyToMethodCall

* [rector] [DX] Add PropertyToMethodCall

* [cs] [DX] Add PropertyToMethodCall

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-26 10:54:53 +00:00
Tomas Votruba
b4db31a2ae
[DX] Add ReplacedArgument (#4030) 2020-08-26 00:21:41 +02:00
Tomas Votruba
5cad696c95
[DX] Add AddedArgument (#4029) 2020-08-25 23:25:00 +02:00
Tomas Votruba
c2cfdaeacd
[DX] Add MethodVisibility value object (#4028) 2020-08-25 21:19:12 +02:00
Tomas Votruba
4553ae9579
[DX] Add TypeMethodWrap, RemovedArgument (#4026)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-25 21:05:58 +02:00
Tomas Votruba
44d3ec8b7a
[DX] Add MethodReturnType value object (#4020)
* re-enable rule

* add MethodReturnType value object

* drop sylius deprecated sets, as not maintained for last 2 years
2020-08-25 18:34:49 +00:00
Dmytro Naumenko
a15d2f8ccc
Fixed ClassMethodPropertyFetchManipulator to omit property assign by method call (#4022) 2020-08-25 18:17:43 +02:00
Tomas Votruba
35f61c64b6
[objectize] moving parameter typehint to objects (#4019)
* moving parameter typehint to objects

* rename constnats

* add support for nested configs

* switch to param type value object

* [rector] switch to param type value object

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-25 02:21:00 +02:00
Tomas Votruba
872f13b27d
rename to value object constants (#4018) 2020-08-24 22:37:12 +00:00
Tomas Votruba
c1653070f5
[phpstan] Add rule for complex config (#4015)
* [phpstan] Add ForbiddenComplexArrayConfigInSetRule

* add MethodCallRename value object

* [SymfonyPhpConfig] Add array to value object configuration rule

* apply first MethodCallRename value object
2020-08-24 22:26:14 +00:00
Tomas Votruba
de4748f935
README + recipe improvements (#4017)
* rector-recipe and README improvements

* ci: add generate command test
2020-08-24 21:25:26 +00:00
Tomas Votruba
642cda46bd
phpstan config no array (#4014)
* [compiler] use SmartFileSystem

* cleaning sonar from fixtures
2020-08-23 13:53:19 +00:00
Tomas Votruba
26e9163a10
[phpstan] add rule to prevent array with string keys (#4012)
* [phpstan] Add ForbiddenArrayWithStringKeysRule

* [compiler] use SmartFileSystem
2020-08-23 13:39:26 +00:00
Tomas Votruba
9a88e032a2
[docs] print object configuration (#4010)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-23 12:39:59 +02:00
Tomas Votruba
41b679cb2a
[DX] Replacing arrays with objects (#4008)
* [phpstan] Add forbidden array destruct to prevent array mess

* use ArrayCallable value object

* add OpeningAndClosingSpace

* drop ConstructorInjectionToActionInjectionRector, antipattern

* use value objects

* [rector] use value objects

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-23 09:39:09 +00:00
Tomas Votruba
38c2c11ded
show configuration (#4007)
* show configuration

* [rector] show configuration

* [cs] show configuration

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-22 20:02:50 +00:00
Tomas Votruba
4ef653976f
Fix invalid set reporting (#4006)
* do not use internal rectors

* report invalid set

* remove dashes before number in set name

* [rector] remove dashes before number in set name

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-22 19:27:41 +00:00
TomasVotruba
6f53f55798 fix cs 2020-08-22 19:13:22 +02:00
Tomas Votruba
766853315e
[Naming] Add MakeIsserClassMethodNameStartWithIsRector (#4005) 2020-08-22 19:04:25 +02:00
Tomas Votruba
9164d46a3b
[Naming] Add MakeGetterClassMethodNameStartWithGetRector (#4003)
* [Naming] Add MakeGetterClassMethodNameStartWithGetRector

* [rector] [Naming] Add MakeGetterClassMethodNameStartWithGetRector

* [cs] [Naming] Add MakeGetterClassMethodNameStartWithGetRector

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-22 15:46:09 +00:00
Tomas Votruba
451b638435
Fix lazy command chain removal (#4001) 2020-08-22 15:40:19 +02:00
Tomas Votruba
d75e8011a3
[PHP 7.0] Fix node adding to NonVariableToVariableOnFunctionCallRector (#4000)
Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-22 15:36:09 +02:00
Marek Šimeček
5a342d9545
lazy command failing test (#3881)
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
Co-authored-by: Marek Šimeček <marek.simecek@footshop.cz>
2020-08-22 15:26:35 +02:00
Dmytro Naumenko
fc6e584721
Failing test: Reset in a condition produces a LogicException (#3997) 2020-08-22 15:20:56 +02:00
Tomas Votruba
786095f328
refactoring of variable name counted (#3999)
* fix variable rename scoping

* [rector] fix variable rename scoping

* [cs] fix variable rename scoping

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-22 13:02:55 +00:00
Dmytro Naumenko
04597e9685
Failing test: Multiple resets of the same func in a array (#3998) 2020-08-22 13:03:27 +02:00
dobryy
857fd25168
RenameParamToMatchTypeRector doesn't skip variable that is used in callback function use statement (#3970)
* Include use in rename

* [rector] Include use in rename

* [rector] [rector] Include use in rename

* [cs] [rector] Include use in rename

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-21 17:13:56 +00:00
Tomas Votruba
fd69d845e4
Refactor extra file tests wobbly arrays to typed value objects (#3996) 2020-08-21 13:30:28 +02:00
Tomas Votruba
6a442eddd9
merge CorrectDatetimeEntityPropertyDefaultToConstructorRector to MoveCurrentDateTimeDefaultInEntityToConstructorRector (#3978)
* merge CorrectDatetimeEntityPropertyDefaultToConstructorRector to MoveCurrentDateTimeDefaultInEntityToConstructorRector

* [rector] merge CorrectDatetimeEntityPropertyDefaultToConstructorRector to MoveCurrentDateTimeDefaultInEntityToConstructorRector

* add Throw Expr to docs

Co-authored-by: rector-bot <tomas@getrector.org>
2020-08-21 09:47:44 +00:00
Tomas Votruba
ac4e73b72f
add ConfigShifter to make use of root config parameter override (#3994) v0.7.65 2020-08-20 15:37:13 +02:00
dobryy
afa7456a05
[DX] Architecture rules respect namespace (#3983) 2020-08-20 13:56:36 +02:00
dobryy
21d0f01383
[DX] TemplateAnnotationToThisRenderRector fixture's namespace issue (#3984) 2020-08-20 13:56:06 +02:00