Problem:
When one decorates Dedi\SyliusSEOPlugin\Factory\SubjectUrl\ProductUrlGenerator with its custom implementation, the product show page breaks with the following error:
Dedi\SyliusSEOPlugin\Factory\ProductRichSnippetFactory::__construct(): Argument #6 ($productUrlGenerator) must be of type Dedi\SyliusSEOPlugin\Factory\SubjectUrl\ProductUrlGenerator, App\Factory\SubjectUrl\ProductUrlGenerator given
This is due to Dedi\SyliusSEOPlugin\Factory\ProductRichSnippetFactory typing its argument to Dedi\SyliusSEOPlugin\Factory\SubjectUrl\ProductUrlGenerator instead of Dedi\SyliusSEOPlugin\Domain\SEO\Factory\SubjectUrl\SubjectUrlGeneratorInterface
Proposed solution:
Type the argument to the interface instead of the class
Other solution:
An other workaround would be to not decorate, but extend the original service instead. But IMO the decoration should work properyl.
Problem: When one decorates
Dedi\SyliusSEOPlugin\Factory\SubjectUrl\ProductUrlGenerator
with its custom implementation, the product show page breaks with the following error:This is due to
Dedi\SyliusSEOPlugin\Factory\ProductRichSnippetFactory
typing its argument toDedi\SyliusSEOPlugin\Factory\SubjectUrl\ProductUrlGenerator
instead ofDedi\SyliusSEOPlugin\Domain\SEO\Factory\SubjectUrl\SubjectUrlGeneratorInterface
Proposed solution: Type the argument to the interface instead of the class
Other solution: An other workaround would be to not decorate, but extend the original service instead. But IMO the decoration should work properyl.