diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 616470279..c29d8430c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '8.2' coverage: none extensions: mongodb, redis, :xdebug ini-values: memory_limit=2048M diff --git a/docker/Dockerfile b/docker/Dockerfile index 4c288b041..b2f30c62e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -ARG PHP_VERSION=7.4 +ARG PHP_VERSION=8.2 FROM makasim/nginx-php-fpm:${PHP_VERSION}-all-exts ARG PHP_VERSION diff --git a/pkg/enqueue/Symfony/Client/ConsumeCommand.php b/pkg/enqueue/Symfony/Client/ConsumeCommand.php index 4b65f6276..39af6d592 100644 --- a/pkg/enqueue/Symfony/Client/ConsumeCommand.php +++ b/pkg/enqueue/Symfony/Client/ConsumeCommand.php @@ -13,18 +13,20 @@ use Interop\Queue\Processor; use Psr\Container\ContainerInterface; use Psr\Container\NotFoundExceptionInterface; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand('enqueue:consume')] class ConsumeCommand extends Command { + use ChooseLoggerCommandTrait; use LimitsExtensionsCommandTrait; - use SetupBrokerExtensionCommandTrait; use QueueConsumerOptionsCommandTrait; - use ChooseLoggerCommandTrait; + use SetupBrokerExtensionCommandTrait; protected static $defaultName = 'enqueue:consume'; diff --git a/pkg/enqueue/Symfony/Client/ProduceCommand.php b/pkg/enqueue/Symfony/Client/ProduceCommand.php index 667871c71..6064f82e1 100644 --- a/pkg/enqueue/Symfony/Client/ProduceCommand.php +++ b/pkg/enqueue/Symfony/Client/ProduceCommand.php @@ -6,12 +6,14 @@ use Enqueue\Client\ProducerInterface; use Psr\Container\ContainerInterface; use Psr\Container\NotFoundExceptionInterface; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand('enqueue:produce')] class ProduceCommand extends Command { protected static $defaultName = 'enqueue:produce'; diff --git a/pkg/enqueue/Symfony/Client/RoutesCommand.php b/pkg/enqueue/Symfony/Client/RoutesCommand.php index 5419f3beb..59a4a4d98 100644 --- a/pkg/enqueue/Symfony/Client/RoutesCommand.php +++ b/pkg/enqueue/Symfony/Client/RoutesCommand.php @@ -6,6 +6,7 @@ use Enqueue\Client\Route; use Psr\Container\ContainerInterface; use Psr\Container\NotFoundExceptionInterface; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Helper\TableSeparator; @@ -13,6 +14,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand('enqueue:routes')] class RoutesCommand extends Command { protected static $defaultName = 'enqueue:routes'; diff --git a/pkg/enqueue/Symfony/Client/SetupBrokerCommand.php b/pkg/enqueue/Symfony/Client/SetupBrokerCommand.php index 65d52ee31..68aebb582 100644 --- a/pkg/enqueue/Symfony/Client/SetupBrokerCommand.php +++ b/pkg/enqueue/Symfony/Client/SetupBrokerCommand.php @@ -5,12 +5,14 @@ use Enqueue\Client\DriverInterface; use Psr\Container\ContainerInterface; use Psr\Container\NotFoundExceptionInterface; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Logger\ConsoleLogger; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand('enqueue:setup-broker')] class SetupBrokerCommand extends Command { protected static $defaultName = 'enqueue:setup-broker'; diff --git a/pkg/enqueue/Symfony/Consumption/ConfigurableConsumeCommand.php b/pkg/enqueue/Symfony/Consumption/ConfigurableConsumeCommand.php index 9ec8a36f3..234eb0497 100644 --- a/pkg/enqueue/Symfony/Consumption/ConfigurableConsumeCommand.php +++ b/pkg/enqueue/Symfony/Consumption/ConfigurableConsumeCommand.php @@ -8,17 +8,19 @@ use Enqueue\ProcessorRegistryInterface; use Psr\Container\ContainerInterface; use Psr\Container\NotFoundExceptionInterface; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand('enqueue:transport:consume')] class ConfigurableConsumeCommand extends Command { + use ChooseLoggerCommandTrait; use LimitsExtensionsCommandTrait; use QueueConsumerOptionsCommandTrait; - use ChooseLoggerCommandTrait; protected static $defaultName = 'enqueue:transport:consume'; diff --git a/pkg/enqueue/Symfony/Consumption/ConsumeCommand.php b/pkg/enqueue/Symfony/Consumption/ConsumeCommand.php index b1a54c163..870cc5f60 100644 --- a/pkg/enqueue/Symfony/Consumption/ConsumeCommand.php +++ b/pkg/enqueue/Symfony/Consumption/ConsumeCommand.php @@ -7,16 +7,18 @@ use Enqueue\Consumption\QueueConsumerInterface; use Psr\Container\ContainerInterface; use Psr\Container\NotFoundExceptionInterface; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +#[AsCommand('enqueue:transport:consume')] class ConsumeCommand extends Command { + use ChooseLoggerCommandTrait; use LimitsExtensionsCommandTrait; use QueueConsumerOptionsCommandTrait; - use ChooseLoggerCommandTrait; protected static $defaultName = 'enqueue:transport:consume'; diff --git a/pkg/sns/Tests/SnsClientTest.php b/pkg/sns/Tests/SnsClientTest.php index e4fb15402..a029f4fd0 100644 --- a/pkg/sns/Tests/SnsClientTest.php +++ b/pkg/sns/Tests/SnsClientTest.php @@ -16,7 +16,7 @@ public function testShouldAllowGetAwsClientIfSingleClientProvided() $awsClient = (new Sdk(['Sns' => [ 'key' => '', 'secret' => '', - 'region' => '', + 'region' => 'us-west-2', 'version' => '2010-03-31', 'endpoint' => 'http://localhost', ]]))->createSns(); @@ -31,7 +31,7 @@ public function testShouldAllowGetAwsClientIfMultipleClientProvided() $awsClient = (new Sdk(['Sns' => [ 'key' => '', 'secret' => '', - 'region' => '', + 'region' => 'us-west-2', 'version' => '2010-03-31', 'endpoint' => 'http://localhost', ]]))->createMultiRegionSns(); diff --git a/pkg/sqs/Tests/SqsClientTest.php b/pkg/sqs/Tests/SqsClientTest.php index d7c583fd1..ff6a966d4 100644 --- a/pkg/sqs/Tests/SqsClientTest.php +++ b/pkg/sqs/Tests/SqsClientTest.php @@ -16,7 +16,7 @@ public function testShouldAllowGetAwsClientIfSingleClientProvided() $awsClient = (new Sdk(['Sqs' => [ 'key' => '', 'secret' => '', - 'region' => '', + 'region' => 'us-west-2', 'version' => '2012-11-05', 'endpoint' => 'http://localhost', ]]))->createSqs(); @@ -31,7 +31,7 @@ public function testShouldAllowGetAwsClientIfMultipleClientProvided() $awsClient = (new Sdk(['Sqs' => [ 'key' => '', 'secret' => '', - 'region' => '', + 'region' => 'us-west-2', 'version' => '2012-11-05', 'endpoint' => 'http://localhost', ]]))->createMultiRegionSqs();