From a6dffe983d4cb22485370a2bde2c582f9b7b4f9a Mon Sep 17 00:00:00 2001 From: Laurent VOULLEMIER Date: Wed, 4 Mar 2020 21:26:56 +0100 Subject: [PATCH 1/2] CaptchaController doesn't extend AbstractController anymore Since it causes a crash on sf5 because setContainer is not called --- Controller/CaptchaController.php | 3 +-- Resources/config/services.yml | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Controller/CaptchaController.php b/Controller/CaptchaController.php index d3c5751..5b20ec5 100644 --- a/Controller/CaptchaController.php +++ b/Controller/CaptchaController.php @@ -5,7 +5,6 @@ namespace Gregwar\CaptchaBundle\Controller; use Gregwar\CaptchaBundle\Generator\CaptchaGenerator; -use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -14,7 +13,7 @@ * * @author Jeremy Livingston */ -class CaptchaController extends AbstractController +class CaptchaController { /** @var CaptchaGenerator */ private $captchaGenerator; diff --git a/Resources/config/services.yml b/Resources/config/services.yml index ec7e76f..cc5dcd4 100755 --- a/Resources/config/services.yml +++ b/Resources/config/services.yml @@ -17,6 +17,8 @@ services: arguments: - '@gregwar_captcha.generator' - '%gregwar_captcha.config%' + tags: + - controller.service_arguments # captcha.type: gregwar_captcha.type: From a5d1e97d9866665cda55a3b5bbfcdba705074b6f Mon Sep 17 00:00:00 2001 From: Laurent VOULLEMIER Date: Wed, 4 Mar 2020 21:27:33 +0100 Subject: [PATCH 2/2] Remove useless public visibility for services --- Resources/config/services.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Resources/config/services.yml b/Resources/config/services.yml index cc5dcd4..fabbcfe 100755 --- a/Resources/config/services.yml +++ b/Resources/config/services.yml @@ -8,10 +8,6 @@ parameters: services: Gregwar\CaptchaBundle\Controller\CaptchaController: - public: true - alias: 'gregwar_captcha.controller' - - gregwar_captcha.controller: class: '%gregwar_captcha.controller.class%' public: true arguments: @@ -23,7 +19,6 @@ services: # captcha.type: gregwar_captcha.type: class: '%gregwar_captcha.captcha_type.class%' - public: true arguments: - '@session' - '@gregwar_captcha.generator' @@ -34,7 +29,6 @@ services: gregwar_captcha.generator: class: '%gregwar_captcha.captcha_generator.class%' - public: true arguments: - '@router' - '@gregwar_captcha.captcha_builder' @@ -43,7 +37,6 @@ services: gregwar_captcha.image_file_handler: class: '%gregwar_captcha.image_file_handler.class%' - public: true arguments: - '%gregwar_captcha.config.image_folder%' - '%gregwar_captcha.config.web_path%' @@ -52,8 +45,6 @@ services: gregwar_captcha.captcha_builder: class: '%gregwar_captcha.captcha_builder.class%' - public: true gregwar_captcha.phrase_builder: class: '%gregwar_captcha.phrase_builder.class%' - public: true