From 7fbc4ba96822cb024ebfc1467c27722f5e96beb2 Mon Sep 17 00:00:00 2001 From: sdechomets Date: Thu, 22 Sep 2022 10:13:35 +0200 Subject: [PATCH] chore: enable symfony 6.1 (and php8.1) compatibility --- .github/workflows/ci.yml | 4 ++-- composer.json | 14 +++++--------- src/Command/DaemonCommand.php | 4 ++-- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66923a8..0700747 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,8 +7,8 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - php-version: [ '7.2', '7.3', '7.4', '8.0', '8.1' ] - symfony-version: ['^4.4', '^5.0'] + php-version: ['8.1'] + symfony-version: ['^6.1'] steps: - uses: actions/checkout@master - uses: shivammathur/setup-php@v2 diff --git a/composer.json b/composer.json index 7016bac..5bd17db 100644 --- a/composer.json +++ b/composer.json @@ -9,16 +9,15 @@ } ], "require" : { - "php" : ">=7.2", + "php" : ">=8.1", "ext-pcntl" : "*", - "psr/event-dispatcher": "^1.0", - "symfony/console" : "~4.4 || ~5.0", - "symfony/framework-bundle" : "~4.4 || ~5.0", - "symfony/yaml": "~4.4 || ~5.0", + "psr/event-dispatcher": ">=1.0", + "symfony/console" : "~6.1", + "symfony/framework-bundle" : "~6.1", + "symfony/yaml": "~6.1", "react/event-loop": "@stable" }, "require-dev" : { - "sensiolabs/security-checker": "^6.0", "phpunit/phpunit": "^8.4" }, "autoload" : { @@ -27,9 +26,6 @@ "M6Web\\Bundle\\DaemonBundle\\Tests\\": "tests/" } }, - "conflict": { - "symfony/event-dispatcher": "<4.4" - }, "extra": { "branch-alias": { "dev-master": "2.0.x-dev" diff --git a/src/Command/DaemonCommand.php b/src/Command/DaemonCommand.php index ed92c68..1a8d486 100644 --- a/src/Command/DaemonCommand.php +++ b/src/Command/DaemonCommand.php @@ -123,9 +123,9 @@ private function configureDaemonDefinition(): void * Define command code callback. * * @param callable $callback - * @return DaemonCommand + * @return $this */ - public function setCode(callable $callback): DaemonCommand + public function setCode(callable $callback): static { $this->loopCallback = $callback;