E.g. if the project composer.json contains:
{
"require": {
"symfony/polyfill-php80": "^1.26",
}
}
We upgrade to PHP 8.0 features, that benefit from this package. It must be manually checked what Rector rules should be extended, as this polyfill only adds helper for few functions, not all PHP 8.0 features.
To enable such a rule, it must require RequiredPolyfillInterface contract:
class SomeRector implements RequiredPolyfillInterface
{
public function getPolyfill(): string
{
return 'symfony/polyfill-php80';
}
}