Skip to content

PHP 8.4 support #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/bc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.0']
['8.4']
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
2 changes: 1 addition & 1 deletion .github/workflows/composer-require-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
2 changes: 1 addition & 1 deletion .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.3']
['8.4']
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
26 changes: 13 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
21 changes: 14 additions & 7 deletions src/Command/Serve.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,22 @@
}
$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(

Check warning on line 167 in src/Command/Serve.php

View check run for this annotation

Codecov / codecov/patch

src/Command/Serve.php#L166-L167

Added lines #L166 - L167 were not covered by tests
'%s, %s',
phpversion('xdebug'),
$xDebugVersion,

Check warning on line 169 in src/Command/Serve.php

View check run for this annotation

Codecov / codecov/patch

src/Command/Serve.php#L169

Added line #L169 was not covered by tests
$xDebugEnabled ? '<info> Enabled </>' : '<error> Disabled </>',
) : '<error>Not installed</>',
'--xdebug',
];
);

Check warning on line 171 in src/Command/Serve.php

View check run for this annotation

Codecov / codecov/patch

src/Command/Serve.php#L171

Added line #L171 was not covered by tests
} else {
$xDebugLine = '<error>Not installed</>';
}
$outputTable[] = ['xDebug', $xDebugLine, '--xdebug'];

$outputTable[] = ['Workers', $isLinux ? $workers : 'Not supported', '--workers, -w'];
$outputTable[] = ['Address', $address];
$outputTable[] = ['Document root', $documentRoot, '--docroot, -t'];
Expand Down
2 changes: 2 additions & 0 deletions src/ExitCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
* ```
*
* @see https://man.openbsd.org/sysexits
*
* @final See https://github.com/yiisoft/yii-console/issues/225
*/
class ExitCode
{
Expand Down
Loading