Skip to content

Commit

Permalink
Update phpstan level
Browse files Browse the repository at this point in the history
  • Loading branch information
L3RAZ committed Jan 30, 2025
1 parent b9d1068 commit 30b4f60
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
run: docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:${{ matrix.presta-versions }}

- name: Run PHPStan
run: docker run --rm --volumes-from temp-ps -v $PWD:/web/module -e _PS_ROOT_DIR_=/var/www/html --workdir=/web/module ghcr.io/phpstan/phpstan:latest-php8.1 analyse --configuration=/web/module/tests/phpstan/phpstan-PS-8.neon --error-format=github
run: docker run --rm --volumes-from temp-ps -v $PWD:/web/module -e _PS_ROOT_DIR_=/var/www/html --workdir=/web/module ghcr.io/phpstan/phpstan:latest-php8.1 analyse --configuration=/web/module/tests/phpstan/phpstan-PS-8.neon --error-format=github --level=max --debug

phpunit:
name: PHPUnit
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

$rootDirectory = getenv('_PS_ROOT_DIR_') ?: __DIR__ . '/../../../../';
$projectDir = __DIR__ . '/../../';
//require_once $rootDirectory . 'config/config.inc.php';
require_once $rootDirectory . 'config/config.inc.php';
require_once $projectDir . 'vendor/autoload.php';
6 changes: 6 additions & 0 deletions tests/phpstan/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

$rootDirectory = getenv('_PS_ROOT_DIR_') ?: __DIR__ . '/../../../../';
$projectDir = __DIR__ . '/../../';
require_once $rootDirectory . '/config/config.inc.php';
require_once $projectDir . '/vendor/autoload.php';
3 changes: 2 additions & 1 deletion tests/phpstan/phpstan-PS-8.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
includes:
- %currentWorkingDirectory%/vendor/prestashop/php-dev-tools/phpstan/ps-module-extension.neon

parameters:
bootstrapFiles:
- ./bootstrap.php
paths:
# From PHPStan 0.12, paths to check are relative to the neon file
- ../../classes
Expand Down

0 comments on commit 30b4f60

Please sign in to comment.