Skip to content

Commit

Permalink
Add support for PHP 8.3 and update Symfony dependencies to ^6.4 (#24)
Browse files Browse the repository at this point in the history
* Add support for PHP 8.3 and update Symfony dependencies to ^6.4
* Fix default value handling in CliCommand
  • Loading branch information
SmetDenis authored Jan 28, 2024
1 parent e5cde10 commit d0cb410
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
JBZOO_COMPOSER_UPDATE_FLAGS: ${{ matrix.composer_flags }}
strategy:
matrix:
php-version: [ 8.1, 8.2 ]
php-version: [ 8.1, 8.2, 8.3 ]
coverage: [ xdebug, none ]
composer_flags: [ "--prefer-lowest", "" ]
steps:
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ 8.1, 8.2 ]
php-version: [ 8.1, 8.2, 8.3 ]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ 8.1, 8.2 ]
php-version: [ 8.1, 8.2, 8.3 ]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@
"jbzoo/utils" : "^7.1",
"jbzoo/event" : "^7.0",

"symfony/process" : ">=5.4",
"symfony/console" : ">=5.4",
"symfony/lock" : ">=5.4",
"symfony/process" : ">=6.4",
"symfony/console" : ">=6.4",
"symfony/lock" : ">=6.4",
"bluepsyduck/symfony-process-manager" : ">=1.3.3",
"monolog/monolog" : "^3.4"
},

"require-dev" : {
"jbzoo/toolbox-dev" : "^7.0"
"jbzoo/toolbox-dev" : "^7.1"
},

"autoload" : {
Expand Down
6 changes: 5 additions & 1 deletion src/CliCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,11 @@ protected function askOption(string $question, array $options, null|float|int|st
$defaultValue = '';
if ($default !== null) {
/** @phpstan-ignore-next-line */
$defaultValue = $options[$default] ?? $default ?: '';
$defaultValue = $options[$default] ?? '';
if (!bool($default)) {
$default = '';
}

if ($defaultValue !== '') {
$defaultValue = " (Default: <i>{$defaultValue}</i>)";
}
Expand Down

0 comments on commit d0cb410

Please sign in to comment.