From b8cfc078182f5fd74029c50623fae70d49e4f2ed Mon Sep 17 00:00:00 2001 From: Janez Urevc Date: Wed, 22 Jul 2026 13:13:15 +0200 Subject: [PATCH 1/3] Align PHP requirement with CI matrix (8.2+) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses Copilot review on #24: composer declared php >=5.6 while CI only exercises 8.2–8.5. Raise the runtime constraint to match tested versions, and harden composer validate/cache key handling. --- .github/workflows/checks.yml | 9 +++++++-- composer.json | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 4099119..86ccaed 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -30,13 +30,18 @@ jobs: - name: Validate composer.json - run: composer validate --strict --no-check-lock + run: | + if [ -f composer.lock ]; then + composer validate --strict + else + composer validate --strict --no-check-lock + fi - name: Cache Composer packages uses: actions/cache@v4 with: path: vendor - key: ${{ runner.os }}-composer-${{ matrix.php-versions }}-${{ hashFiles('**/composer.json') }} + key: ${{ runner.os }}-composer-${{ matrix.php-versions }}-${{ hashFiles('**/composer.json', '**/composer.lock') }} restore-keys: | ${{ runner.os }}-composer-${{ matrix.php-versions }}- diff --git a/composer.json b/composer.json index 3718b99..726c41c 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "docs": "https://portphp.readthedocs.org" }, "require": { - "php": ">=5.6.0", + "php": ">=8.2", "portphp/portphp": "^1.0.0", "seld/signal-handler": "^1.0 || ^2.0", "symfony/property-access": "^2.3 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0", From 6bd3e692ac812ad23dd84e8394036c85d624d655 Mon Sep 17 00:00:00 2001 From: Janez Urevc Date: Wed, 22 Jul 2026 13:16:47 +0200 Subject: [PATCH 2/3] Apply additional Copilot feedback on PHP constraint and install - Use ^8.2 instead of >=8.2 so Composer does not accept PHP 9+ by default - Prefer composer install when a lockfile is present --- .github/workflows/checks.yml | 7 ++++++- composer.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 86ccaed..90819ff 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -46,7 +46,12 @@ jobs: ${{ runner.os }}-composer-${{ matrix.php-versions }}- - name: Install dependencies - run: composer update --prefer-dist --no-progress --ignore-platform-req="ext-*" + run: | + if [ -f composer.lock ]; then + composer install --prefer-dist --no-progress + else + composer update --prefer-dist --no-progress + fi - name: Run phpspec run: vendor/bin/phpspec run --config phpspec.yml.dist diff --git a/composer.json b/composer.json index 726c41c..774fe68 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "docs": "https://portphp.readthedocs.org" }, "require": { - "php": ">=8.2", + "php": "^8.2", "portphp/portphp": "^1.0.0", "seld/signal-handler": "^1.0 || ^2.0", "symfony/property-access": "^2.3 || ^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0", From d9d5569ae8cc21a6a2d7a636a1f948fc61fb7b64 Mon Sep 17 00:00:00 2001 From: Janez Urevc Date: Wed, 22 Jul 2026 13:20:20 +0200 Subject: [PATCH 3/3] CI polish from Copilot: non-interactive Composer, clearer step name - Pass --no-interaction on composer validate/install/update - Rename validate step to reflect lockfile handling --- .github/workflows/checks.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 90819ff..b36c58b 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -29,12 +29,12 @@ jobs: tools: composer:v2 - - name: Validate composer.json + - name: Validate Composer metadata run: | if [ -f composer.lock ]; then - composer validate --strict + composer validate --strict --no-interaction else - composer validate --strict --no-check-lock + composer validate --strict --no-check-lock --no-interaction fi - name: Cache Composer packages @@ -48,9 +48,9 @@ jobs: - name: Install dependencies run: | if [ -f composer.lock ]; then - composer install --prefer-dist --no-progress + composer install --prefer-dist --no-progress --no-interaction else - composer update --prefer-dist --no-progress + composer update --prefer-dist --no-progress --no-interaction fi - name: Run phpspec