From 4e64b4ffb47f9dffd239665a3217f72614da04dd Mon Sep 17 00:00:00 2001 From: mattgoud Date: Tue, 2 Jun 2026 17:04:09 +0200 Subject: [PATCH 1/8] CI: remove PHPStan job targeting PrestaShop 9.0.x The 9.0.x branch no longer exists. PHPStan coverage for PS 9.x is already provided by the phpstan job targeting 9.1.x and develop. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/php.yml | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 45c9ed4..92dcb60 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -66,40 +66,6 @@ jobs: phpstan-version: '^0.12' composer-version: '2.2.18' - # Run PHPStan against the module (PHP 8.1 – 8.4) - phpstan-80-84: - name: PHPStan (PHP 8.1 - 8.4 ) - runs-on: ubuntu-latest - strategy: - matrix: - presta_version: ['9.0.x'] - php_version: ['8.1', '8.4'] - fail-fast: false - env: - PHPRC: ${{ github.workspace }}/${{ github.event.repository.name }}/.phpstan-php-ini - steps: - - name: Checkout repository - uses: actions/checkout@v6 - with: - path: ${{ github.event.repository.name }} - - - name: Prepare PHP env for PrestaShop 9.0.x (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 - # Run PHPStan against the module (PHP 8.1 – 8.5) phpstan: name: PHPStan (PHP 8.1 - 8.5) From e686cc5c68cb0c276b14e2966c3824d90f4f14cd Mon Sep 17 00:00:00 2001 From: mattgoud Date: Mon, 8 Jun 2026 17:49:18 +0200 Subject: [PATCH 2/8] 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 to 8.2.0 - remove the now-unreferenced phpstan-8.1.7.neon config - remove the orphaned phpstan-9.0.x.neon config (no longer in the matrix) Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/php.yml | 2 +- ps_googleanalytics.php | 2 +- tests/php/phpstan/phpstan-8.1.7.neon | 10 ---------- tests/php/phpstan/phpstan-9.0.x.neon | 9 --------- 4 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 tests/php/phpstan/phpstan-8.1.7.neon delete mode 100644 tests/php/phpstan/phpstan-9.0.x.neon diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 92dcb60..4ed444f 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/ps_googleanalytics.php b/ps_googleanalytics.php index af89082..8741298 100644 --- a/ps_googleanalytics.php +++ b/ps_googleanalytics.php @@ -48,7 +48,7 @@ public function __construct() $this->name = 'ps_googleanalytics'; $this->tab = 'analytics_stats'; $this->version = '5.0.3'; - $this->ps_versions_compliancy = ['min' => '8.1.0', 'max' => _PS_VERSION_]; + $this->ps_versions_compliancy = ['min' => '8.2.0', 'max' => _PS_VERSION_]; $this->author = 'PrestaShop'; $this->module_key = 'fd2aaefea84ac1bb512e6f1878d990b8'; $this->bootstrap = true; 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 c02374b..0000000 --- a/tests/php/phpstan/phpstan-8.1.7.neon +++ /dev/null @@ -1,10 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/php/phpstan/phpstan.neon - -parameters: - ignoreErrors: - - '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#' - - '#Access to an undefined property Cookie\:\:\$ga_admin_order.#' - - '#Access to an undefined property Cookie\:\:\$ga_admin_refund.#' - - '#Property PrestaShop\\Module\\Ps_Googleanalytics\\Hooks\\HookActionValidateOrder::\$module is never read, only written\.#' - - '#Method PrestaShop\\Module\\Ps_Googleanalytics\\Hooks\\HookDisplayBeforeBodyClosingTag::renderCartpage\(\) is unused\.#' \ No newline at end of file diff --git a/tests/php/phpstan/phpstan-9.0.x.neon b/tests/php/phpstan/phpstan-9.0.x.neon deleted file mode 100644 index 00dcfae..0000000 --- a/tests/php/phpstan/phpstan-9.0.x.neon +++ /dev/null @@ -1,9 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/php/phpstan/phpstan.neon - -parameters: - ignoreErrors: - - '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#' - - '#Access to an undefined property Cookie\:\:\$ga_admin_order.#' - - '#Access to an undefined property Cookie\:\:\$ga_admin_refund.#' - - '#Property PrestaShop\\Module\\Ps_Googleanalytics\\Hooks\\HookActionValidateOrder::\$module is never read, only written\.#' \ No newline at end of file From a35abd8b094925d3f48805f5cb4f1ecf9dbaeeae Mon Sep 17 00:00:00 2001 From: mattgoud Date: Mon, 8 Jun 2026 17:58:50 +0200 Subject: [PATCH 3/8] Remove orphaned legacy PHPStan neon configs (Epic #41648) Drop dead PHPStan configs no longer referenced by the CI matrix (targeting PrestaShop versions < 8.2): - phpstan-1.7.7.neon - phpstan-1.7.8.neon - phpstan-8.0.neon - phpstan-latest.neon Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/php/phpstan/phpstan-1.7.7.neon | 9 --------- tests/php/phpstan/phpstan-1.7.8.neon | 8 -------- tests/php/phpstan/phpstan-8.0.neon | 8 -------- tests/php/phpstan/phpstan-latest.neon | 8 -------- 4 files changed, 33 deletions(-) delete mode 100644 tests/php/phpstan/phpstan-1.7.7.neon delete mode 100644 tests/php/phpstan/phpstan-1.7.8.neon delete mode 100644 tests/php/phpstan/phpstan-8.0.neon delete mode 100644 tests/php/phpstan/phpstan-latest.neon diff --git a/tests/php/phpstan/phpstan-1.7.7.neon b/tests/php/phpstan/phpstan-1.7.7.neon deleted file mode 100644 index caca568..0000000 --- a/tests/php/phpstan/phpstan-1.7.7.neon +++ /dev/null @@ -1,9 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/phpstan/phpstan.neon - -parameters: - ignoreErrors: - - '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#' - - '#Access to an undefined property Cookie\:\:\$ga_admin_order.#' - - '#Access to an undefined property Cookie\:\:\$ga_admin_refund.#' - - '#Parameter \#1 \$value of method ControllerCore::ajaxRender\(\) expects null, string given.#' diff --git a/tests/php/phpstan/phpstan-1.7.8.neon b/tests/php/phpstan/phpstan-1.7.8.neon deleted file mode 100644 index 364a960..0000000 --- a/tests/php/phpstan/phpstan-1.7.8.neon +++ /dev/null @@ -1,8 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/phpstan/phpstan.neon - -parameters: - ignoreErrors: - - '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#' - - '#Access to an undefined property Cookie\:\:\$ga_admin_order.#' - - '#Access to an undefined property Cookie\:\:\$ga_admin_refund.#' diff --git a/tests/php/phpstan/phpstan-8.0.neon b/tests/php/phpstan/phpstan-8.0.neon deleted file mode 100644 index 364a960..0000000 --- a/tests/php/phpstan/phpstan-8.0.neon +++ /dev/null @@ -1,8 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/phpstan/phpstan.neon - -parameters: - ignoreErrors: - - '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#' - - '#Access to an undefined property Cookie\:\:\$ga_admin_order.#' - - '#Access to an undefined property Cookie\:\:\$ga_admin_refund.#' diff --git a/tests/php/phpstan/phpstan-latest.neon b/tests/php/phpstan/phpstan-latest.neon deleted file mode 100644 index 364a960..0000000 --- a/tests/php/phpstan/phpstan-latest.neon +++ /dev/null @@ -1,8 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/phpstan/phpstan.neon - -parameters: - ignoreErrors: - - '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#' - - '#Access to an undefined property Cookie\:\:\$ga_admin_order.#' - - '#Access to an undefined property Cookie\:\:\$ga_admin_refund.#' From 3b86d3c9b181efbafa14b36cfe7164d62bd66fff Mon Sep 17 00:00:00 2001 From: mattgoud Date: Mon, 8 Jun 2026 18:11:49 +0200 Subject: [PATCH 4/8] Fix renderCartPage() PHPStan error; document remaining suppressions (Epic #41648) renderCartPage(): the method definition used a different case (renderCartpage) than its call site at run() (renderCartPage). PHP method names are case-insensitive so it worked at runtime, but the PHPStan 0.12 job flagged the definition as unused. Align the casing and drop its ignoreErrors entry. The remaining ignoreErrors are genuine framework/structural limitations, now documented inline in the neon configs: - Cookie magic __get/__set properties (ga_admin_order / ga_admin_refund) - parent::uninstall() called through a closure rebound via Closure::bindTo() - HookActionValidateOrder::$module: HookInterface mandates the (Ps_Googleanalytics $module, Context) constructor signature, so $module must be stored even though this hook never reads it back Co-Authored-By: Claude Opus 4.8 (1M context) --- classes/Hook/HookDisplayBeforeBodyClosingTag.php | 2 +- tests/php/phpstan/phpstan-8.2.x.neon | 7 ++++++- tests/php/phpstan/phpstan-9.1.x.neon | 8 +++++++- tests/php/phpstan/phpstan-develop.neon | 8 +++++++- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/classes/Hook/HookDisplayBeforeBodyClosingTag.php b/classes/Hook/HookDisplayBeforeBodyClosingTag.php index 33457ff..24e3a8c 100644 --- a/classes/Hook/HookDisplayBeforeBodyClosingTag.php +++ b/classes/Hook/HookDisplayBeforeBodyClosingTag.php @@ -140,7 +140,7 @@ private function renderSearch() /** * This method renders tracking code for product listings, like category pages. */ - private function renderCartpage() + private function renderCartPage() { // Check if we are on cart page if ($this->context->controller->php_self != 'cart') { diff --git a/tests/php/phpstan/phpstan-8.2.x.neon b/tests/php/phpstan/phpstan-8.2.x.neon index c02374b..914a4e6 100644 --- a/tests/php/phpstan/phpstan-8.2.x.neon +++ b/tests/php/phpstan/phpstan-8.2.x.neon @@ -3,8 +3,13 @@ includes: parameters: ignoreErrors: + # Framework / structural limitations that cannot be fixed in module code: + # - uninstallModule() calls parent::uninstall() through a closure rebound to the + # target module via Closure::bindTo(), a pattern PHPStan cannot statically resolve. + # - Cookie uses magic __get/__set, so its dynamic properties are undefined to PHPStan. + # - HookInterface mandates the constructor signature (Ps_Googleanalytics $module, Context), + # so $module must be stored even in hooks that never read it back. - '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#' - '#Access to an undefined property Cookie\:\:\$ga_admin_order.#' - '#Access to an undefined property Cookie\:\:\$ga_admin_refund.#' - '#Property PrestaShop\\Module\\Ps_Googleanalytics\\Hooks\\HookActionValidateOrder::\$module is never read, only written\.#' - - '#Method PrestaShop\\Module\\Ps_Googleanalytics\\Hooks\\HookDisplayBeforeBodyClosingTag::renderCartpage\(\) is unused\.#' \ No newline at end of file diff --git a/tests/php/phpstan/phpstan-9.1.x.neon b/tests/php/phpstan/phpstan-9.1.x.neon index 00dcfae..914a4e6 100644 --- a/tests/php/phpstan/phpstan-9.1.x.neon +++ b/tests/php/phpstan/phpstan-9.1.x.neon @@ -3,7 +3,13 @@ includes: parameters: ignoreErrors: + # Framework / structural limitations that cannot be fixed in module code: + # - uninstallModule() calls parent::uninstall() through a closure rebound to the + # target module via Closure::bindTo(), a pattern PHPStan cannot statically resolve. + # - Cookie uses magic __get/__set, so its dynamic properties are undefined to PHPStan. + # - HookInterface mandates the constructor signature (Ps_Googleanalytics $module, Context), + # so $module must be stored even in hooks that never read it back. - '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#' - '#Access to an undefined property Cookie\:\:\$ga_admin_order.#' - '#Access to an undefined property Cookie\:\:\$ga_admin_refund.#' - - '#Property PrestaShop\\Module\\Ps_Googleanalytics\\Hooks\\HookActionValidateOrder::\$module is never read, only written\.#' \ No newline at end of file + - '#Property PrestaShop\\Module\\Ps_Googleanalytics\\Hooks\\HookActionValidateOrder::\$module is never read, only written\.#' diff --git a/tests/php/phpstan/phpstan-develop.neon b/tests/php/phpstan/phpstan-develop.neon index 00dcfae..914a4e6 100644 --- a/tests/php/phpstan/phpstan-develop.neon +++ b/tests/php/phpstan/phpstan-develop.neon @@ -3,7 +3,13 @@ includes: parameters: ignoreErrors: + # Framework / structural limitations that cannot be fixed in module code: + # - uninstallModule() calls parent::uninstall() through a closure rebound to the + # target module via Closure::bindTo(), a pattern PHPStan cannot statically resolve. + # - Cookie uses magic __get/__set, so its dynamic properties are undefined to PHPStan. + # - HookInterface mandates the constructor signature (Ps_Googleanalytics $module, Context), + # so $module must be stored even in hooks that never read it back. - '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#' - '#Access to an undefined property Cookie\:\:\$ga_admin_order.#' - '#Access to an undefined property Cookie\:\:\$ga_admin_refund.#' - - '#Property PrestaShop\\Module\\Ps_Googleanalytics\\Hooks\\HookActionValidateOrder::\$module is never read, only written\.#' \ No newline at end of file + - '#Property PrestaShop\\Module\\Ps_Googleanalytics\\Hooks\\HookActionValidateOrder::\$module is never read, only written\.#' From 0e6ea26e3ab3e4b73773277c61dcb2bca7b6ab94 Mon Sep 17 00:00:00 2001 From: mattgoud Date: Tue, 9 Jun 2026 16:12:50 +0200 Subject: [PATCH 5/8] 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, the 9.0.x branch no longer exists) + 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 4ed444f..d6f21b2 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 2ca956c2ca7889af7349dce6314aac02cd0f4f03 Mon Sep 17 00:00:00 2001 From: mattgoud Date: Tue, 9 Jun 2026 17:25:09 +0200 Subject: [PATCH 6/8] CI: fix failing PHPStan jobs - phpstan-9.0.3.neon was missing the ignoreErrors block (framework/structural limitations), so the PS 9.0.3 jobs reported them as errors; align it with the 9.1.x/develop configs - restore the phpstan-74 floor to PHP 7.4: the module's dev tooling (prestashop/php-dev-tools) pulls a dependency requiring PHP >= 7.4, so composer install fails on 7.2 (php-linter still covers 7.2 at the syntax level) Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/php.yml | 6 +++--- tests/php/phpstan/phpstan-9.0.3.neon | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index d6f21b2..a46ca91 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -45,14 +45,14 @@ jobs: with: php-version: '7.4' - # Run PHPStan against the module (PHP 7.2 – 8.1) + # Run PHPStan against the module (PHP 7.4 – 8.1) phpstan-74: - name: PHPStan (PHP 7.2 - 8.1) + name: PHPStan (PHP 7.4 - 8.1) runs-on: ubuntu-latest strategy: matrix: presta_version: ['8.2.x'] - php_version: ['7.2', '8.1'] + php_version: ['7.4', '8.1'] fail-fast: false env: PHPRC: ${{ github.workspace }}/${{ github.event.repository.name }}/.phpstan-php-ini diff --git a/tests/php/phpstan/phpstan-9.0.3.neon b/tests/php/phpstan/phpstan-9.0.3.neon index efa856c..914a4e6 100644 --- a/tests/php/phpstan/phpstan-9.0.3.neon +++ b/tests/php/phpstan/phpstan-9.0.3.neon @@ -1,2 +1,15 @@ includes: - - %currentWorkingDirectory%/tests/php/phpstan/phpstan.neon + - %currentWorkingDirectory%/tests/php/phpstan/phpstan.neon + +parameters: + ignoreErrors: + # Framework / structural limitations that cannot be fixed in module code: + # - uninstallModule() calls parent::uninstall() through a closure rebound to the + # target module via Closure::bindTo(), a pattern PHPStan cannot statically resolve. + # - Cookie uses magic __get/__set, so its dynamic properties are undefined to PHPStan. + # - HookInterface mandates the constructor signature (Ps_Googleanalytics $module, Context), + # so $module must be stored even in hooks that never read it back. + - '#PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler::uninstallModule\(\) calls parent::uninstall\(\) but PrestaShop\\Module\\Ps_Googleanalytics\\Handler\\ModuleHandler does not extend any class.#' + - '#Access to an undefined property Cookie\:\:\$ga_admin_order.#' + - '#Access to an undefined property Cookie\:\:\$ga_admin_refund.#' + - '#Property PrestaShop\\Module\\Ps_Googleanalytics\\Hooks\\HookActionValidateOrder::\$module is never read, only written\.#' From b8b6a2e508da140d67d258128b1f75afbfecc8a4 Mon Sep 17 00:00:00 2001 From: mattgoud Date: Wed, 10 Jun 2026 15:13:46 +0200 Subject: [PATCH 7/8] 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). Also make the "Prepare PHP env" step name reflect the actual matrix version. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/php.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index a46ca91..db8e3ce 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 @@ -98,7 +105,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 fd269ff78e254a50c9dbeee6e1c24d4ca011c1a9 Mon Sep 17 00:00:00 2001 From: mattgoud Date: Thu, 11 Jun 2026 10:56:37 +0200 Subject: [PATCH 8/8] Bump module version to 6.0.0 Co-Authored-By: Claude Opus 4.8 (1M context) --- config.xml | 2 +- ps_googleanalytics.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.xml b/config.xml index 8976d9a..cb9bf00 100644 --- a/config.xml +++ b/config.xml @@ -2,7 +2,7 @@ ps_googleanalytics - + diff --git a/ps_googleanalytics.php b/ps_googleanalytics.php index 8741298..fa3cfee 100644 --- a/ps_googleanalytics.php +++ b/ps_googleanalytics.php @@ -47,7 +47,7 @@ public function __construct() { $this->name = 'ps_googleanalytics'; $this->tab = 'analytics_stats'; - $this->version = '5.0.3'; + $this->version = '6.0.0'; $this->ps_versions_compliancy = ['min' => '8.2.0', 'max' => _PS_VERSION_]; $this->author = 'PrestaShop'; $this->module_key = 'fd2aaefea84ac1bb512e6f1878d990b8';