From 8ff807bf4350d166f531a10d33644e7bea8ff849 Mon Sep 17 00:00:00 2001 From: Denis Date: Wed, 14 Aug 2024 12:14:13 +0300 Subject: [PATCH 1/2] php 8 support --- DependencyInjection/QueueExtension.php | 2 +- SfCodQueueBundle.php | 3 ++- Tests/Service/JobQueueTest.php | 2 +- composer.json | 17 +++++++++-------- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/DependencyInjection/QueueExtension.php b/DependencyInjection/QueueExtension.php index d59ab12..9f3e515 100644 --- a/DependencyInjection/QueueExtension.php +++ b/DependencyInjection/QueueExtension.php @@ -68,7 +68,7 @@ public function load(array $config, ContainerBuilder $container) * * @return string */ - public function getAlias() + public function getAlias(): string { return 'sfcod_queue'; } diff --git a/SfCodQueueBundle.php b/SfCodQueueBundle.php index 9416381..69b7244 100644 --- a/SfCodQueueBundle.php +++ b/SfCodQueueBundle.php @@ -5,6 +5,7 @@ use SfCod\QueueBundle\DependencyInjection\Compiler\JobCompilerPass; use SfCod\QueueBundle\DependencyInjection\QueueExtension; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; /** @@ -21,7 +22,7 @@ class SfCodQueueBundle extends Bundle * * @return QueueExtension|\Symfony\Component\DependencyInjection\Extension\ExtensionInterface|null */ - public function getContainerExtension() + public function getContainerExtension(): ?ExtensionInterface { return new QueueExtension(); } diff --git a/Tests/Service/JobQueueTest.php b/Tests/Service/JobQueueTest.php index af46d80..172070b 100644 --- a/Tests/Service/JobQueueTest.php +++ b/Tests/Service/JobQueueTest.php @@ -23,7 +23,7 @@ class JobQueueTest extends TestCase /** * Set up test */ - protected function setUp() + protected function setUp(): void { $this->configure(); } diff --git a/composer.json b/composer.json index 235b50c..5d7f7a5 100644 --- a/composer.json +++ b/composer.json @@ -15,17 +15,18 @@ } ], "require": { - "php": "^7.4", - "symfony/framework-bundle": "^5.4", + "php": "^8.0", + "symfony/framework-bundle": "^5.4 || ^6.0", "symfony/monolog-bundle": "^3.1", - "symfony/process": "^5.4", - "symfony/dotenv": "^5.4" + "symfony/process": "^5.4 || ^6.0", + "symfony/dotenv": "^5.4 || ^6.0" }, "require-dev": { - "symfony/phpunit-bridge": "^5.4", - "friendsofphp/php-cs-fixer": "^2.8", - "helmich/mongomock": "^2.1", - "phpunit/phpunit": "^7.5" + "symfony/phpunit-bridge": "^5.4 || ^6.0", + "friendsofphp/php-cs-fixer": "^2.8 || ^3.0", + "helmich/mongomock": "^2.7.0", + "phpunit/phpunit": "^9.5", + "predis/predis": "^2.0" }, "autoload": { "psr-4": { From 5e2f7b2fab3fdcf905cf2b4c32f3aa9efd2e55e3 Mon Sep 17 00:00:00 2001 From: Denis Date: Thu, 15 Aug 2024 08:08:17 +0300 Subject: [PATCH 2/2] update composer to symfony 7 --- composer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 5d7f7a5..0be5a6e 100644 --- a/composer.json +++ b/composer.json @@ -16,14 +16,14 @@ ], "require": { "php": "^8.0", - "symfony/framework-bundle": "^5.4 || ^6.0", - "symfony/monolog-bundle": "^3.1", - "symfony/process": "^5.4 || ^6.0", - "symfony/dotenv": "^5.4 || ^6.0" + "symfony/framework-bundle": "^7.1.3", + "symfony/monolog-bundle": "^3.10.0", + "symfony/process": "^7.1.3", + "symfony/dotenv": "^7.1.3" }, "require-dev": { - "symfony/phpunit-bridge": "^5.4 || ^6.0", - "friendsofphp/php-cs-fixer": "^2.8 || ^3.0", + "symfony/phpunit-bridge": "^7.1.3", + "friendsofphp/php-cs-fixer": "3.62.0", "helmich/mongomock": "^2.7.0", "phpunit/phpunit": "^9.5", "predis/predis": "^2.0"