From 51660a4a684367a92dee296894e0dbbf241612e8 Mon Sep 17 00:00:00 2001 From: Alexis Guyomar Date: Mon, 2 Mar 2026 17:15:26 +0100 Subject: [PATCH 01/11] github: new workflow to add issue to project --- .github/workflows/add-issue-to-project.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/add-issue-to-project.yml diff --git a/.github/workflows/add-issue-to-project.yml b/.github/workflows/add-issue-to-project.yml new file mode 100644 index 0000000..cfa4ba3 --- /dev/null +++ b/.github/workflows/add-issue-to-project.yml @@ -0,0 +1,13 @@ +name: Add Issue to Project + +on: + issues: + types: [ opened ] + +jobs: + add-to-project: + uses: PrestaShop/.github/.github/workflows/reusable-add-to-project.yml@master + with: + project-number: 47 + secrets: + TOKEN: ${{ secrets.JARVIS_TOKEN }} From 3c60e9a1eeab632a12cbfe6d7f88e814ce0f942b Mon Sep 17 00:00:00 2001 From: mattgoud Date: Tue, 2 Jun 2026 18:10:26 +0200 Subject: [PATCH 02/11] CI: migrate PHPStan to PrestaShop/.github action Replace the Docker-based phpstan.sh approach with the shared PrestaShop/.github PHPStan action. The old approach was failing because the prestashop/prestashop:latest Docker image now exits immediately (due to entrypoint changes), causing "No such container: temp-ps" errors. - Add tests/php/phpstan/ with version-specific neon configs for 8.1.7, 8.2.x, 9.1.x and develop - Add prepend-constants.php for PS 9.x bootstrap constants - Replace single Docker-based phpstan job with two action-based jobs: phpstan-74 (PS 8.x, PHP 7.4-8.1) and phpstan (PS 9.x, PHP 8.1-8.5) - Remove tests/phpstan.sh (no longer needed) Fixes #ISSUE Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/php.yml | 122 +++++++++++++----------- tests/php/phpstan/index.php | 8 ++ tests/php/phpstan/phpstan-8.1.7.neon | 5 + tests/php/phpstan/phpstan-8.2.x.neon | 5 + tests/php/phpstan/phpstan-9.1.x.neon | 5 + tests/php/phpstan/phpstan-develop.neon | 5 + tests/php/phpstan/phpstan.neon | 2 + tests/php/phpstan/prepend-constants.php | 11 +++ tests/phpstan.sh | 28 ------ 9 files changed, 108 insertions(+), 83 deletions(-) create mode 100644 tests/php/phpstan/index.php create mode 100644 tests/php/phpstan/phpstan-8.1.7.neon create mode 100644 tests/php/phpstan/phpstan-8.2.x.neon create mode 100644 tests/php/phpstan/phpstan-9.1.x.neon create mode 100644 tests/php/phpstan/phpstan-develop.neon create mode 100644 tests/php/phpstan/phpstan.neon create mode 100644 tests/php/phpstan/prepend-constants.php delete mode 100755 tests/phpstan.sh diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 720ee22..80c2c68 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -1,89 +1,101 @@ name: PHP tests on: [push, pull_request] jobs: - # Check there is no syntax errors in the project php-linter: - name: PHP Syntax check 7.2 => 8.2 + name: PHP Syntax check 7.2 => 8.5 runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3.1.0 + uses: actions/checkout@v6 - name: PHP syntax checker 7.2 uses: prestashop/github-action-php-lint/7.2@master - - name: PHP syntax checker 7.3 - uses: prestashop/github-action-php-lint/7.3@master - - name: PHP syntax checker 7.4 uses: prestashop/github-action-php-lint/7.4@master - name: PHP syntax checker 8.0 uses: prestashop/github-action-php-lint/8.0@master - - name: PHP syntax checker 8.1 - uses: prestashop/github-action-php-lint/8.1@master - - - name: PHP syntax checker 8.2 - uses: prestashop/github-action-php-lint/8.2@master + - name: PHP syntax checker 8.5 + uses: prestashop/github-action-php-lint/8.5@master # Check the PHP code follow the coding standards php-cs-fixer: name: PHP-CS-Fixer runs-on: ubuntu-latest steps: - - name: Setup PHP - uses: shivammathur/setup-php@v2 + - name: Run PHP-CS-Fixer + uses: PrestaShop/.github/.github/actions/php-ci/php-cs@master with: php-version: '7.4' - - name: Checkout - uses: actions/checkout@v3.1.0 - - - name: Cache dependencies - uses: actions/cache@v3 + # Run PHPStan against the module (PHP 7.4 – 8.1) + phpstan-74: + name: PHPStan (PHP 7.4 - 8.1) + runs-on: ubuntu-latest + strategy: + matrix: + presta_version: ['8.1.7', '8.2.x'] + php_version: ['7.4', '8.1'] + fail-fast: false + env: + PHPRC: ${{ github.workspace }}/${{ github.event.repository.name }}/.phpstan-php-ini + steps: + - name: Checkout repository + uses: actions/checkout@v6 with: - path: vendor - key: php-${{ hashFiles('composer.lock') }} - - - name: Install dependencies - run: composer install - - - name: Run PHP-CS-Fixer - run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no - - # Run PHPStan against the module and a PrestaShop release + path: ${{ github.event.repository.name }} + + - name: Prepare PHP env for PrestaShop 8 (define constants before any bootstrap) + run: | + mkdir -p ${{ github.event.repository.name }}/.phpstan-php-ini + { + echo "auto_prepend_file=$GITHUB_WORKSPACE/${{ github.event.repository.name }}/tests/php/phpstan/prepend-constants.php" + echo "memory_limit=512M" + } > ${{ github.event.repository.name }}/.phpstan-php-ini/php.ini + + - name: Run PHPStan + uses: PrestaShop/.github/.github/actions/php-ci/phpstan@master + with: + php-version: ${{ matrix.php_version }} + presta-version: ${{ matrix.presta_version }} + module-name: ${{ github.event.repository.name }} + phpstan-level: '5' + phpstan-config: tests/php/phpstan/phpstan-${{ matrix.presta_version }}.neon + phpstan-version: '^0.12' + composer-version: '2.2.18' + + # Run PHPStan against the module (PHP 8.1 – 8.5) phpstan: - name: PHPStan + name: PHPStan (PHP 8.1 - 8.5) runs-on: ubuntu-latest strategy: matrix: - presta-versions: ['1.7.7', '1.7.8', '8.0', 'latest'] + presta_version: ['9.1.x', 'develop'] + php_version: ['8.1', '8.5'] + fail-fast: false + env: + PHPRC: ${{ github.workspace }}/${{ github.event.repository.name }}/.phpstan-php-ini steps: - - name: Setup PHP - uses: shivammathur/setup-php@v2 + - name: Checkout repository + uses: actions/checkout@v6 with: - php-version: '7.4' - - - name: Checkout - uses: actions/checkout@v3.1.0 - - # Add vendor folder in cache to make next builds faster - - name: Cache vendor folder - uses: actions/cache@v3 - with: - path: vendor - key: php-${{ hashFiles('composer.lock') }} - - # Add composer local folder in cache to make next builds faster - - name: Cache composer folder - uses: actions/cache@v3 + path: ${{ github.event.repository.name }} + + - name: Prepare PHP env for PrestaShop 9.1.x and later (define constants before any bootstrap) + run: | + mkdir -p ${{ github.event.repository.name }}/.phpstan-php-ini + { + echo "auto_prepend_file=$GITHUB_WORKSPACE/${{ github.event.repository.name }}/tests/php/phpstan/prepend-constants.php" + echo "memory_limit=512M" + } > ${{ github.event.repository.name }}/.phpstan-php-ini/php.ini + + - name: Run PHPStan + uses: PrestaShop/.github/.github/actions/php-ci/phpstan@master with: - path: ~/.composer/cache - key: php-composer-cache - - - run: composer install - - # Docker images prestashop/prestashop may be used, even if the shop remains uninstalled - - name: Execute PHPStan on PrestaShop (Tag ${{ matrix.presta-versions }}) - run: ./tests/phpstan.sh ${{ matrix.presta-versions }} + php-version: ${{ matrix.php_version }} + presta-version: ${{ matrix.presta_version }} + module-name: ${{ github.event.repository.name }} + phpstan-level: '5' + phpstan-config: tests/php/phpstan/phpstan-${{ matrix.presta_version }}.neon diff --git a/tests/php/phpstan/index.php b/tests/php/phpstan/index.php new file mode 100644 index 0000000..30c3516 --- /dev/null +++ b/tests/php/phpstan/index.php @@ -0,0 +1,8 @@ + Date: Tue, 2 Jun 2026 19:53:56 +0200 Subject: [PATCH 03/11] CI: fix php-cs-fixer and add ignoreErrors for PS 8.x PHPStan jobs - Add missing blank line after --- tests/php/phpstan/index.php | 1 + tests/php/phpstan/phpstan-8.1.7.neon | 2 ++ tests/php/phpstan/phpstan-8.2.x.neon | 2 ++ 3 files changed, 5 insertions(+) diff --git a/tests/php/phpstan/index.php b/tests/php/phpstan/index.php index 30c3516..63eec81 100644 --- a/tests/php/phpstan/index.php +++ b/tests/php/phpstan/index.php @@ -1,4 +1,5 @@ Date: Fri, 5 Jun 2026 15:14:36 +0200 Subject: [PATCH 04/11] Fix PHPStan getPages() array offset errors instead of suppressing them Declare the full row shape returned by executeS() via a @var PHPDoc and stop mutating $row['http_referer'] (use a local $httpReferer variable), so PHPStan no longer narrows $row to array{http_referer: string} and correctly recognizes the request_uri and nb offsets. Cast nb to int for the counter arithmetic. Removes the now-unneeded ignoreErrors from the PS 8.x PHPStan configs. Fixes #45 Co-Authored-By: Claude Opus 4.8 (1M context) --- pagesnotfound.php | 11 ++++++----- tests/php/phpstan/phpstan-8.1.7.neon | 5 ----- tests/php/phpstan/phpstan-8.2.x.neon | 5 ----- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/pagesnotfound.php b/pagesnotfound.php index 5692a28..1456e6c 100644 --- a/pagesnotfound.php +++ b/pagesnotfound.php @@ -75,19 +75,20 @@ private function getPages() WHERE date_add BETWEEN ' . ModuleGraph::getDateBetween() . Shop::addSqlRestriction() . 'GROUP BY http_referer, request_uri'; + /** @var array $result */ $result = Db::getInstance((bool) _PS_USE_SQL_SLAVE_)->executeS($sql); $pages = []; foreach ($result as $row) { - $row['http_referer'] = parse_url($row['http_referer'], PHP_URL_HOST) . parse_url($row['http_referer'], PHP_URL_PATH); - if (!isset($row['http_referer']) || empty($row['http_referer'])) { - $row['http_referer'] = '--'; + $httpReferer = parse_url($row['http_referer'], PHP_URL_HOST) . parse_url($row['http_referer'], PHP_URL_PATH); + if (empty($httpReferer)) { + $httpReferer = '--'; } if (!isset($pages[$row['request_uri']])) { $pages[$row['request_uri']] = ['nb' => 0]; } - $pages[$row['request_uri']][$row['http_referer']] = $row['nb']; - $pages[$row['request_uri']]['nb'] += $row['nb']; + $pages[$row['request_uri']][$httpReferer] = (int) $row['nb']; + $pages[$row['request_uri']]['nb'] += (int) $row['nb']; } uasort($pages, 'pnfSort'); diff --git a/tests/php/phpstan/phpstan-8.1.7.neon b/tests/php/phpstan/phpstan-8.1.7.neon index 853420b..efa856c 100644 --- a/tests/php/phpstan/phpstan-8.1.7.neon +++ b/tests/php/phpstan/phpstan-8.1.7.neon @@ -1,7 +1,2 @@ includes: - %currentWorkingDirectory%/tests/php/phpstan/phpstan.neon - -parameters: - ignoreErrors: - - '#Offset .* on array\{http_referer: .*\} in isset\(\) always exists and is not nullable\.#' - - '#Offset .* does not exist on array\{http_referer: .*\}\.#' diff --git a/tests/php/phpstan/phpstan-8.2.x.neon b/tests/php/phpstan/phpstan-8.2.x.neon index 853420b..efa856c 100644 --- a/tests/php/phpstan/phpstan-8.2.x.neon +++ b/tests/php/phpstan/phpstan-8.2.x.neon @@ -1,7 +1,2 @@ includes: - %currentWorkingDirectory%/tests/php/phpstan/phpstan.neon - -parameters: - ignoreErrors: - - '#Offset .* on array\{http_referer: .*\} in isset\(\) always exists and is not nullable\.#' - - '#Offset .* does not exist on array\{http_referer: .*\}\.#' From fd58f57cb19348768794dc12f3fd3904669beed1 Mon Sep 17 00:00:00 2001 From: mattgoud Date: Fri, 5 Jun 2026 15:40:37 +0200 Subject: [PATCH 05/11] Align min PS compatibility with CI matrix and drop legacy phpstan configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The PHPStan CI no longer covers PS 1.7.x / 8.0 (the shared PrestaShop/.github action targets 8.1.7+). Bump ps_versions_compliancy min from 1.7.7 to 8.1.0 so the declared support matches what CI actually verifies, consistent with sibling native modules (ps_googleanalytics, ps_emailsubscription). Also remove the orphaned tests/phpstan/ directory (1.7.7/1.7.8/8.0/latest neon configs) left behind by the migration to tests/php/phpstan/ — no workflow references it anymore. Co-Authored-By: Claude Opus 4.8 (1M context) --- pagesnotfound.php | 2 +- tests/phpstan/index.php | 34 ------------------------------- tests/phpstan/phpstan-1.7.7.neon | 2 -- tests/phpstan/phpstan-1.7.8.neon | 2 -- tests/phpstan/phpstan-8.0.neon | 2 -- tests/phpstan/phpstan-latest.neon | 2 -- tests/phpstan/phpstan.neon | 8 -------- 7 files changed, 1 insertion(+), 51 deletions(-) delete mode 100644 tests/phpstan/index.php delete mode 100644 tests/phpstan/phpstan-1.7.7.neon delete mode 100644 tests/phpstan/phpstan-1.7.8.neon delete mode 100644 tests/phpstan/phpstan-8.0.neon delete mode 100644 tests/phpstan/phpstan-latest.neon delete mode 100644 tests/phpstan/phpstan.neon diff --git a/pagesnotfound.php b/pagesnotfound.php index 1456e6c..890f643 100644 --- a/pagesnotfound.php +++ b/pagesnotfound.php @@ -37,7 +37,7 @@ public function __construct() $this->displayName = $this->trans('Pages not found', [], 'Modules.Pagesnotfound.Admin'); $this->description = $this->trans('Enrich your stats, display the pages requested by your visitors that could not be found.', [], 'Modules.Pagesnotfound.Admin'); - $this->ps_versions_compliancy = ['min' => '1.7.7', 'max' => _PS_VERSION_]; + $this->ps_versions_compliancy = ['min' => '8.1.0', 'max' => _PS_VERSION_]; } public function install() diff --git a/tests/phpstan/index.php b/tests/phpstan/index.php deleted file mode 100644 index 45df26c..0000000 --- a/tests/phpstan/index.php +++ /dev/null @@ -1,34 +0,0 @@ - - * @copyright Since 2007 PrestaShop SA and Contributors - * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) - */ -header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); -header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); - -header('Cache-Control: no-store, no-cache, must-revalidate'); -header('Cache-Control: post-check=0, pre-check=0', false); -header('Pragma: no-cache'); - -header('Location: ../'); -exit; diff --git a/tests/phpstan/phpstan-1.7.7.neon b/tests/phpstan/phpstan-1.7.7.neon deleted file mode 100644 index c604f7c..0000000 --- a/tests/phpstan/phpstan-1.7.7.neon +++ /dev/null @@ -1,2 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/phpstan/phpstan.neon diff --git a/tests/phpstan/phpstan-1.7.8.neon b/tests/phpstan/phpstan-1.7.8.neon deleted file mode 100644 index c604f7c..0000000 --- a/tests/phpstan/phpstan-1.7.8.neon +++ /dev/null @@ -1,2 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/phpstan/phpstan.neon diff --git a/tests/phpstan/phpstan-8.0.neon b/tests/phpstan/phpstan-8.0.neon deleted file mode 100644 index c604f7c..0000000 --- a/tests/phpstan/phpstan-8.0.neon +++ /dev/null @@ -1,2 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/phpstan/phpstan.neon diff --git a/tests/phpstan/phpstan-latest.neon b/tests/phpstan/phpstan-latest.neon deleted file mode 100644 index c604f7c..0000000 --- a/tests/phpstan/phpstan-latest.neon +++ /dev/null @@ -1,2 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/phpstan/phpstan.neon diff --git a/tests/phpstan/phpstan.neon b/tests/phpstan/phpstan.neon deleted file mode 100644 index 4d709d0..0000000 --- a/tests/phpstan/phpstan.neon +++ /dev/null @@ -1,8 +0,0 @@ -includes: - - %currentWorkingDirectory%/vendor/prestashop/php-dev-tools/phpstan/ps-module-extension.neon -parameters: - paths: - # From PHPStan 0.12, paths to check are relative to the neon file - - ../../pagesnotfound.php - - ../../upgrade/ - level: 5 From 2f8633348c67ded126253c474482cca6ff18e3d4 Mon Sep 17 00:00:00 2001 From: mattgoud Date: Fri, 5 Jun 2026 16:14:38 +0200 Subject: [PATCH 06/11] Drop empty ignoreErrors placeholder from 9.1.x and develop neon configs All four version-specific PHPStan configs now contain only the `includes` block, removing the leftover empty `parameters: / ignoreErrors:` scaffolding that suppressed nothing. Consistent across versions. Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/php/phpstan/phpstan-9.1.x.neon | 3 --- tests/php/phpstan/phpstan-develop.neon | 3 --- 2 files changed, 6 deletions(-) diff --git a/tests/php/phpstan/phpstan-9.1.x.neon b/tests/php/phpstan/phpstan-9.1.x.neon index a5ad764..efa856c 100644 --- a/tests/php/phpstan/phpstan-9.1.x.neon +++ b/tests/php/phpstan/phpstan-9.1.x.neon @@ -1,5 +1,2 @@ includes: - %currentWorkingDirectory%/tests/php/phpstan/phpstan.neon - -parameters: - ignoreErrors: diff --git a/tests/php/phpstan/phpstan-develop.neon b/tests/php/phpstan/phpstan-develop.neon index a5ad764..efa856c 100644 --- a/tests/php/phpstan/phpstan-develop.neon +++ b/tests/php/phpstan/phpstan-develop.neon @@ -1,5 +1,2 @@ includes: - %currentWorkingDirectory%/tests/php/phpstan/phpstan.neon - -parameters: - ignoreErrors: From a098271ee25698fc263843ff586eadee9ea4d1a9 Mon Sep 17 00:00:00 2001 From: mattgoud Date: Mon, 8 Jun 2026 17:16:04 +0200 Subject: [PATCH 07/11] Align module on PrestaShop 8.2+ minimum (Epic #41648) Drop the 8.1.7 target to match the project-wide module cleanup Epic which standardizes native modules on PS 8.2+: - php.yml: phpstan-74 matrix now runs against 8.2.x only (PHP 7.4/8.1) - ps_versions_compliancy min bumped 8.1.0 -> 8.2.0 - remove the now-unreferenced phpstan-8.1.7.neon config Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/php.yml | 2 +- pagesnotfound.php | 2 +- tests/php/phpstan/phpstan-8.1.7.neon | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 tests/php/phpstan/phpstan-8.1.7.neon diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 80c2c68..f1d18a1 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -36,7 +36,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - presta_version: ['8.1.7', '8.2.x'] + presta_version: ['8.2.x'] php_version: ['7.4', '8.1'] fail-fast: false env: diff --git a/pagesnotfound.php b/pagesnotfound.php index 890f643..c8a52d0 100644 --- a/pagesnotfound.php +++ b/pagesnotfound.php @@ -37,7 +37,7 @@ public function __construct() $this->displayName = $this->trans('Pages not found', [], 'Modules.Pagesnotfound.Admin'); $this->description = $this->trans('Enrich your stats, display the pages requested by your visitors that could not be found.', [], 'Modules.Pagesnotfound.Admin'); - $this->ps_versions_compliancy = ['min' => '8.1.0', 'max' => _PS_VERSION_]; + $this->ps_versions_compliancy = ['min' => '8.2.0', 'max' => _PS_VERSION_]; } public function install() diff --git a/tests/php/phpstan/phpstan-8.1.7.neon b/tests/php/phpstan/phpstan-8.1.7.neon deleted file mode 100644 index efa856c..0000000 --- a/tests/php/phpstan/phpstan-8.1.7.neon +++ /dev/null @@ -1,2 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/php/phpstan/phpstan.neon From 5ab3728a19b814af3a0abf99781a667a5cb0b5ca Mon Sep 17 00:00:00 2001 From: mattgoud Date: Tue, 9 Jun 2026 16:18:08 +0200 Subject: [PATCH 08/11] CI: address review - full PHP lint matrix, PHPStan floor 7.2, add PS 9.0.3 - php-linter: add missing intermediate syntax checks (7.3, 8.1, 8.2, 8.3, 8.4) - phpstan-74: lower floor to PHP 7.2 (real minimum for PS 8.2.x) - phpstan: add PrestaShop 9.0.3 (tag) + neon config Part of PrestaShop/PrestaShop#41648 Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/php.yml | 23 +++++++++++++++++++---- tests/php/phpstan/phpstan-9.0.3.neon | 2 ++ 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 tests/php/phpstan/phpstan-9.0.3.neon diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index f1d18a1..1c3762d 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -11,12 +11,27 @@ jobs: - name: PHP syntax checker 7.2 uses: prestashop/github-action-php-lint/7.2@master + - name: PHP syntax checker 7.3 + uses: prestashop/github-action-php-lint/7.3@master + - name: PHP syntax checker 7.4 uses: prestashop/github-action-php-lint/7.4@master - name: PHP syntax checker 8.0 uses: prestashop/github-action-php-lint/8.0@master + - name: PHP syntax checker 8.1 + uses: prestashop/github-action-php-lint/8.1@master + + - name: PHP syntax checker 8.2 + uses: prestashop/github-action-php-lint/8.2@master + + - name: PHP syntax checker 8.3 + uses: prestashop/github-action-php-lint/8.3@master + + - name: PHP syntax checker 8.4 + uses: prestashop/github-action-php-lint/8.4@master + - name: PHP syntax checker 8.5 uses: prestashop/github-action-php-lint/8.5@master @@ -30,14 +45,14 @@ jobs: with: php-version: '7.4' - # Run PHPStan against the module (PHP 7.4 – 8.1) + # Run PHPStan against the module (PHP 7.2 – 8.1) phpstan-74: - name: PHPStan (PHP 7.4 - 8.1) + name: PHPStan (PHP 7.2 - 8.1) runs-on: ubuntu-latest strategy: matrix: presta_version: ['8.2.x'] - php_version: ['7.4', '8.1'] + php_version: ['7.2', '8.1'] fail-fast: false env: PHPRC: ${{ github.workspace }}/${{ github.event.repository.name }}/.phpstan-php-ini @@ -72,7 +87,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - presta_version: ['9.1.x', 'develop'] + presta_version: ['9.0.3', '9.1.x', 'develop'] php_version: ['8.1', '8.5'] fail-fast: false env: diff --git a/tests/php/phpstan/phpstan-9.0.3.neon b/tests/php/phpstan/phpstan-9.0.3.neon new file mode 100644 index 0000000..efa856c --- /dev/null +++ b/tests/php/phpstan/phpstan-9.0.3.neon @@ -0,0 +1,2 @@ +includes: + - %currentWorkingDirectory%/tests/php/phpstan/phpstan.neon From 1298dedde842fd3e6806344c29fe56b403ea4431 Mon Sep 17 00:00:00 2001 From: Matthias Goudjil <99822883+mattgoud@users.noreply.github.com> Date: Wed, 10 Jun 2026 09:50:46 +0200 Subject: [PATCH 09/11] Update .github/workflows/php.yml Co-authored-by: Jonathan Lelievre --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 1c3762d..b0c051b 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -98,7 +98,7 @@ jobs: with: path: ${{ github.event.repository.name }} - - name: Prepare PHP env for PrestaShop 9.1.x and later (define constants before any bootstrap) + - name: Prepare PHP env for PrestaShop ${{ matrix.presta_version }} (define constants before any bootstrap) run: | mkdir -p ${{ github.event.repository.name }}/.phpstan-php-ini { From c88f42c143245fb82d5a2aa462574e857d08728b Mon Sep 17 00:00:00 2001 From: mattgoud Date: Wed, 10 Jun 2026 14:48:23 +0200 Subject: [PATCH 10/11] CI: exclude unsupported PHP 8.5 for PrestaShop 9.0.x in PHPStan matrix PrestaShop 9.0.x supports PHP 8.1 up to 8.4 only, so the cross-product matrix was generating an invalid 9.0.3 x 8.5 combination. Switch to an explicit include list so each PrestaShop version tests its proper PHP floor and ceiling (9.0.3: 8.1/8.4, 9.1.x and develop: 8.1/8.5). Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/php.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index b0c051b..2b056dd 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -87,8 +87,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - presta_version: ['9.0.3', '9.1.x', 'develop'] - php_version: ['8.1', '8.5'] + include: + # PrestaShop 9.0.x supports PHP 8.1 up to 8.4 (8.5 is not supported) + - { presta_version: '9.0.3', php_version: '8.1' } + - { presta_version: '9.0.3', php_version: '8.4' } + # PrestaShop 9.1.x and develop support PHP 8.1 up to 8.5 + - { presta_version: '9.1.x', php_version: '8.1' } + - { presta_version: '9.1.x', php_version: '8.5' } + - { presta_version: 'develop', php_version: '8.1' } + - { presta_version: 'develop', php_version: '8.5' } fail-fast: false env: PHPRC: ${{ github.workspace }}/${{ github.event.repository.name }}/.phpstan-php-ini From 1c3393a2ea1011c7c485bee2318396e85083d369 Mon Sep 17 00:00:00 2001 From: mattgoud Date: Thu, 11 Jun 2026 10:56:46 +0200 Subject: [PATCH 11/11] Bump module version to 4.0.0 Co-Authored-By: Claude Opus 4.8 (1M context) --- config.xml | 2 +- pagesnotfound.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.xml b/config.xml index c1a97b4..e5968ba 100755 --- a/config.xml +++ b/config.xml @@ -2,7 +2,7 @@ pagesnotfound - + diff --git a/pagesnotfound.php b/pagesnotfound.php index c8a52d0..7fb62db 100644 --- a/pagesnotfound.php +++ b/pagesnotfound.php @@ -29,7 +29,7 @@ public function __construct() { $this->name = 'pagesnotfound'; $this->tab = 'administration'; - $this->version = '3.0.0'; + $this->version = '4.0.0'; $this->author = 'PrestaShop'; $this->need_instance = 0;