From cd3ef427040262a3a15df6e9176f33bf4065d107 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Wed, 3 Jul 2024 00:04:44 -0400 Subject: [PATCH 1/4] Check for potentially undefined command line argument 5.1 will introduce more strict console parameter access. We need to update to the new usage pattern. Fixes #725 --- src/Migration/Manager.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Migration/Manager.php b/src/Migration/Manager.php index 52a495d3..cb0faf18 100644 --- a/src/Migration/Manager.php +++ b/src/Migration/Manager.php @@ -302,7 +302,10 @@ public function getVersionsToMark(Arguments $args): array $migrations = $this->getMigrations(); $versions = array_keys($migrations); - $versionArg = $args->getArgument('version'); + $versionArg = null; + if ($args->hasArgument('version')) { + $versionArg = $args->getArgument('version'); + } $targetArg = $args->getOption('target'); $hasAllVersion = in_array($versionArg, ['all', '*'], true); if ((empty($versionArg) && empty($targetArg)) || $hasAllVersion) { From 4db68a4515b002ad15ae52f376b819de299c44c5 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Wed, 3 Jul 2024 00:05:39 -0400 Subject: [PATCH 2/4] Try to extend CI for 5.1 testing --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7254c28b..67ffed97 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,10 +22,14 @@ jobs: php-version: ['8.1', '8.2'] db-type: [mysql, pgsql, sqlite] prefer-lowest: [''] + cake_version: [''] include: - php-version: '8.1' db-type: 'sqlite' prefer-lowest: 'prefer-lowest' + - php-version: '8.1' + db-type: 'sqlite' + cake_version: ^5.1.0-RC1 services: postgres: @@ -89,6 +93,9 @@ jobs: composer install --ignore-platform-req=php elif ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then composer update --prefer-lowest --prefer-stable + elif ${{ matrix.cake_version != '' }}; then + composer require cakephp/cakephp:${{ matrix.cake_version }} + composer update else composer update fi From 6b37d0d755331dd07c6a3cb3851fd0009b57c507 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Wed, 3 Jul 2024 00:07:49 -0400 Subject: [PATCH 3/4] Use --dev instead. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67ffed97..623c6be9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,7 +94,7 @@ jobs: elif ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then composer update --prefer-lowest --prefer-stable elif ${{ matrix.cake_version != '' }}; then - composer require cakephp/cakephp:${{ matrix.cake_version }} + composer require --dev cakephp/cakephp:${{ matrix.cake_version }} composer update else composer update From b095acf44ffed5c8b681fc51e3da2bd29ad7b747 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Wed, 3 Jul 2024 23:01:19 -0400 Subject: [PATCH 4/4] Use dev to validate fix in 5.next --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 623c6be9..d4fd28de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: prefer-lowest: 'prefer-lowest' - php-version: '8.1' db-type: 'sqlite' - cake_version: ^5.1.0-RC1 + cake_version: 'dev-5.next as 5.1.0' services: postgres: @@ -94,7 +94,7 @@ jobs: elif ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then composer update --prefer-lowest --prefer-stable elif ${{ matrix.cake_version != '' }}; then - composer require --dev cakephp/cakephp:${{ matrix.cake_version }} + composer require --dev "cakephp/cakephp:${{ matrix.cake_version }}" composer update else composer update