From 0d0760477784685be09abb3d74265deabfd65971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20G=C3=BCthler?= Date: Thu, 2 May 2024 12:53:44 +0200 Subject: [PATCH 1/3] Add support for Symfony 7 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 738f3a2..61162ba 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ } ], "require": { - "symfony/framework-bundle": "~5.0 | ~6.0" + "symfony/framework-bundle": "~5.0 | ~6.0 | ~7.0" }, "require-dev": { "eo/symfony-test-edition": "~3.0" From aa0e0316b9390a965b6e89b7b945027a1ed6655c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20G=C3=BCthler?= Date: Thu, 2 May 2024 14:07:14 +0200 Subject: [PATCH 2/3] Add return types --- DependencyInjection/Configuration.php | 2 +- EoHoneypotBundle.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 65cd3b1..3275a75 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -24,7 +24,7 @@ class Configuration implements ConfigurationInterface /** * {@inheritDoc} */ - public function getConfigTreeBuilder() + public function getConfigTreeBuilder(): TreeBuilder { if (\method_exists(TreeBuilder::class, 'getRootNode')) { // Symfony 4.1+ diff --git a/EoHoneypotBundle.php b/EoHoneypotBundle.php index 908016b..089763f 100644 --- a/EoHoneypotBundle.php +++ b/EoHoneypotBundle.php @@ -17,7 +17,7 @@ class EoHoneypotBundle extends Bundle { - public function build(ContainerBuilder $container) + public function build(ContainerBuilder $container): void { parent::build($container); From c55239b8a46d977e4015f350bbdbf5e011c410e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20G=C3=BCthler?= Date: Tue, 14 May 2024 12:14:08 +0000 Subject: [PATCH 3/3] Add return types --- Form/Type/HoneypotType.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Form/Type/HoneypotType.php b/Form/Type/HoneypotType.php index a97bb9a..29b11c5 100644 --- a/Form/Type/HoneypotType.php +++ b/Form/Type/HoneypotType.php @@ -58,7 +58,7 @@ public function __construct(RequestStack $requestStack, HoneypotManager $honeypo /** * {@inheritdoc} */ - public function buildForm(FormBuilderInterface $builder, array $options) + public function buildForm(FormBuilderInterface $builder, array $options): void { // Closure $this support was removed temporarily from PHP 5.3 // and re-introduced with 5.4. This small hack is here for 5.3 compability. @@ -94,7 +94,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) /** * {@inheritdoc} */ - public function configureOptions(OptionsResolver $resolver) + public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults(array( 'required' => false, @@ -118,7 +118,7 @@ public function configureOptions(OptionsResolver $resolver) /** * {@inheritdoc} */ - public function getParent() + public function getParent(): ?string { return 'Symfony\Component\Form\Extension\Core\Type\TextType'; }