Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
version: 2
updates:
- package-ecosystem: npm
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
target-branch: dev
- package-ecosystem: composer
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
target-branch: dev
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
Expand Down
58 changes: 43 additions & 15 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
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.5
runs-on: ubuntu-latest
Expand Down Expand Up @@ -45,14 +46,14 @@ jobs:
with:
php-version: '7.4'

# Run PHPStan against the module (PHP 7.28.1)
phpstan-74:
name: PHPStan (PHP 7.2 - 8.1)
# Run PHPStan against the module (PHP 7.4PS 8.2)
phpstan-74-81:
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
Expand Down Expand Up @@ -81,21 +82,48 @@ jobs:
phpstan-version: '^0.12'
composer-version: '2.2.18'

# Run PHPStan against the module (PHP 8.1 – 8.4)
phpstan-81-84:
name: PHPStan (PHP 8.1 - 8.4)
runs-on: ubuntu-latest
strategy:
matrix:
presta_version: ['9.0.3']
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.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:
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:
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' }
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
Expand All @@ -105,7 +133,7 @@ jobs:
with:
path: ${{ github.event.repository.name }}

- name: Prepare PHP env for PrestaShop ${{ matrix.presta_version }} (define constants before any bootstrap)
- 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
{
Expand All @@ -120,4 +148,4 @@ jobs:
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-config: tests/php/phpstan/phpstan-${{ matrix.presta_version }}.neon
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Enrich your stats, display the pages requested by your visitors that could not b

## Compatibility

PrestaShop: `1.7.7.0` or later
PrestaShop: `8.2.0` or later

## Reporting issues

Expand Down
Loading