708 Commits

Author SHA1 Message Date
Tomas Votruba
b28b8742fc
use rector-nette with tags (#5924)
* use rector-nette with tags

* redirect Kdyby sets

* use local ParamAnalyzer
2021-03-20 22:16:54 +01:00
Tomas Votruba
cfa61bc2dd
remove PhpDocNodeTransformerInterface overly abstraction; merge AttributeAwarePhpDoc to BetterPhpDocParser (#5920)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-20 16:27:18 +01:00
Tomas Votruba
025e6ed571
[PhpDocParser] Make use of native attributes (#5841)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-19 14:33:58 +00:00
Tomas Votruba
33daf1de2e
fixup (#5897) 2021-03-18 14:29:32 +01:00
TomasVotruba
8685a44ed0 BetterNodeFinder improvements 2021-03-18 12:27:34 +01:00
Tomas Votruba
a389839c5c
[CI] Downgrade Rector to PHP 7.1 + prefix it (#5880)
* [downgrade] simplify to 2 configs

* rename downgrade_packages.sh to downgrade_rector_to_php71.sh

* add test case stub

* [CI] add linter for php code

* [CI] update tagged workflow

* update for covariance

* [ci-review] Rector Rectify

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-18 02:48:44 +01:00
Tomas Votruba
37eb07af6e
move stubs to composer-autoload (#5890)
* move stubs to composer-autoload

* remove duplicate classes

* apply Rector
2021-03-18 02:10:01 +01:00
Tomas Votruba
575131d0e2
[Compiler] Add downgrade-paths command (#5887) 2021-03-18 00:42:12 +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
f92c18514a
[DX] Forbid @required annotation (#5869) 2021-03-16 00:49:31 +00: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
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
721f619a1d
Post moving cleanup (#5827) 2021-03-12 23:52:38 +00:00
Tomas Votruba
157c39aefc
[DX] move src/tests rules from micro-packages to single PSR-4 structure (#5826) 2021-03-12 23:20:25 +01: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
Tomas Votruba
7f8d0d5af8
misc (#5805) 2021-03-09 00:29:10 +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
896ca733dc
cherry-pick downgrade update (#5794) 2021-03-07 21:25:43 +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
ba1444959d
[TypeDeclaration] Improve param by caller type #2 (#5787) 2021-03-07 14:27:17 +00:00
Tomas Votruba
031deda881
[TypeDeclaration] Add AddParamTypeFromCallersRector (#5782) 2021-03-06 21:16:18 +00:00
Tomas Votruba
a63b232eca
cleanup (#5763) 2021-03-03 21:51:04 +00:00
Tomas Votruba
382f146eaf
Merge CoreRectorInterface (#5762) 2021-03-03 22:28:27 +01:00
Tomas Votruba
bfa5416077
drop AbstactCommand, inline (#5761) 2021-03-03 19:34:32 +00:00
Tomas Votruba
0a7ce80f4f
[Renaming] Fix importing of just renamed function (#5755)
Co-authored-by: Michal Lulco <lulco@efabrica.sk>
2021-03-03 12:54:03 +00:00
Tomas Votruba
516b4b94fa
[Defluent] Remove AbstractFluentChainMethodCallRector (#5751) 2021-03-03 12:57:04 +01:00
Tomas Votruba
d5bf66f9cd
[CI] run rules dir by dir to identify static reflection weak sposts (#5720)
* [CI] run rules dir by dir to identify static reflection weak sposts

* [ci-review] Rector Rectify

* consistency

* remove unused property

* add data provider test fixture

* add InvertedIfFactory to lower complexity

* [DeadCode] Skip unused public method if data provider

* misc

* [DeadCode] Do not remove class method if required by parent ocntract

* make use of ContextAnalyzer to find the loop

* narrow dirs one level

* narrow packages

* narrow

* use directly

* narrow

* correct constant name to keep BC

* bump deps

* add version_compare to removed extra params, just to be sure

* do not return function node on unchanged name

* narrow

* add support for multiple variants

* widen

* remove double check [skip ci]

Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-03-02 14:43:36 +01:00
Tomas Votruba
11dab764e6
[PHPStanStaticTypeMapperChecker] Drop as very limited testing benefit, overly protective (#5721) 2021-03-02 11:22:49 +00:00
Tomas Votruba
47743269e8
Removing parent classes (#5714) 2021-03-01 02:28:35 +01: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
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
Tomas Votruba
c7b76c4983
[DX] Narrow wobly strings to strict ObjectType() #2 (#5694)
* use direct call on isObjectTypes()

* make use of ObjectType over strings
2021-02-27 02:13:22 +00:00
Tomas Votruba
cabe032008
[static] Improve types (#5657)
Co-authored-by: Ruud Kamphuis <ruudk@users.noreply.github.com>
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-23 01:25:34 +00:00
Tomas Votruba
5ba33240ca
Bump to Symplify 9.2.1 (#5655) 2021-02-22 20:05:33 +00:00
Tomas Votruba
72d6f1ab86
cleanup unneeded AbstractTemporaryRector methods (#5648) 2021-02-21 23:39:53 +00:00
Tomas Votruba
c609697f14
[TypeDeclarationStrict] Add AddMethodCallBasedStrictParamTypeRector (#5580) 2021-02-17 16:40:29 +01:00
Tomas Votruba
651573a58f
[TypeDeclaration] Add ReturnTypeFromStrictTypedCallRector (#5573) 2021-02-16 16:12:37 +00:00
Tomas Votruba
1d80ef3df6
[TypeDeclaration] Add external types to ParamTypeFromStrictTypedPropertyRector (#5560) 2021-02-15 19:31:53 +00:00
Tomas Votruba
1a45becf74
[Nette] Add false return check to template check (#5535)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-13 23:26:00 +01:00
Tomas Votruba
cd5cc8e12e
[Nette] Add render support to TemplateMagicAssignToExplicitVariableArrayRector, skip render() calls where missing template, now handled by another rule (#5532) 2021-02-13 17:56:58 +00:00
Tomas Votruba
346bacfe19
[Tests] Split main test case and community test case (#5481)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-10 11:57:25 +00:00
Tomas Votruba
7a3f5a8c0a
remove unused RectorClassesProvider (#5482)
* remove unused RectorClassesProvider

* README: remove ci-checkstyle link, marginal topic, to avoid confusion for first readers
2021-02-09 22:43:04 +00:00
Tomas Votruba
e822db8625
moving ArrayPartPhpDocTagPrinterTrait and PrintTagValueNodeTrait to services (#5473) 2021-02-09 14:17:25 +00:00
Tomas Votruba
e0ad0f960f
[Tests] Move from getRectorsWithConfiguration() to provideConfigFileInfo() to make test configs more intuitive (#5468)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-09 15:02:29 +01:00
Tomas Votruba
5e95bbb294
Remove NotifyingNodeRemover, RemovedAndAddedFilesTrait, merge traits to AbstractRector (#5466)
Co-authored-by: kaizen-ci <info@kaizen-ci.org>
2021-02-09 01:52:35 +00:00