Skip to content

Commit

Permalink
Merge pull request #9 from AgencyPMG/ALLI-10624-Upgrade-to-Symfony-6.…
Browse files Browse the repository at this point in the history
…4-and-PHP-8.3

[ALLI-10624] Upgrade to Symfony 6.4 and PHP 8.3.
  • Loading branch information
WebCu authored Jan 26, 2024
2 parents bd487f5 + b93271f commit 56741d5
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .github/actions/setup-php/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ runs:
tools: composer
coverage: xdebug
ini-values: zend.assertions=1,assert.exception=1,xdebug.mode=coverage
composer-command: ${{ matrix.composer-command }}

- name: composer cache
id: composercache
Expand All @@ -34,4 +35,4 @@ runs:

- name: install php dependencies
shell: bash
run: composer install --no-interaction --no-progress
run: ${{ inputs.composer-command }}
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:

strategy:
matrix:
include:
- php-version: 8.0
- php-version: 8.1
- php-version: 8.2
php-version: ["8.2", "8.3"]
composer-command:
- composer update --prefer-lowest --prefer-dist --prefer-stable
- composer install

steps:
- name: checkout
Expand All @@ -28,6 +28,7 @@ jobs:
uses: ./.github/actions/setup-php
with:
php-version: "${{ matrix.php-version }}"
composer-command: ${{ matrix.composer-command }}

- name: tests
run: ./vendor/bin/phpunit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/phpunit.xml
composer.lock
.phpunit.result.cache
.idea

*.pyc
*.swp
Expand Down
23 changes: 16 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,26 @@
"keywords": ["beanstalkd", "pheanstalk"],
"license": "Apache-2.0",
"require": {
"php": "^8.0",
"php": "^8.2",
"pda/pheanstalk": "^4.0",
"symfony/framework-bundle": "^5.4",
"symfony/console": "^5.4"
"symfony/framework-bundle": "^5.4.34 || ^6.4",
"symfony/console": "^5.4.34 || ^6.4"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"symfony/yaml": "^5.4",
"symfony/dependency-injection": "^5.4",
"symfony/phpunit-bridge": "^5.4",
"symfony/console": "^5.4"
"symfony/yaml": "^5.4.31 || ^6.4",
"symfony/dependency-injection": "^5.4.5 || ^6.4",
"symfony/phpunit-bridge": "^5.4 || ^6.4",
"symfony/cache": "^5.4 || ^6.4",
"symfony/config": "^5.4 || ^6.4",
"symfony/routing": "^5.4.34 || ^6.4",
"symfony/http-foundation": "^5.4.24 || ^6.4",
"symfony/event-dispatcher": "^5.4.34 || ^6.4",
"symfony/var-dumper": "^5.4 || ^6.4",
"symfony/error-handler": "^5.4 || ^6.4",
"symfony/finder": "^5.4 || ^6.4",
"symfony/filesystem": "^5.4 || ^6.4",
"symfony/var-exporter": "^5.4 || ^6.4"
},
"autoload": {
"psr-4": {
Expand Down
9 changes: 4 additions & 5 deletions src/Command/PurgeQueueCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,20 @@

namespace PMG\PheanstalkBundle\Command;

use PMG\PheanstalkBundle\Service\QueueUtilities;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Pheanstalk\PheanstalkInterface;
use PMG\PheanstalkBundle\Service\QueueUtilities;

/**
* Purge a single beanstalkd tube of jobs.
*/
#[AsCommand(name: 'pheanstalk:purge-queue')]
final class PurgeQueueCommand extends Command
{
protected static $defaultName = 'pheanstalk:purge-queue';

public function __construct(private QueueUtilities $queueUtilities, $name=null)
{
parent::__construct($name);
Expand Down
5 changes: 2 additions & 3 deletions src/Command/StatsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

namespace PMG\PheanstalkBundle\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Pheanstalk\PheanstalkInterface;
use Pheanstalk\Exception\ServerException;
use PMG\PheanstalkBundle\Service\StatsService;

Expand All @@ -26,10 +26,9 @@
*
* @since 1.0
*/
#[AsCommand(name: 'pheanstalk:stats')]
final class StatsCommand extends Command
{
protected static $defaultName = 'pheanstalk:stats';

/**
* @var StatsService
*/
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/PmgPheanstalkExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ final class PmgPheanstalkExtension extends ConfigurableExtension
/**
* {@inheritdoc}
*/
protected function loadInternal(array $config, ContainerBuilder $container)
protected function loadInternal(array $config, ContainerBuilder $container): void
{
$connections = [];
foreach ($config['connections'] as $name => $connConfig) {
Expand Down

0 comments on commit 56741d5

Please sign in to comment.