From 89d0a57eab92a49ee9761cb89900e91e605209e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 9 Jun 2022 11:12:17 +0200 Subject: [PATCH 1/7] add var_dump check --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 44d784ea091..2020976d754 100644 --- a/.travis.yml +++ b/.travis.yml @@ -93,23 +93,26 @@ install: echo - | - echo "Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer - for $TRAVIS_PHP_VERSION" + echo "Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer, PHP Vardump check - for $TRAVIS_PHP_VERSION" if [ "$TRAVIS_PHP_VERSION" = '5.6' ]; then composer -n require phpunit/phpunit ^5 \ php-parallel-lint/php-parallel-lint ^1 \ php-parallel-lint/php-console-highlighter ^0 \ + php-parallel-lint/php-var-dump-check ~0.4 \ squizlabs/php_codesniffer ^3 fi if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then composer -n require phpunit/phpunit ^6 \ php-parallel-lint/php-parallel-lint ^1 \ php-parallel-lint/php-console-highlighter ^0 \ + php-parallel-lint/php-var-dump-check ~0.4 \ squizlabs/php_codesniffer ^3 fi if [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ] || [ "$TRAVIS_PHP_VERSION" = '7.4.22' ]; then composer -n require phpunit/phpunit ^7 \ php-parallel-lint/php-parallel-lint ^1.2 \ php-parallel-lint/php-console-highlighter ^0 \ + php-parallel-lint/php-var-dump-check ~0.4 \ squizlabs/php_codesniffer ^3 fi # phpunit 9 is required for php 8 @@ -117,6 +120,7 @@ install: composer -n require --ignore-platform-reqs phpunit/phpunit ^7 \ php-parallel-lint/php-parallel-lint ^1.2 \ php-parallel-lint/php-console-highlighter ^0 \ + php-parallel-lint/php-var-dump-check ~0.4 \ squizlabs/php_codesniffer ^3 fi echo From 003713953ce4ca97d55f6ea1d49a25ed4c8ca7c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 9 Jun 2022 11:17:21 +0200 Subject: [PATCH 2/7] Update .travis.yml --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2020976d754..ed7c6fc685c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -170,6 +170,10 @@ before_script: which phpcs phpcs --version | head - phpcs -i | head - + # Check PHP Vardump check version + echo "PHP Vardump check version" + which var_dump_check + var_dump_check --version # Check PHPUnit version echo "PHPUnit version" which phpunit From 33f10c3aeb1c4dffb0b198d8f638a59e0f44c217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 9 Jun 2022 11:59:19 +0200 Subject: [PATCH 3/7] Update .travis.yml --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.travis.yml b/.travis.yml index ed7c6fc685c..2da4f7fbbb5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -305,6 +305,17 @@ script: set +e echo +- | + echo "Checking missing debug" + # Ensure we catch errors + set -e + # Exclusions are defined in the ruleset.xml file + #if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then + var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ . + #fi + set +e + echo + - | export INSTALL_FORCED_FILE=htdocs/install/install.forced.php echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation" From cae9ca1bcf2609881d7a80c42e55e44b205a24f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 9 Jun 2022 12:50:35 +0200 Subject: [PATCH 4/7] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2da4f7fbbb5..caa04c56e25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -311,7 +311,7 @@ script: set -e # Exclusions are defined in the ruleset.xml file #if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then - var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ . + var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude public/test/ . #fi set +e echo From 89f7781733f45ce45f35996299094a23cf87a941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 9 Jun 2022 12:51:33 +0200 Subject: [PATCH 5/7] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index caa04c56e25..9897612f9bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -311,7 +311,7 @@ script: set -e # Exclusions are defined in the ruleset.xml file #if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then - var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude public/test/ . + var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ . #fi set +e echo From 59b24aa7d8c25aeab0e116d865b27d359990d40e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 9 Jun 2022 23:06:03 +0200 Subject: [PATCH 6/7] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9897612f9bd..2374718ce75 100644 --- a/.travis.yml +++ b/.travis.yml @@ -311,7 +311,7 @@ script: set -e # Exclusions are defined in the ruleset.xml file #if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then - var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ . + var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php . #fi set +e echo From 32b58789cd1d39d634d607dc5531f855c24d6565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 9 Jun 2022 23:14:36 +0200 Subject: [PATCH 7/7] re enable limited test --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2374718ce75..a260c31e3f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -310,9 +310,9 @@ script: # Ensure we catch errors set -e # Exclusions are defined in the ruleset.xml file - #if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then + if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "7.4.22" ]; then var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php . - #fi + fi set +e echo