Skip to content

Commit

Permalink
Remove existing tags from annotations that could be arrays (see #2372)
Browse files Browse the repository at this point in the history
Description
-----------

Fixes #2371

Let's see what symfony/symfony#38339 bringts up …

Commits
-------

7a35efc Remove existing tags from annotations that could  be arrays
de60bb6 Page type is optional, it's automatically generated in the compiler pass
  • Loading branch information
aschempp committed Oct 6, 2020
1 parent 1c220e4 commit f7c15c0
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion core-bundle/src/ContaoCoreBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function build(ContainerBuilder $container): void
$container->addCompilerPass(new AddResourcesPathsPass());
$container->addCompilerPass(new TaggedMigrationsPass());
$container->addCompilerPass(new PickerProviderPass());
$container->addCompilerPass(new RegisterPagesPass());
$container->addCompilerPass(new RegisterPagesPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 1);
$container->addCompilerPass(new RegisterFragmentsPass(FrontendModuleReference::TAG_NAME));
$container->addCompilerPass(new RegisterFragmentsPass(ContentElementReference::TAG_NAME));
$container->addCompilerPass(new FragmentRendererPass('contao.fragment.handler'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ protected function registerFragments(ContainerBuilder $container, string $tag):
$command->addMethodCall('add', [$identifier, $config, $attributes]);
}

$childDefinition->addTag($tag, $attributes);
$container->setDefinition($serviceId, $childDefinition);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ protected function registerPages(ContainerBuilder $container): void

$config = $this->getRouteConfig($reference, $definition, $attributes);
$registry->addMethodCall('add', [$type, $config, $routeEnhancer, $contentComposition]);

$definition->addTag(self::TAG_NAME, $attributes);
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions core-bundle/src/ServiceAnnotation/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ public function __construct(array $data)
unset($data['value']);
}

if (!isset($data['type'])) {
throw new \LogicException('@Page annotation requires a type property.');
}

if (isset($data['locale'])) {
$data['defaults']['_locale'] = $data['locale'];
unset($data['locale']);
Expand Down

0 comments on commit f7c15c0

Please sign in to comment.