-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
50 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ jobs: | |
header-stamp: | ||
name: Check license headers | ||
runs-on: ubuntu-latest | ||
if: contains(github.event.pull_request.labels.*.name, 'ready to review') | ||
if: contains(github.event.pull_request.labels.*.name, 'ready to reviews') | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
@@ -37,9 +37,9 @@ jobs: | |
run: php vendor/bin/header-stamp --license=vendor/prestashop/header-stamp/assets/afl.txt --exclude=.github,vendor,tests --dry-run | ||
|
||
php-linter: | ||
name: PHP Syntax check 8.1|8.2|8.2 | ||
name: PHP Syntax check 8.1|8.2|8.3 | ||
runs-on: ubuntu-latest | ||
if: contains(github.event.pull_request.labels.*.name, 'ready to review') | ||
if: contains(github.event.pull_request.labels.*.name, 'ready to reviews') | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
@@ -53,7 +53,7 @@ jobs: | |
php-cs-fixer: | ||
name: PHP-CS-Fixer | ||
runs-on: ubuntu-latest | ||
if: contains(github.event.pull_request.labels.*.name, 'ready to review') | ||
if: contains(github.event.pull_request.labels.*.name, 'ready to reviews') | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
@@ -80,7 +80,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
presta-versions: ["9.0.x", "latest"] | ||
presta-versions: ["9.0.x-apache", "latest"] | ||
if: contains(github.event.pull_request.labels.*.name, 'ready to review') | ||
steps: | ||
- name: Checkout | ||
|
@@ -104,12 +104,12 @@ 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:/var/www/html/modules/ps_checkout -e _PS_ROOT_DIR_=/var/www/html --workdir=/var/www/html/modules/ps_checkout ghcr.io/phpstan/phpstan:latest-php8.1 analyse --configuration=/web/module/tests/phpstan/phpstan-PS-9.neon --error-format=github | ||
|
||
phpunit: | ||
name: PHPUnit | ||
runs-on: ubuntu-latest | ||
if: contains(github.event.pull_request.labels.*.name, 'ready to review') | ||
if: contains(github.event.pull_request.labels.*.name, 'ready to reviews') | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
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 | ||
- ../../classes | ||
- ../../controllers | ||
- ../../src | ||
- ../../ps_checkout.php | ||
reportUnmatchedIgnoredErrors: false | ||
ignoreErrors: | ||
- '#Cannot assign offset "merchant…" to string\|true.#' | ||
- '#Property ModuleCore::\$version \(float\) does not accept string.#' | ||
- '#Strict comparison using === between false and string will always evaluate to false.#' | ||
- '#Call to function is_array\(\) with Currency will always evaluate to false.#' | ||
- '#Parameter \#1 \$id of class Customer constructor expects null, bool\|int<1, max>\|int<min, -1> given.#' | ||
- '#Parameter \#1 \$id of class Customer constructor expects null, int<min, -1>\|int<1, max> given.#' | ||
- '#Parameter \#1 \$id of class Customer constructor expects null, int given.#' | ||
- '#Parameter \#1 \$hook_name of method ModuleCore::registerHook\(\) expects string, array<int, string> given.#' | ||
- '#Parameter \#6 \$idShop of method LinkCore::getModuleLink\(\) expects null, int given.#' | ||
- '#Call to an undefined method\(\) AdminController|FrontController::getCheckoutProcess\(\).#' | ||
- '#Parameter \#1 \$id_hook of method ModuleCore::updatePosition\(\) expects bool, int given.#' | ||
- '#Property TabCore::\$name \(string\) does not accept array.#' | ||
- '#Access to an undefined property PaymentModule::\$currentOrderReference.#' | ||
- '#Property CustomerCore::\$passwd \(int\) does not accept bool\|string.#' | ||
- '#Property CustomerCore::\$passwd \(int\) does not accept string.#' | ||
- '#Parameter \#4 \$ssl of method LinkCore::getModuleLink\(\) expects null, true given.#' | ||
- '#Parameter \#1 \$id of class Customer constructor expects null, int<1, max>\|int<min, -1> given.#' | ||
- '#Property CustomerMessageCore::\$ip_address \(string\) does not accept int.#' | ||
- '#Left side of \&\& is always true.#' | ||
- '#Parameter \#7 \$currency_special of method PaymentModuleCore::validateOrder\(\) expects null, int given.#' | ||
- '#Parameter \#9 \$secure_key of method PaymentModuleCore::validateOrder\(\) expects bool, string given.#' | ||
- '#Property CustomerMessageCore::\$private \(int\) does not accept true.#' | ||
- '#Parameter \#1 \$amount_paid of method OrderCore::addOrderPayment\(\) expects string, float\|int given.#' | ||
|
||
level: 5 |