10874 Commits

Author SHA1 Message Date
Abdul Malik Ikhsan
31f357d6c0
[BetterPhpDocParser] Handle parseString() got ShouldNotHappenException (#5299)
* Fixes #5267

* cs fix

* use true for 3rd parameter is_a

* try use method_exists

* patch in BetterPhpDocParser

* clean

* clean

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

* phpstan

* phpstan

* phpstan

* add test case

* better solution

* phpstan

* phpstan

* clean up

* clean up

* phpstan

* clean up

* final touch: use ObjectType check instead

* better approach

* ensure $phpDocInfo->getVarTagValueNode() instanceof VarTagValueNode as well

* clean up

* use of the VarTagValueNode

* use of the VarTagValueNode

* use of the VarTagValueNode

* [ci-review] Rector Rectify

* phpstan

Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-24 17:46:06 +01:00
Tomas Votruba
13380b5b16
[CodeQuality] Make ArrayThisCallToThisMethodCallRector private class method (#5303) 2021-01-24 12:56:35 +00:00
Tomas Votruba
9652382639
[CodeQuality] Add SingularSwitchToIfRector (#5302) 2021-01-24 11:23:50 +00:00
Tomas Votruba
0e2da52ee8
[TypeDeclaration] Fix return array strict (#5300) 2021-01-24 09:15:16 +00:00
Abdul Malik Ikhsan
2b49b712bd
[Code Coverage] Fixes weekly code coverage generation (#5298)
* [Code Coverage] Fixes weekly code coverage generation Fixes #5297

* rclean up should already handled by GA
2021-01-24 10:07:42 +01:00
github-actions[bot]
ad256edcad
[automated] Re-Generate Nodes/Rectors Documentation (#5296)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-01-24 10:07:23 +01:00
github-actions[bot]
9f9ed8f960
[automated] Re-Generate CHANGELOG.md (#5295)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2021-01-24 10:06:47 +01:00
Abdul Malik Ikhsan
c5132286f8
[PHP 5.6] Handle empty array initialization for Undefined array in AddDefaultValueForUndefinedVariableRector (#5293)
* Add failing test fixture for AddDefaultValueForUndefinedVariableRector

# Failing Test for AddDefaultValueForUndefinedVariableRector

Based on https://getrector.org/demo/62ab1e88-6035-4fa6-87bb-c600dac418b2

* Closes #5260 Fixes #5253

* fixture name

* phpstan

* clean up

* [ci-review] Rector Rectify

Co-authored-by: vladyslavstartsev <17382248+vladyslavstartsev@users.noreply.github.com>
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-23 18:05:33 +01:00
Abdul Malik Ikhsan
92acc4a490
[Printer] Remove AnnotationFormatRestorer and ContentPatcher (#5294) 2021-01-23 18:05:13 +01:00
vladyslavstartsev
10b96a0b97
Make example of ReplaceStringWithClassConstantRector more correct (#5269)
* Make example of ReplaceStringWithClassConstantRector more correct

- `argument position` and `class with constants` are swapped
- `argument position` starts with zero (0), so `1` is the second argument

* also fix example in `Rector`ing class
2021-01-23 14:51:23 +02:00
Abdul Malik Ikhsan
8cd6dbea3b
[TypeDeclaration] Skip ParamTypeDeclarationRector on interface with extends (#5292)
* Add failing test fixture for ParamTypeDeclarationRector

# Failing Test for ParamTypeDeclarationRector

Based on https://getrector.org/demo/56b352cf-6ba5-4fd5-8186-dd071d1e4010

* Fix namespace position

* Update rules/type-declaration/tests/Rector/FunctionLike/ParamTypeDeclarationRector/Fixture/vat_rate.php.inc

Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>

* Update rules/type-declaration/tests/Rector/FunctionLike/ParamTypeDeclarationRector/Fixture/vat_rate.php.inc

Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>

* Update interfaces' names

* Rename vat_rate.php.inc to skip_different_with_interface.php.inc

* Close #5274 Fixes #5270

* cs fix

Co-authored-by: Adamo Crespi <hello@aerendir.me>
2021-01-23 12:38:30 +01:00
Tomas Votruba
d08f63fb1b
[RemovingStatic] Keep static if required by parent contract (#5291) 2021-01-23 09:46:25 +00:00
TomasVotruba
e714623b95 fix cs 2021-01-23 01:15:57 +01:00
Tomas Votruba
87072b597d
PHP 7.4 8 typo (#5290) 2021-01-22 23:11:10 +00:00
TomasVotruba
1aac87f335 [PHP 8.0] Remove useless var 2021-01-22 20:22:51 +01:00
TomasVotruba
442f617031 make sure doc is skipped 2021-01-22 20:14:10 +01:00
Tomas Votruba
7badb6347e
[Nette] Skip constructor on magic template call (#5289)
* Add failing test fixture for TemplateMagicAssignToExplicitVariableArrayRector

# Failing Test for TemplateMagicAssignToExplicitVariableArrayRector

Based on https://getrector.org/demo/cb7a63bb-d6ab-4f83-916e-714531f095bd

* [Nette] Skip constructor on magic template call

* [ci-review] Rector Rectify

Co-authored-by: Richard Kapička <richard@kapicka.cz>
Co-authored-by: rector-bot <tomas@getrector.org>
0.9.15
2021-01-22 20:01:32 +01:00
Tomas Votruba
0dc20048ae
Cleanup too detailed order rules + add TypedPropertyFromStrictConstructorRector (#5288) 2021-01-22 18:47:02 +00:00
Richard Kapička
8b64b7a9c0
ConfigSet: Update nette-31 (#5285) 2021-01-22 18:06:48 +01:00
Tomas Votruba
9cd09e9512
[PHP 8.0] skip alternative arg count (#5283) 0.9.14 2021-01-22 09:37:29 +00:00
Pierre du Plessis
7db7d4e037
Don't skip add \ prefix for function when auto import name enabled (#5280) 2021-01-22 09:24:16 +00:00
Tomas Votruba
1d92bb71cc
[PHP 8.0] Add method call support (#5281)
* [PHP 8.0] Add skip external one

* add method call support

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
0.9.13
2021-01-22 10:16:00 +01:00
Tomas Votruba
3e96fab69f
[PHP 8.0] Add new support to RequireOptionalParamResolver (#5279) 2021-01-22 01:41:09 +00:00
Jarek Jakubowski
f866e25b1f
Fix match without return (#5237) 2021-01-22 01:20:13 +01:00
Tomas Votruba
e90a430bcf
[PHP 8.0] Add OptionalParametersAfterRequiredRector (#5277) 2021-01-22 00:17:43 +00:00
Tomas Votruba
f7fc1ea144
skip presenter on control parent/name remover (#5278) 2021-01-22 01:15:05 +01:00
Tomas Votruba
8b6b1a81e8
misc (#5276)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-21 21:58:26 +01:00
vladyslavstartsev
b7977e5c74
[DoctrineCodeQuality] replace ASC|DESC strings with constants (#5271)
* [DoctrineCodeQuality] replace `ASC`|`DESC` strings with constants

* move class definitions to a string
2021-01-21 18:42:03 +01:00
Abdul Malik Ikhsan
d300cc0464
[Symfony4] Skip ConsoleExecuteReturnIntRector on cast int return (#5275)
* Add failing test fixture for ConsoleExecuteReturnIntRector

# Failing Test for ConsoleExecuteReturnIntRector

Based on https://getrector.org/demo/2ce24767-1f3c-4f0c-b74f-bbea4b441678

* skip duplicated code

* Close #5272 Fixes #5273

* fixture

* ensure parent is return for Int_ cast skip

* ensure parent is return for Int_ cast skip

Co-authored-by: vladyslavstartsev <17382248+vladyslavstartsev@users.noreply.github.com>
2021-01-21 18:41:06 +01:00
Abdul Malik Ikhsan
bf94f4c420
[Performance] Handle PreslashSimpleFunctionRector on Option::AUTO_IMPORT_NAMES => true (#5268)
Co-authored-by: Pierre <pierre@pcservice.co.za>
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-21 14:06:03 +01:00
Tomas Votruba
87494ce3a6
Print only changed docblocks 🎉🎉🎉 (#5251) 0.9.12 2021-01-20 16:17:59 +00:00
Tomas Votruba
85e7f7fa2c
Make remove parent/name only on component, skip form (#5266) 2021-01-20 15:57:49 +00:00
Tomas Votruba
7d001c13b0
Move FlipTypeControlToUseExclusiveTypeRector from type declaration to code-quality-strict, as it might be opinionated and aim at higher level programming (#5265) 2021-01-20 15:24:57 +00:00
Michal Lulco
c6ab3bf015
Added missing symfony/process to composer.json (#5264) 2021-01-20 15:12:17 +01:00
Jan Lohage
8d6f8369f1
NodeFactory: Allow passing a Cast node to createArrayItems (#5263)
Allow passing a Cast node to createArrayItems
2021-01-20 15:12:00 +01:00
TomasVotruba
6dd74ffb89 remove unused sniff 0.9.11 2021-01-20 15:05:20 +01:00
Tomas Votruba
f4eb05998b
extend Nette 3.1 set (#5261) 2021-01-20 13:08:23 +00:00
Abdul Malik Ikhsan
c2c5228199
[TypeDeclaration] Improve FlipTypeControlToUseExclusiveTypeRector : add Nullable support for Assign expr (#5254)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-20 11:41:35 +00:00
Abdul Malik Ikhsan
d5fc2cb8f5
[DeadCode] Skip RemoveUnusedPublicMethodRector on __construct (#5258)
* Add failing test fixture for RemoveUnusedPublicMethodRector

# Failing Test for RemoveUnusedPublicMethodRector

Based on https://getrector.org/demo/48213d30-8e42-4f9f-885b-30906a78970f

#5256

* Close #5257 Fixes #5256

Co-authored-by: Jan Lohage <j2L4e@users.noreply.github.com>
2021-01-20 12:19:11 +01:00
Michal Lulco
f386ccd8ce
Upgrade to Nette 3.1 (#5195) 2021-01-20 12:17:16 +01:00
Tomas Votruba
5e882a711c
Drop php doc info visitor (#5250)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-20 00:36:35 +01:00
Tomas Votruba
34168ff9d8
various cherry picks (#5248) 2021-01-19 23:29:52 +00:00
Tomas Votruba
05356b393a
Getting rid of attribute (#5246)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-19 22:32:28 +01:00
Tomas Votruba
81eeb2771b
Various cherry-pick (#5243)
* [Transform] Add VariableMethodCallToServiceCallRector

* use direct phpdocinfo

* cleanup

* narrow DoctrinePropertyAnalyzer

* misc
2021-01-19 20:39:57 +00:00
Tomas Votruba
4b7f6f4a72
use PhpDocTagRemoer as a service (#5242)
Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-19 19:45:30 +00:00
Tomas Votruba
66d0b61a9d
[Comments] Decouple new package (#5239)
* [Comments] Decopule new package

* fix RemoveNonExistingVarAnnotationRector

* decopule PropertyFetchFinder

* misc

* fix fixed printer

* fix import

* remove dead code

* fix comparing nodes with tokens instead of identical compare

* remove complexity

* decouple IndentCharacterDetector

* [ci-review] Rector Rectify

Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-19 19:11:10 +00:00
Tomas Votruba
133322cc65
cherry pick (#5238)
* misc

* decopule DocBlockManipulator misc

* make use static instnaceof

* add markAsChanged() to PhpDocInfo

* decopule DocBlockTagReplacer

* change static annotation naming to service

* misc
2021-01-19 15:03:26 +00:00
Jarek Jakubowski
477ccbb2ba
Fix parsing JoinTable without table name explicitly set (#5236) 2021-01-19 15:46:38 +01:00
Abdul Malik Ikhsan
6b196a96ea
[TypeDeclaration] Register FlipTypeControlToUseExclusiveTypeRector to type-declaration set (#5223)
Co-authored-by: rector-bot <tomas@getrector.org>
Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
2021-01-19 12:24:48 +01:00
Abdul Malik Ikhsan
14def70268
[PHPStan] Clean up duplicate PHPStan config (#5232)
* [PHPStan] Clean up PHPstan config

* phpstan

* phpstan
2021-01-19 12:19:20 +01:00