diff --git a/config/services.yml b/config/services.yml index 216861092..4025f13b7 100644 --- a/config/services.yml +++ b/config/services.yml @@ -102,11 +102,13 @@ services: - 'SubscriptionOptions' Mollie\Subscription\Controller\Symfony\SubscriptionFAQController: + class: Mollie\Subscription\Controller\Symfony\SubscriptionFAQController public: true - autowire: true autoconfigure: true + autowire: true # Optional, but useful for dependency injection Mollie\Subscription\Controller\Symfony\SubscriptionController: + class: Mollie\Subscription\Controller\Symfony\SubscriptionController public: true autowire: true - autoconfigure: true \ No newline at end of file + autoconfigure: true diff --git a/subscription/Form/Options/SubscriptionOptionsType.php b/subscription/Form/Options/SubscriptionOptionsType.php index 8036535d0..420c00332 100644 --- a/subscription/Form/Options/SubscriptionOptionsType.php +++ b/subscription/Form/Options/SubscriptionOptionsType.php @@ -18,7 +18,8 @@ use PrestaShopBundle\Form\Admin\Type\TranslatorAwareType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Contracts\Translation\TranslatorInterface; +use Symfony\Contracts\Translation\TranslatorInterface as NewTranslatorInterface; // Newer Symfony translator +use Symfony\Component\Translation\TranslatorInterface as OldTranslatorInterface; // Older Symfony translator if (!defined('_PS_VERSION_')) { exit; @@ -30,9 +31,11 @@ class SubscriptionOptionsType extends TranslatorAwareType private $carrierOptionProvider; /** @var Module */ private $module; + /** @var NewTranslatorInterface | OldTranslatorInterface */ + private $translator; public function __construct( - TranslatorInterface $translator, + $translator, array $locales, FormChoiceProviderInterface $carrierOptionProvider, Module $module