-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: support for PHP 8.2 * [TASK] ECS * [TASK] ECS, Rector * [TASK] PHPStan * [TASK] GitHub workflow * [TASK] fix functional tests and codestyle * chore: add gitignore * Update tests.yml * chore: update extensions * chore: change php version * chore: update workflow --------- Co-authored-by: thomas.layh <[email protected]> Co-authored-by: Thomas Layh <[email protected]>
- Loading branch information
1 parent
7d3b4b9
commit 92b439a
Showing
31 changed files
with
333 additions
and
588 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,15 @@ | ||
parameters: | ||
ignoreErrors: | ||
ignoreErrors: | ||
- | ||
message: "#^Anonymous variables in a (.*) property fetch can lead to false dead property\\. Make sure the variable type is known$#" | ||
count: 2 | ||
path: ../Classes/Controller/FeUserController.php | ||
|
||
- | ||
message: "#^There are 2 way to get (.*) value: public property and getter now - pick one to avoid variant behavior\\.$#" | ||
count: 3 | ||
path: ../Classes/Domain/Model/Product.php | ||
|
||
- | ||
message: "#^Anonymous variables in a (.*) property fetch can lead to false dead property\\. Make sure the variable type is known$#" | ||
path: ../Classes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector; | ||
use Rector\CodeQuality\Rector\Isset_\IssetOnPropertyObjectToPropertyExistsRector; | ||
use Rector\CodingStyle\Rector\PostInc\PostIncDecToPreIncDecRector; | ||
use Rector\Config\RectorConfig; | ||
use Rector\DeadCode\Rector\Cast\RecastingRemovalRector; | ||
use Rector\DeadCode\Rector\Property\RemoveUnusedPrivatePropertyRector; | ||
use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector; | ||
use Rector\Naming\Rector\ClassMethod\RenameVariableToMatchNewTypeRector; | ||
use Rector\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchMethodCallReturnTypeRector; | ||
use Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector; | ||
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector; | ||
use Rector\Set\ValueObject\SetList; | ||
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector; | ||
|
||
return static function (RectorConfig $rectorConfig): void { | ||
$rectorConfig->paths( | ||
[ | ||
__DIR__ . '/../Classes', | ||
__DIR__ . '/../Tests', | ||
__DIR__ . '/rector-8_1.php', | ||
] | ||
); | ||
|
||
$rectorConfig->import(SetList::PHP_82); | ||
|
||
$rectorConfig->rule(TypedPropertyFromStrictConstructorRector::class); | ||
|
||
$rectorConfig->importNames(false); | ||
$rectorConfig->autoloadPaths([__DIR__ . '/../Classes']); | ||
$rectorConfig->cacheDirectory('.cache/rector/upgrade_8-2/'); | ||
$rectorConfig->skip( | ||
[ | ||
RecastingRemovalRector::class, | ||
PostIncDecToPreIncDecRector::class, | ||
FinalizeClassesWithoutChildrenRector::class, | ||
ChangeAndIfToEarlyReturnRector::class, | ||
|
||
IssetOnPropertyObjectToPropertyExistsRector::class, | ||
FlipTypeControlToUseExclusiveTypeRector::class, | ||
RenameVariableToMatchNewTypeRector::class, | ||
AddLiteralSeparatorToNumberRector::class, | ||
RenameForeachValueVariableToMatchMethodCallReturnTypeRector::class, | ||
] | ||
); | ||
|
||
$rectorConfig->rule(RemoveUnusedPrivatePropertyRector::class); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector; | ||
use Rector\CodeQuality\Rector\Isset_\IssetOnPropertyObjectToPropertyExistsRector; | ||
use Rector\CodingStyle\Rector\PostInc\PostIncDecToPreIncDecRector; | ||
use Rector\Config\RectorConfig; | ||
use Rector\DeadCode\Rector\Cast\RecastingRemovalRector; | ||
use Rector\DeadCode\Rector\Property\RemoveUnusedPrivatePropertyRector; | ||
use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector; | ||
use Rector\Naming\Rector\ClassMethod\RenameVariableToMatchNewTypeRector; | ||
use Rector\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchMethodCallReturnTypeRector; | ||
use Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector; | ||
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector; | ||
use Rector\Set\ValueObject\SetList; | ||
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector; | ||
|
||
return static function (RectorConfig $rectorConfig): void { | ||
$rectorConfig->paths( | ||
[ | ||
__DIR__ . '/../Classes', | ||
__DIR__ . '/../Tests', | ||
__DIR__ . '/rector-8_2.php', | ||
] | ||
); | ||
|
||
$rectorConfig->import(SetList::PHP_82); | ||
|
||
$rectorConfig->rule(TypedPropertyFromStrictConstructorRector::class); | ||
|
||
$rectorConfig->importNames(false); | ||
$rectorConfig->autoloadPaths([__DIR__ . '/../Classes']); | ||
$rectorConfig->cacheDirectory('.cache/rector/upgrade_8-1/'); | ||
$rectorConfig->skip( | ||
[ | ||
RecastingRemovalRector::class, | ||
PostIncDecToPreIncDecRector::class, | ||
FinalizeClassesWithoutChildrenRector::class, | ||
ChangeAndIfToEarlyReturnRector::class, | ||
|
||
IssetOnPropertyObjectToPropertyExistsRector::class, | ||
FlipTypeControlToUseExclusiveTypeRector::class, | ||
RenameVariableToMatchNewTypeRector::class, | ||
AddLiteralSeparatorToNumberRector::class, | ||
RenameForeachValueVariableToMatchMethodCallReturnTypeRector::class, | ||
] | ||
); | ||
|
||
$rectorConfig->rule(RemoveUnusedPrivatePropertyRector::class); | ||
}; |
Oops, something went wrong.