diff --git a/.github/workflows/bc.yml b/.github/workflows/bc.yml index f8cc5648..0ea4a5c1 100644 --- a/.github/workflows/bc.yml +++ b/.github/workflows/bc.yml @@ -30,4 +30,4 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.0'] + ['8.4'] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e96052e5..68fac01f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,4 +31,4 @@ jobs: os: >- ['ubuntu-latest', 'windows-latest'] php: >- - ['8.0', '8.1', '8.2', '8.3'] + ['8.0', '8.1', '8.2', '8.3', '8.4'] diff --git a/.github/workflows/composer-require-checker.yml b/.github/workflows/composer-require-checker.yml index 5473ec96..632bfd48 100644 --- a/.github/workflows/composer-require-checker.yml +++ b/.github/workflows/composer-require-checker.yml @@ -31,4 +31,4 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.0', '8.1', '8.2', '8.3'] + ['8.0', '8.1', '8.2', '8.3', '8.4'] diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index 457772af..5d6931d5 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -21,4 +21,4 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.3'] + ['8.4'] diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index e34190e8..14d169ff 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -29,7 +29,7 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.1', '8.2', '8.3'] + ['8.1', '8.2', '8.3', '8.4'] psalm80: uses: yiisoft/actions/.github/workflows/psalm.yml@master with: diff --git a/CHANGELOG.md b/CHANGELOG.md index f93596f7..d1703ce0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## 2.3.1 under development +- Chg #228: Change PHP constraint in `composer.json` to `8.0 - 8.4` (@vjik) - Enh #226: Check empty string as key in command map in `CommandLoader` validation (@vjik) - Bug #224: Fix typo in `UNAVAILABLE` exit code reason (@vjik) - Bug #227: Throw `RuntimeException` in `ServeCommand` when it wasn't possible to find out the current directory (@vjik) diff --git a/composer.json b/composer.json index 24c87e48..bf911940 100644 --- a/composer.json +++ b/composer.json @@ -27,23 +27,23 @@ } ], "require": { - "php": "^8.0", - "psr/container": "^1.0|^2.0", + "php": "8.0 - 8.4", + "psr/container": "^1.0 || ^2.0", "psr/event-dispatcher": "^1.0", - "psr/log": "^1.0|^2.0|^3.0", - "symfony/console": "^5.4|^6.0|^7.0", - "symfony/event-dispatcher-contracts": "^2.2|^3.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "symfony/console": "^5.4 || ^6.0 || ^7.0", + "symfony/event-dispatcher-contracts": "^2.2 || ^3.0", "yiisoft/friendly-exception": "^1.0" }, "require-dev": { - "maglnet/composer-require-checker": "^3.8|^4.4", - "phpunit/phpunit": "^9.5", - "rector/rector": "^2.0.7", - "roave/infection-static-analysis-plugin": "^1.16", - "vimeo/psalm": "^4.30|^5.20", - "yiisoft/config": "^1.3", - "yiisoft/di": "^1.2", - "yiisoft/test-support": "^3.0" + "maglnet/composer-require-checker": "^4.4", + "phpunit/phpunit": "^9.6.22", + "rector/rector": "^2.0.11", + "roave/infection-static-analysis-plugin": "^1.25", + "vimeo/psalm": "^4.30 || ^5.26.1 || ^6.10", + "yiisoft/config": "^1.5", + "yiisoft/di": "^1.2.1", + "yiisoft/test-support": "^3.0.2" }, "autoload": { "psr-4": { diff --git a/psalm.xml b/psalm.xml index b48c894e..2b2e0b2b 100644 --- a/psalm.xml +++ b/psalm.xml @@ -3,6 +3,7 @@ errorLevel="1" findUnusedBaselineEntry="true" findUnusedCode="false" + ensureOverrideAttribute="false" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" diff --git a/src/Command/Serve.php b/src/Command/Serve.php index 158d5829..ffbd0c37 100644 --- a/src/Command/Serve.php +++ b/src/Command/Serve.php @@ -158,15 +158,22 @@ protected function execute(InputInterface $input, OutputInterface $output): int } $outputTable = []; $outputTable[] = ['PHP', PHP_VERSION]; - $outputTable[] = [ - 'xDebug', - $xDebugInstalled ? sprintf( + + if ($xDebugInstalled) { + /** + * @var string $xDebugVersion Here we know that xDebug is installed, so `phpversion` will not return false. + */ + $xDebugVersion = phpversion('xdebug'); + $xDebugLine = sprintf( '%s, %s', - phpversion('xdebug'), + $xDebugVersion, $xDebugEnabled ? ' Enabled ' : ' Disabled ', - ) : 'Not installed', - '--xdebug', - ]; + ); + } else { + $xDebugLine = 'Not installed'; + } + $outputTable[] = ['xDebug', $xDebugLine, '--xdebug']; + $outputTable[] = ['Workers', $isLinux ? $workers : 'Not supported', '--workers, -w']; $outputTable[] = ['Address', $address]; $outputTable[] = ['Document root', $documentRoot, '--docroot, -t']; diff --git a/src/ExitCode.php b/src/ExitCode.php index e0589093..56a4ced5 100644 --- a/src/ExitCode.php +++ b/src/ExitCode.php @@ -26,6 +26,8 @@ * ``` * * @see https://man.openbsd.org/sysexits + * + * @final See https://github.com/yiisoft/yii-console/issues/225 */ class ExitCode {