Skip to content

Commit 7ba3da3

Browse files
Remove AddOverrideAttributeToOverriddenMethodsRector from PHP 8.3 and polyfill sets (#8321)
Co-authored-by: GitHub Action <actions@github.com>
1 parent 0381177 commit 7ba3da3

4 files changed

Lines changed: 3 additions & 20 deletions

File tree

‎config/set/php-polyfills.php‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use Rector\Php80\Rector\NotIdentical\StrContainsRector;
1212
use Rector\Php80\Rector\Ternary\GetDebugTypeRector;
1313
use Rector\Php83\Rector\BooleanAnd\JsonValidateRector;
14-
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
1514
use Rector\Php84\Rector\Class_\DeprecatedAnnotationToDeprecatedAttributeRector;
1615
use Rector\Php84\Rector\Foreach_\ForeachToArrayAllRector;
1716
use Rector\Php84\Rector\Foreach_\ForeachToArrayAnyRector;
@@ -34,7 +33,6 @@
3433

3534
// PHP 8.3
3635
JsonValidateRector::class,
37-
AddOverrideAttributeToOverriddenMethodsRector::class,
3836

3937
// PHP 8.4
4038
ForeachToArrayAllRector::class,

‎config/set/php83.php‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,12 @@
66
use Rector\Php83\Rector\BooleanAnd\JsonValidateRector;
77
use Rector\Php83\Rector\Class_\ReadOnlyAnonymousClassRector;
88
use Rector\Php83\Rector\ClassConst\AddTypeToConstRector;
9-
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
109
use Rector\Php83\Rector\FuncCall\CombineHostPortLdapUriRector;
1110
use Rector\Php83\Rector\FuncCall\DynamicClassConstFetchRector;
1211
use Rector\Php83\Rector\FuncCall\RemoveGetClassGetParentClassNoArgsRector;
1312

1413
return static function (RectorConfig $rectorConfig): void {
1514
$rectorConfig->rules([
16-
AddOverrideAttributeToOverriddenMethodsRector::class,
1715
AddTypeToConstRector::class,
1816
CombineHostPortLdapUriRector::class,
1917
RemoveGetClassGetParentClassNoArgsRector::class,

‎rules/Php83/Rector/ClassMethod/AddOverrideAttributeToOverriddenMethodsRector.php‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
use Rector\Rector\AbstractRector;
3030
use Rector\ValueObject\MethodName;
3131
use Rector\ValueObject\PhpVersionFeature;
32-
use Rector\ValueObject\PolyfillPackage;
3332
use Rector\VersionBonding\Contract\MinPhpVersionInterface;
34-
use Rector\VersionBonding\Contract\RelatedPolyfillInterface;
3533
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
3634
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
3735

@@ -40,7 +38,7 @@
4038
*
4139
* @see \Rector\Tests\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector\AddOverrideAttributeToOverriddenMethodsRectorTest
4240
*/
43-
final class AddOverrideAttributeToOverriddenMethodsRector extends AbstractRector implements MinPhpVersionInterface, RelatedPolyfillInterface, ConfigurableRectorInterface
41+
final class AddOverrideAttributeToOverriddenMethodsRector extends AbstractRector implements MinPhpVersionInterface, ConfigurableRectorInterface
4442
{
4543
/**
4644
* @api
@@ -228,11 +226,6 @@ public function provideMinPhpVersion(): int
228226
return PhpVersionFeature::OVERRIDE_ATTRIBUTE;
229227
}
230228

231-
public function providePolyfillPackage(): string
232-
{
233-
return PolyfillPackage::PHP_83;
234-
}
235-
236229
/**
237230
* @param ClassReflection[] $parentClassReflections
238231
*/

‎src/Bridge/SetProviderCollector.php‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,10 @@
2323
final readonly class SetProviderCollector
2424
{
2525
/**
26-
* @var SetProviderInterface[]
26+
* @param SetProviderInterface[] $setProviders
2727
*/
28-
private array $setProviders;
29-
30-
/**
31-
* @param SetProviderInterface[] $extraSetProviders
32-
*/
33-
public function __construct(array $extraSetProviders = [])
28+
public function __construct(private array $setProviders = [])
3429
{
35-
$this->setProviders = $extraSetProviders;
3630
}
3731

3832
/**

0 commit comments

Comments
 (0)