Skip to content

Commit

Permalink
Use specific prestashop version for phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRambaud committed Oct 8, 2019
1 parent 59db472 commit 31dbc9e
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .travis.yml
Expand Up @@ -27,14 +27,23 @@ jobs:
- docker exec -ti temp-ps rm -rf /var/www/html/modules/ps_facetedsearch
- docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_facetedsearch -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_facetedsearch/tests/php/phpstan/phpstan.neon
- stage: "PHP"
name: "PHPStan on PS 1.7.5.2"
name: "PHPStan on PS 1.7.6.1"
language: php
php: 7.2
script:
- composer install
- docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:1.7.6.1
- docker exec -ti temp-ps rm -rf /var/www/html/modules/ps_facetedsearch
- docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_facetedsearch -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_facetedsearch/tests/php/phpstan/phpstan-1.7.6.1.neon
- stage: "PHP"
name: "PHPStan on PS 1.7.5.1"
language: php
php: 7.2
script:
- composer install
- docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:1.7.5.1
- docker exec -ti temp-ps rm -rf /var/www/html/modules/ps_facetedsearch
- docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_facetedsearch -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_facetedsearch/tests/php/phpstan/phpstan.neon
- docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_facetedsearch -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_facetedsearch/tests/php/phpstan/phpstan-1.7.5.1.neon
- stage: "PHP"
name: "PHPStan on PS 1.7.4.4"
language: php
Expand All @@ -43,7 +52,7 @@ jobs:
- composer install
- docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:1.7.4.4
- docker exec -ti temp-ps rm -rf /var/www/html/modules/ps_facetedsearch
- docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_facetedsearch -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_facetedsearch/tests/php/phpstan/phpstan.neon
- docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_facetedsearch -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_facetedsearch/tests/php/phpstan/phpstan-1.7.4.4.neon
- stage: "PHP"
name: "PHPStan on PS 1.7.3.4"
language: php
Expand All @@ -52,7 +61,7 @@ jobs:
- composer install
- docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:1.7.3.4
- docker exec -ti temp-ps rm -rf /var/www/html/modules/ps_facetedsearch
- docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_facetedsearch -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_facetedsearch/tests/php/phpstan/phpstan.neon
- docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_facetedsearch -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_facetedsearch/tests/php/phpstan/phpstan-1.7.3.4.neon
- stage: "PHP"
name: "PHPStan on PS 1.7.2.5"
language: php
Expand All @@ -61,7 +70,7 @@ jobs:
- composer install
- docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:1.7.2.5
- docker exec -ti temp-ps rm -rf /var/www/html/modules/ps_facetedsearch
- docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_facetedsearch -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_facetedsearch/tests/php/phpstan/phpstan.neon
- docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_facetedsearch -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_facetedsearch/tests/php/phpstan/phpstan-1.7.2.5.neon
- stage: "PHP"
name: "PHPStan on PS 1.7.1.2"
language: php
Expand All @@ -70,7 +79,7 @@ jobs:
- composer install
- docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:1.7.1.2
- docker exec -ti temp-ps rm -rf /var/www/html/modules/ps_facetedsearch
- docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_facetedsearch -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_facetedsearch/tests/php/phpstan/phpstan.neon
- docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/ps_facetedsearch -e _PS_ROOT_DIR_=/var/www/html quetzacoalt/phpstan analyse --configuration=/var/www/html/modules/ps_facetedsearch/tests/php/phpstan/phpstan-1.7.1.2.neon

script:
- npm run lint
Expand Down
17 changes: 17 additions & 0 deletions tests/php/phpstan/phpstan-1.7.1.2.neon
@@ -0,0 +1,17 @@
parameters:
reportUnmatchedIgnoredErrors: false
bootstrap: /var/www/html/modules/ps_facetedsearch/tests/php/phpstan/bootstrap.php
paths:
- /var/www/html/modules/ps_facetedsearch/src
ignoreErrors:
# module specific
- '~Constant _THEME_COL_DIR_ not found.~'
- '~Iterating over an object of an unknown class mysqli_result\.~'
- '~Access to offset mixed on an unknown class mysqli_result\.~'
- '~Parameter #1 \$master of static method DbCore::getInstance\(\) expects bool, int given\.~'
- '~Parameter #1 \$string of method PrestaShop\\PrestaShop\\Core\\Product\\Search\\URLFragmentSerializer::unserialize\(\) expects string, array given\.~'
- '~Parameter #\d+ \$(.+?) of class Category constructor expects null, int given\.~'
- '~constant NUMBERING_SYSTEM_LATIN on an unknown class~'
- '~PrestaShopBundle\\Form\\Admin\\Type\\(TranslatableType|SwitchType) not found~'

level: 5
17 changes: 17 additions & 0 deletions tests/php/phpstan/phpstan-1.7.2.5.neon
@@ -0,0 +1,17 @@
parameters:
reportUnmatchedIgnoredErrors: false
bootstrap: /var/www/html/modules/ps_facetedsearch/tests/php/phpstan/bootstrap.php
paths:
- /var/www/html/modules/ps_facetedsearch/src
ignoreErrors:
# module specific
- '~Constant _THEME_COL_DIR_ not found.~'
- '~Iterating over an object of an unknown class mysqli_result\.~'
- '~Access to offset mixed on an unknown class mysqli_result\.~'
- '~Parameter #1 \$master of static method DbCore::getInstance\(\) expects bool, int given\.~'
- '~Parameter #1 \$string of method PrestaShop\\PrestaShop\\Core\\Product\\Search\\URLFragmentSerializer::unserialize\(\) expects string, array given\.~'
- '~Parameter #\d+ \$(.+?) of class Category constructor expects null, int given\.~'
- '~constant NUMBERING_SYSTEM_LATIN on an unknown class~'
- '~PrestaShopBundle\\Form\\Admin\\Type\\(TranslatableType|SwitchType) not found~'

level: 5
17 changes: 17 additions & 0 deletions tests/php/phpstan/phpstan-1.7.3.4.neon
@@ -0,0 +1,17 @@
parameters:
reportUnmatchedIgnoredErrors: false
bootstrap: /var/www/html/modules/ps_facetedsearch/tests/php/phpstan/bootstrap.php
paths:
- /var/www/html/modules/ps_facetedsearch/src
ignoreErrors:
# module specific
- '~Constant _THEME_COL_DIR_ not found.~'
- '~Iterating over an object of an unknown class mysqli_result\.~'
- '~Access to offset mixed on an unknown class mysqli_result\.~'
- '~Parameter #1 \$master of static method DbCore::getInstance\(\) expects bool, int given\.~'
- '~Parameter #1 \$string of method PrestaShop\\PrestaShop\\Core\\Product\\Search\\URLFragmentSerializer::unserialize\(\) expects string, array given\.~'
- '~Parameter #\d+ \$(.+?) of class Category constructor expects null, int given\.~'
- '~constant NUMBERING_SYSTEM_LATIN on an unknown class~'
- '~PrestaShopBundle\\Form\\Admin\\Type\\(TranslatableType|SwitchType) not found~'

level: 5
16 changes: 16 additions & 0 deletions tests/php/phpstan/phpstan-1.7.4.4.neon
@@ -0,0 +1,16 @@
parameters:
reportUnmatchedIgnoredErrors: false
bootstrap: /var/www/html/modules/ps_facetedsearch/tests/php/phpstan/bootstrap.php
paths:
- /var/www/html/modules/ps_facetedsearch/src
ignoreErrors:
# module specific
- '~Constant _THEME_COL_DIR_ not found.~'
- '~Iterating over an object of an unknown class mysqli_result\.~'
- '~Access to offset mixed on an unknown class mysqli_result\.~'
- '~Parameter #1 \$master of static method DbCore::getInstance\(\) expects bool, int given\.~'
- '~Parameter #1 \$string of method PrestaShop\\PrestaShop\\Core\\Product\\Search\\URLFragmentSerializer::unserialize\(\) expects string, array given\.~'
- '~Parameter #\d+ \$(.+?) of class Category constructor expects null, int given\.~'
- '~PrestaShopBundle\\Form\\Admin\\Type\\(TranslatableType|SwitchType) not found~'

level: 5
16 changes: 16 additions & 0 deletions tests/php/phpstan/phpstan-1.7.5.1.neon
@@ -0,0 +1,16 @@
parameters:
reportUnmatchedIgnoredErrors: false
bootstrap: /var/www/html/modules/ps_facetedsearch/tests/php/phpstan/bootstrap.php
paths:
- /var/www/html/modules/ps_facetedsearch/src
ignoreErrors:
# module specific
- '~Constant _THEME_COL_DIR_ not found.~'
- '~Iterating over an object of an unknown class mysqli_result\.~'
- '~Access to offset mixed on an unknown class mysqli_result\.~'
- '~Parameter #1 \$master of static method DbCore::getInstance\(\) expects bool, int given\.~'
- '~Parameter #1 \$string of method PrestaShop\\PrestaShop\\Core\\Product\\Search\\URLFragmentSerializer::unserialize\(\) expects string, array given\.~'
- '~Parameter #\d+ \$(.+?) of class Category constructor expects null, int given\.~'
- '~PrestaShopBundle\\Form\\Admin\\Type\\(TranslatableType|SwitchType) not found~'

level: 5

0 comments on commit 31dbc9e

Please sign in to comment.