4062 Commits

Author SHA1 Message Date
TomasVotruba
de02a85e3f remove parent class 2021-03-18 00:00:16 +01:00
TomasVotruba
7df115b051 make use of reflection 2021-03-18 00:00:16 +01:00
Tomas Votruba
09a3adb696
Less attributes (#5884)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-17 23:03:49 +01:00
Tomas Votruba
69e66cbf1f
Replace StaticRectorStrings with Stringy class, remove CamelCaseFunctionNamingToUnderscoreRector to avoid naming rules (#5882) 2021-03-17 19:59:18 +00:00
Tomas Votruba
2be6607854
[Reporting] Move missing rector services to single class (#5881) 2021-03-17 19:59:47 +01:00
Tomas Votruba
ea19540a73
[Downgrade 7.2] Fix downgrade from parent native type (#5872)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-17 11:12:39 +01:00
Tomas Votruba
f92c18514a
[DX] Forbid @required annotation (#5869) 2021-03-16 00:49:31 +00:00
Tomas Votruba
683f8319a8
[CI] simplify php linter (#5867)
* [CI] simplify php linter

* [CI] merge code analysis to one

* [docs] remove nodes overview, already in external repository

* remove unused ci job

* [CI] check annotation parser + sync

* [DeadCode] Remove RemoveEmptyAbstractClassRector, not reliable with static-reflection, opionated

* [CI] remove set validation, PHPStan handles this better with PHP

* remove dead-code-strict [skip ci]
2021-03-15 23:44:28 +01:00
TomasVotruba
c27b9e8338 drop symfony-autowire set, used just once internally 2021-03-15 21:04:20 +01:00
TomasVotruba
bcfc808852 merge dead-doc-block to dead-code set 2021-03-15 21:03:11 +01:00
Tomas Votruba
d897902ccf
[Downgrade] Keep better phpdoc type (#5862) 2021-03-15 18:58:04 +01:00
Fonata
b84f76e4e4
Bugfix for SimplifyForeachToArrayFilterRector (#5859) 2021-03-15 17:52:02 +01:00
TomasVotruba
0670f8ee36 merge doctrine-services to doctrine-code-quality 2021-03-14 22:05:32 +01:00
TomasVotruba
3b7e88b3ba drop eab config, just 2 poor rules 2021-03-14 22:04:43 +01:00
Tomas Votruba
751a7453dd
Apply new PHPStan rules from Symplify (#5843)
* apply new PHPStan rules from Symplify

* less directories to speedup CI
2021-03-14 14:11:24 +01:00
Tomas Votruba
634bc0eab8
cleanup (#5839) 2021-03-14 00:59:52 +01:00
TomasVotruba
051a06cbcb remove uuid left-overs 2021-03-14 00:49:58 +01:00
TomasVotruba
fd18aa0547 remove throws method 2021-03-14 00:46:34 +01:00
Tomas Votruba
da12199150
cleanup return docs (#5834) 2021-03-13 16:15:10 +01:00
Tomas Votruba
9beb1da3c0
Move fixture requirement from command line to a test case (#5832) 2021-03-13 15:07:31 +01:00
Tomas Votruba
0acc05cc6e
remove runnable interface, to lower complexity (#5829) 2021-03-13 01:23:22 +00:00
Tomas Votruba
c791f5ed60
[RectorGenerator] Decouple to external package (#5825) 2021-03-12 20:13:27 +01:00
Tomas Votruba
67670e70ad
[DX] move packages from src/tests to single PSR-4 directory (#5824) 2021-03-12 01:21:29 +00:00
Abdul Malik Ikhsan
28e1e1f3f4
[PHP 7.3] Register existing ContinueToBreakInSwitchRector in PHP 5.2 set to PHP 7.3 config set (#5820)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-11 11:58:11 +01:00
Tomas Votruba
2e3a9e7166
improve array-string-class type (#5817) 2021-03-09 23:00:45 +00:00
Tomas Votruba
d94a65dd95
[NodeTypeResolver] Fix array dim fetch return type resolver (#5815) 2021-03-09 18:47:56 +00:00
Tomas Votruba
37268aa9e0
workaround template node (#5812) 2021-03-09 15:49:33 +00:00
Tomas Votruba
7467af9026
add return type class string (#5810) 2021-03-09 11:01:16 +00:00
Tomas Votruba
7f8d0d5af8
misc (#5805) 2021-03-09 00:29:10 +00:00
Tomas Votruba
dc5dfe228b
Fix missing native method static analysis (#5804) 2021-03-08 20:19:45 +00:00
Tomas Votruba
80c4fc8aab
[TypeDeclarationg] Add Tokens iterator to AddArrayReturnDocTypeRector and AddArrayParamDocTypeRector (#5796)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-08 14:52:36 +00:00
Tomas Votruba
8d79b4fb9e
[TypeDeclaration] Improve param by caller type #4 (#5793)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-07 21:07:50 +00:00
Tomas Votruba
b052d46b15
[TypeDeclaration] Improve param by caller type #3 (#5792)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-07 19:37:48 +00:00
Tomas Votruba
ba1444959d
[TypeDeclaration] Improve param by caller type #2 (#5787) 2021-03-07 14:27:17 +00:00
Tomas Votruba
3fea742085
[TypeDeclaration] Improve param by caller types (#5786) 2021-03-06 22:44:43 +01:00
Tomas Votruba
031deda881
[TypeDeclaration] Add AddParamTypeFromCallersRector (#5782) 2021-03-06 21:16:18 +00:00
Abdul Malik Ikhsan
d7592f59ec
[Naming] Register RenameForeachValueVariableToMatchExprVariableRector to naming config set (#5696)
* [Naming] Register RenameForeachValueVariableToMatchExprVariableRector to naming config set

* fix property fetch not from this

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* fix

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* fixture fix

* phpstan

* [ci-review] Rector Rectify

* phpstan

* extract to separate method for collect assigns by name

* adding InflectorSingularResolver service

* skip single prefix and length >= 40

* add failing fixture to skip plural camel case

* use regex to get camel cases

* implemented singularize camel cased

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* phpstan

* handle singular verb news -> new

* [ci-review] Rector Rectify

* fixture fix

* handle has

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* phpstan

* phpstan

* handle left side By

* [ci-review] Rector Rectify

* re-use resolve call

* [ci-review] Rector Rectify

* phpstan

* [ci-review] Rector Rectify

* final touch

* final touch

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* use previous By in the middle

* update $childClassReflection->hasProperty($propertyName)

* [ci-review] Rector Rectify

* catchKeys

* regex fix

* fixture

* [ci-review] Rector Rectify

* try use check array

* Revert "try use check array"

This reverts commit adb9f767f20ea2544e5ccfc9cfe361ecc929912a.

* use files

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-05 11:55:40 +01:00
Tomas Votruba
382f146eaf
Merge CoreRectorInterface (#5762) 2021-03-03 22:28:27 +01:00
Tomas Votruba
c1dab30664
[MockistaToMockery] Drop as mockista is completely dead package (#5758) 2021-03-03 18:40:45 +01:00
Tomas Votruba
c559114715
remove stub loader where not needed (#5757)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-03 17:15:12 +00:00
Tomas Votruba
9f96242e8a
[TypeDeclaration] Remove AbstractTypeDeclarationRector (#5753) 2021-03-03 13:27:16 +01:00
othercorey
bb4b8dcdc6
Add missing CAKEPHP_42 setlist (#5752) 2021-03-03 18:57:21 +07:00
Oliver Nybroe
896a87c631
Change success message (#5745) 2021-03-03 11:22:17 +01:00
Tomas Votruba
92f2c5b3a6
[Nette] Remove AbstractWithFunctionToNetteUtilsStringsRector (#5742)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-03 09:40:03 +00:00
Tomas Votruba
3673e2182c
[StaticReflection] Add OptimizedDirectorySourceLocator to speedup directory analysis (#5727)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-02 23:42:53 +00:00
Tomas Votruba
da5f4a08c8
remove unmatched errors + require string in object types to avoid prefixing of generics objects (#5713) 2021-03-01 00:56:08 +00:00
Tomas Votruba
8c3443b036
[DX] Removing more parent abstract circular classes (#5709)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-28 15:16:17 +00:00
Abdul Malik Ikhsan
a62bb98fe9
[EarlyReturn] Handle Return Parent next if on ChangeAndIfToEarlyReturnRector (#5711)
* Add failing test fixture for ChangeAndIfToEarlyReturnRector

# Failing Test for ChangeAndIfToEarlyReturnRector

Based on https://getrector.org/demo/aef6b329-49b5-4f27-b23e-9e879a0e2e0b

* Closes #5707

* phpstan

* move find boolean and conditions to NodeRepository

* final touch

Co-authored-by: Markus Staab <maggus.staab@googlemail.com>
2021-02-28 16:07:12 +01:00
Tomas Votruba
d737f82d3c
[DX] Add forbidden parent classes (#5705) 2021-02-28 13:53:28 +01:00
Tomas Votruba
4909e63a1d
Make use of static reflection from PHPStan (#5665)
* break test without autoload

* PHPStanServiceFactory - add tests directory as analysed paths

* use ReflectionProvider instead of class_exists

* use native reflections for annotation reader

* use native class and method reflections

* add RectorBetterReflectionSourceLocatorFactory

* add DynamicSourceLocator that is shared by PHPStan and Rector

* use ReflectoinProvider instead of class_exists()

* resolve native ClassMethodReflection

* make AnonymousFunctionFactory use reflection

* [DowngradePHP74] Improve DowngradeCovariantReturnTypeRector

* phsptan: avoid ClassReflection

* ProcessCommand: add file infos to source locator

* [DeadCode] Skip RemoveUnusedPublicMethodRector for test

* remove autolaod from tests

* misc

* remove is_a()

* [CI] enable only few dirs to avoid fails

* misc

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-28 08:47:48 +01:00