-
Notifications
You must be signed in to change notification settings - Fork 65
CI: align PHPStan on PS 8.2+, refresh neon configs and fix renderCartPage error #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4e64b4f
e686cc5
a35abd8
3b86d3c
0e6ea26
2ca956c
b8b6a2e
fd269ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
||
|
|
@@ -36,7 +51,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: | ||
|
|
@@ -66,48 +81,21 @@ 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) | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| presta_version: ['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' } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please use matrix style
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hello @jf-viguier, We need to test tag 9.0.3 (because the 9.0.x branch no longer exists). I've forwarded your comment to the team to be sure. The goal is to keep the modules up-to-date without any gaps, because even shops on 9.0.x may need to upgrade their modules. Therefore, it was decided to adopt and maintain a compatibility range for the modules.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jf-viguier, for the matrix, we can't use the previous style because, as we're testing 9.0.3, this version doesn't support PHP 8.5 (hence the need for a more atomic approach using the "includes" attribute). |
||
| - { 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 | ||
|
|
@@ -117,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 | ||
| { | ||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove those?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok @jolelievre good point, re-added it using the
9.0.3tag instead of the deleted9.0.xbranch:presta_version: ['9.0.3', '9.1.x', 'develop']+ matchingphpstan-9.0.3.neon.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to source of truth here PrestaShop/PrestaShop#41648
9.0.3 is not supported, only 9.1.x and develop