-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Given PHP 8.0 will be the minium PHP version for v2, running a Rector upgrade script will always upgrade the annotations to attributes.
This idea came up during the PHPWVL talk where Tomas Votruba held a talk about including effortless upgradeability as a Composer Plugin, and is a follow-up of the discussion in #72
TODO
- find a way how to hook into the Rector process to transform the parameter labels
- rewrite the old
routearray values torouteName,routeParameters,routeAbsolute - find a way to run a Rector rule when installing v2 (and how to only run it once)
Sample Rector rule
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();
$services->set(AnnotationToAttributeRector::class)->call('configure', [
[
AnnotationToAttributeRector::ANNOTATION_TO_ATTRIBUTE => ValueObjectInliner::inline([
new AnnotationToAttribute(\APY\BreadcrumbTrailBundle\Annotation\Breadcrumb::class),
]),
],
]);
};Metadata
Metadata
Assignees
Labels
No labels