Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factories not implementing FactoryInterface #186

Closed
loevgaard opened this issue Feb 4, 2020 · 0 comments · Fixed by #223
Closed

Factories not implementing FactoryInterface #186

loevgaard opened this issue Feb 4, 2020 · 0 comments · Fixed by #223
Labels
Bug Confirmed bugs or bugfixes.

Comments

@loevgaard
Copy link
Contributor

When I run php bin/console lint:container I get:

Invalid definition for service "sylius_refund.controller.refund": argument 5 of "Sylius\Bundle\ResourceBundle\Controller\ResourceController::__construct" accepts "Sylius\Component\Resource\Factory\FactoryInterface", "Sylius\RefundPlugin\Factory\RefundFactory" passed.

Possibly these factories should implement the Sylius factory interface?

@Zales0123 Zales0123 added the Bug Confirmed bugs or bugfixes. label Feb 26, 2020
Zales0123 added a commit that referenced this issue Oct 22, 2020
…mazu)

This PR was merged into the 1.0-dev branch.

Discussion
----------

Reason: The `RefundFactory` is used in the Resource Controller and therefore has to has to have this method, otherwise the controller can not be loaded as a service:

`
TypeError: Argument 5 passed to Sylius\Bundle\ResourceBundle\Controller\ResourceController::__construct() must implement interface Sylius\Component\Resource\Factory\FactoryInterface, instance of Sylius\RefundPlugin\Factory\RefundFactory given
`

Fixes #186 

Commits
-------

2af6869 Making the RefundFactory implement the factory interface
50fa3da Adding composer conflict to fix the pipeline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed bugs or bugfixes.
Projects
None yet
2 participants