Skip to content

Replace AbstractController with ControllerTrait & ContainerAwareInterface#204

Merged
pamil merged 1 commit into
Sylius:masterfrom
pamil:controller-trait
Oct 15, 2020
Merged

Replace AbstractController with ControllerTrait & ContainerAwareInterface#204
pamil merged 1 commit into
Sylius:masterfrom
pamil:controller-trait

Conversation

@pamil

@pamil pamil commented Oct 15, 2020

Copy link
Copy Markdown
Contributor

We can't use AbstractController if we want to keep BC - AbstractController requires a service locator with predefined dependencies and ResourceController requires a container with all public services for BC purposes.

@pamil pamil requested a review from a team as a code owner October 15, 2020 16:35
@pamil pamil merged commit 71da2eb into Sylius:master Oct 15, 2020
@pamil pamil deleted the controller-trait branch October 15, 2020 18:13

protected function addController(ContainerBuilder $container, MetadataInterface $metadata): void
{
$viewHandler = new Reference('sylius.resource_controller.view_handler', ContainerInterface::NULL_ON_INVALID_REFERENCE);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pamil Why removing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants