After running the Symfony php bin/console lint:container command to check the service container, it flagged a couple of issues
The service definition sylius_mollie_plugin.resolver.mollie_amount_restriction_resolver references a class that doesn't exist, and I can't see anything that requires that service so I've removed it.
MollieGatewayConfigFactoryInterface doesn't extend Sylius\Component\Resource\Factory\FactoryInterface which was causing this error:
[ERROR] Invalid definition for service "sylius_mollie_plugin.controller.mollie_gateway_config": argument 5 of
"Sylius\Bundle\ResourceBundle\Controller\ResourceController::__construct()" accepts
"Sylius\Component\Resource\Factory\FactoryInterface", "SyliusMolliePlugin\Factory\MollieGatewayConfigFactory"
passed.
So changed it to extend the FactoryInterface and implemented the createNew() method by calling the inner factory class.
After running the Symfony
php bin/console lint:container
command to check the service container, it flagged a couple of issuessylius_mollie_plugin.resolver.mollie_amount_restriction_resolver
references a class that doesn't exist, and I can't see anything that requires that service so I've removed it.MollieGatewayConfigFactoryInterface
doesn't extendSylius\Component\Resource\Factory\FactoryInterface
which was causing this error:So changed it to extend the FactoryInterface and implemented the createNew() method by calling the inner factory class.