Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW Adds the option of not displaying linked objects in the left header on the Sponge invoice template #32305

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Merge branch 'develop' into develop

54f584e
Select commit
Loading
Failed to load commit list.
Open

NEW Adds the option of not displaying linked objects in the left header on the Sponge invoice template #32305

Merge branch 'develop' into develop
54f584e
Select commit
Loading
Failed to load commit list.
Travis CI / Travis CI - Pull Request succeeded Dec 10, 2024 in 4m 52s

Build Passed

The build passed, just like the previous build.

Details

This is a pull request build.

It is running a build against the merge commit, after merging #32305 NEW Adds the option of not displaying linked objects in the left header on the Sponge invoice template.
Any changes that have been made to the develop branch before the build ran are also included.

Jobs and Stages

This build only has a single job.
You can use jobs to test against multiple versions of your runtime or dependencies, or to speed up your build.

Build Configuration

Build Option Setting
Language Generic
Operating System Linux (Focal)
Build Configuration
{
  "language": "generic",
  "os": [
    "linux"
  ],
  "dist": "focal",
  "git": {
    "depth": 1
  },
  "services": [
    "memcached",
    "postgresql"
  ],
  "addons": {
    "mariadb": "10.5"
  },
  "env": [
    "global={:DEBUG=>\"true\"}"
  ],
  "cache": {
    "directories": [
      "~/.cache"
    ]
  },
  "jobs": {
    "fast_finish": true,
    "allow_failures": [
      {
        "php": "8.4"
      }
    ],
    "include": [
      {
        "stage": "PHP min and max",
        "if": "type = push",
        "php": "7.1",
        "env": [
          {
            "DB": "postgresql"
          },
          {
            "TRAVIS_PHP_VERSION": "7.1"
          }
        ]
      },
      {
        "stage": "PHP min and max",
        "if": "type = pull_request OR type = push",
        "php": "8.3",
        "env": [
          {
            "DB": "mysql"
          },
          {
            "TRAVIS_PHP_VERSION": "8.3"
          }
        ]
      },
      {
        "stage": "PHP 8.4",
        "if": "type = push AND branch = develop",
        "php": "8.4",
        "env": [
          {
            "DB": "mysql"
          },
          {
            "TRAVIS_PHP_VERSION": "8.4"
          }
        ]
      }
    ]
  },
  "notifications": {
    "email": [
      {
        "on_success": "never",
        "on_failure": "never"
      }
    ],
    "irc": [
      {
        "channels": [
          "chat.freenode.net#dolibarr"
        ],
        "on_success": "change",
        "on_failure": "always",
        "use_notice": true
      }
    ]
  },
  "before_install": [
    "echo \"Remove awful phpenv and install packages\"\nsudo rm -fr ~/.phpenv\nsudo rm -fr /root/.phpenv\nsudo add-apt-repository -y ppa:ondrej/php\nsudo apt-get update\necho TRAVIS_PHP_VERSION=$TRAVIS_PHP_VERSION\n",
    "echo Install packages for PHP\nsudo apt-get install -y pgloader memcached\nif [ \"$TRAVIS_PHP_VERSION\" = '7.1' ]; then\n\tsudo apt install unzip apache2 php7.1 php7.1-cli php7.1-curl php7.1-mysql php7.1-pgsql php7.1-gd php7.1-imap php7.1-intl php7.1-ldap php7.1-xml php7.1-mbstring php7.1-xml php7.1-zip libapache2-mod-php7.1\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = '8.1' ]; then\n\tsudo apt install unzip apache2 php8.1 php8.1-cli php8.1-curl php8.1-mysql php8.1-pgsql php8.1-gd php8.1-imap php8.1-intl php8.1-ldap php8.1-xml php8.1-mbstring php8.1-xml php8.1-zip libapache2-mod-php8.1\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = '8.2' ]; then\n\tsudo apt install unzip apache2 php8.2 php8.2-cli php8.2-curl php8.2-mysql php8.2-pgsql php8.2-gd php8.2-imap php8.2-intl php8.2-ldap php8.2-xml php8.2-mbstring php8.2-xml php8.2-zip libapache2-mod-php8.2\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = '8.3' ]; then\n\tsudo apt install unzip apache2 php8.3 php8.3-cli php8.3-curl php8.3-mysql php8.3-pgsql php8.3-gd php8.3-imap php8.3-intl php8.3-ldap php8.3-xml php8.3-mbstring php8.3-xml php8.3-zip libapache2-mod-php8.3\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = '8.4' ]; then\n  sudo apt install unzip apache2 php8.4 php8.4-cli php8.4-curl php8.4-mysql php8.4-pgsql php8.4-gd php8.4-imap php8.4-intl php8.4-ldap php8.4-xml php8.4-mbstring php8.4-xml php8.4-zip libapache2-mod-php8.4\nfi\n",
    "echo Install pgsql if run is for pgsql\nif [ \"$DB\" = 'postgresql' ]; then\n  echo \"Check pgloader version\"\n  pgloader --version\n  #ps fauxww | grep postgres\n  ls /etc/postgresql/13/main/\n\n  sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\\|md5/trust/g' /etc/postgresql/13/main/pg_hba.conf\n  sudo cat /etc/postgresql/13/main/pg_hba.conf\n\n  sudo service postgresql restart\n\n  psql postgresql://postgres:postgres@127.0.0.1:5432 -l -A\n\n  psql postgresql://postgres:postgres@127.0.0.1:5432 -c 'create database travis;'\n  psql postgresql://postgres:postgres@127.0.0.1:5432 -c \"CREATE USER travis WITH ENCRYPTED PASSWORD 'travis';\"\n  psql postgresql://postgres:postgres@127.0.0.1:5432 -c 'GRANT ALL PRIVILEGES ON DATABASE travis TO travis;'\n\n  psql postgresql://postgres:postgres@127.0.0.1:5432 -l -A\nfi\n"
  ],
  "install": [
    "if [ \"$TRAVIS_PHP_VERSION\" = '7.1' ]; then\n  sudo update-alternatives --set php /usr/bin/php7.1\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = '8.1' ]; then\n  sudo update-alternatives --set php /usr/bin/php8.1\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = '8.2' ]; then\n  sudo update-alternatives --set php /usr/bin/php8.2\nfi\nphp -i | head -\n",
    "echo \"Updating Composer config\"\ncurl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php\nHASH=`curl -sS https://composer.github.io/installer.sig`\necho $HASH\nphp -r \"if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;\"\nsudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer\nsudo chmod -R a+rwx /usr/local/bin/composer\n\n#sudo apt install composer\ncomposer -V\ncomposer -n config -g vendor-dir htdocs/includes\necho\n",
    "echo \"Update Composer version and Install tools - PHP Unit, Parallel Lint, PHP CodeSniffer, PHP Vardump check - for $TRAVIS_PHP_VERSION\"\necho \"(composer version 2.5 is bugged and generate phpunit error Exception: Serialization of 'Closure' is not allowed)\"\nif [ \"$TRAVIS_PHP_VERSION\" = '7.1' ] || [ \"$TRAVIS_PHP_VERSION\" = '7.2' ]; then\n  sudo composer self-update 2.2.18\n  composer -n require phpunit/phpunit ^7.5 \\\n                      php-parallel-lint/php-parallel-lint ^1 \\\n                      php-parallel-lint/php-console-highlighter ^0 \\\n                      php-parallel-lint/php-var-dump-check ~0.4 \\\n                      squizlabs/php_codesniffer ^3\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = '7.3' ] || [ \"$TRAVIS_PHP_VERSION\" = '7.4' ]; then\n  sudo composer self-update 2.2.18\n  composer -n require phpunit/phpunit ^7.5 \\\n                      php-parallel-lint/php-parallel-lint ^1.2 \\\n                      php-parallel-lint/php-console-highlighter ^0 \\\n                      php-parallel-lint/php-var-dump-check ~0.4 \\\n                      squizlabs/php_codesniffer ^3\nfi\n# phpunit 9 is required for php 8\nif [ \"$TRAVIS_PHP_VERSION\" = '8.0' ] || [ \"$TRAVIS_PHP_VERSION\" = '8.1' ] || [ \"$TRAVIS_PHP_VERSION\" = '8.2' ] || [ \"$TRAVIS_PHP_VERSION\" = '8.3' ] || [ \"$TRAVIS_PHP_VERSION\" = '8.4' ] || [ \"$TRAVIS_PHP_VERSION\" = 'nightly' ]; then\n    sudo composer self-update 2.4.4\n    composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \\\n                                               php-parallel-lint/php-parallel-lint ^1.2 \\\n                                               php-parallel-lint/php-console-highlighter ^0 \\\n                                               php-parallel-lint/php-var-dump-check ~0.4 \\\n                                               squizlabs/php_codesniffer ^3\nfi\n\n# Remove non expected files\nrm -fr /home/travis/build/Dolibarr/dolibarr/htdocs/includes/phpunit/php-code-coverage/src/Report/Html/Renderer/Template/js\necho\n",
    "echo \"Adding path of binaries tools installed by composer to the PATH\"\nexport PATH=\"$TRAVIS_BUILD_DIR/htdocs/includes/bin:$PATH\"\necho $PATH\nls $TRAVIS_BUILD_DIR/htdocs/includes\nls $TRAVIS_BUILD_DIR/htdocs/includes/bin\necho\n"
  ],
  "before_script": [
    "echo Start before_script\necho Current dir is `pwd`\necho Home dir is `echo ~`\necho TRAVIS_BUILD_DIR is $TRAVIS_BUILD_DIR\n",
    "echo \"Versions information\"\necho\n# Check PHP\necho \"PHP version\"\nphp -i | head -\n# Check Parallel-lint version\necho \"Parallel-lint version\"\nwhich parallel-lint\nparallel-lint -V\n# Check PHP CodeSniffer version\necho \"PHPCS version\"\nwhich phpcs\nphpcs --version | head -\nphpcs -i | head -\n# Check PHP Vardump check version\necho \"PHP Vardump check version\"\nwhich var_dump_check\nvar_dump_check --version\n# Check PHPUnit version\necho \"PHPUnit version\"\nwhich phpunit\nphpunit --version | head -\n# Check Apache version\necho \"Apache version\"\napache2 -v | head -\n# Check Database\necho \"Database version\"\nmysql --version | head -\npsql --version\n",
    "echo \"Setting up database\"\nif [ \"$DB\" = 'mysql' ] || [ \"$DB\" = 'mariadb' ] || [ \"$DB\" = 'postgresql' ]; then\n  echo \"MySQL stop\"\n  sudo systemctl stop mariadb.service\n  echo \"MySQL restart without pass\"\n  #sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa\n  sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa &\n  sleep 3\n  sudo ps fauxww\n  echo \"MySQL set root password\"\n  sudo mysql -u root -h 127.0.0.1 -e \"FLUSH PRIVILEGES; CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8'; ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY 'password'; CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON travis.* TO root@127.0.0.1; GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1; FLUSH PRIVILEGES;\"\n  echo \"MySQL grant\"\n  sudo mysql -u root -h 127.0.0.1 -ppassword -e 'FLUSH PRIVILEGES; GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1; FLUSH PRIVILEGES;'\n  echo \"MySQL list current users\"\n  sudo mysql -u root -h 127.0.0.1 -ppassword -e 'use mysql; select * from user;'\n  echo \"List pid file\"\n  sudo mysql -u root -h 127.0.0.1 -ppassword -e \"show variables like '%pid%';\"\n\n  #sudo kill `cat /var/lib/mysqld/mysqld.pid`\n  #sudo systemctl start mariadb\n\n  echo \"MySQL grant\"\n  sudo mysql -u root -h 127.0.0.1 -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;'\n  echo \"MySQL flush\"\n  sudo mysql -u root -h 127.0.0.1 -ppassword -e 'FLUSH PRIVILEGES;'\n\n  echo \"MySQL load sql\"\n  sudo mysql -u root -h 127.0.0.1 -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql\nfi\nif [ \"$DB\" = 'postgresql' ]; then\n  echo \"PGSQL\"\n  sudo mkdir -p /tmp/pgloader\n  sudo chmod -R a+rwx /tmp/pgloader/\n  sudo pgloader 'mysql://root:password@127.0.0.1/travis' 'postgresql://postgres:postgres@127.0.0.1:5432/travis'\n  echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'\n  echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'\n\n  #echo '\\d llx_adherent' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'\n  #echo '\\d llx_c_country' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'\n\n  # Create pgsql compatibility functions\n  psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis' < htdocs/install/pgsql/functions/functions.sql\nfi\necho\n",
    "export CONF_FILE=htdocs/conf/conf.php\necho \"Setting up Dolibarr '$CONF_FILE'\"\necho '<?php' > $CONF_FILE\necho 'error_reporting(E_ALL);' >> $CONF_FILE\necho '$'dolibarr_main_url_root=\\'http://127.0.0.1\\'';' >> $CONF_FILE\necho '$'dolibarr_main_document_root=\\'$TRAVIS_BUILD_DIR/htdocs\\'';' >> $CONF_FILE\necho '$'dolibarr_main_data_root=\\'$TRAVIS_BUILD_DIR/documents\\'';' >> $CONF_FILE\necho '$'dolibarr_main_db_host=\\'127.0.0.1\\'';' >> $CONF_FILE\necho '$'dolibarr_main_db_name=\\'travis\\'';' >> $CONF_FILE\necho '$'dolibarr_main_instance_unique_id=\\'travis1234567890\\'';' >> $CONF_FILE\nif [ \"$DB\" = 'mysql' ] || [ \"$DB\" = 'mariadb' ]; then\n  echo '$'dolibarr_main_db_type=\\'mysqli\\'';' >> $CONF_FILE\n  echo '$'dolibarr_main_db_port=3306';' >> $CONF_FILE\n  echo '$'dolibarr_main_db_user=\\'root\\'';' >> $CONF_FILE\n  echo '$'dolibarr_main_db_pass=\\'password\\'';' >> $CONF_FILE\nfi\nif [ \"$DB\" = 'postgresql' ]; then\n  echo '$'dolibarr_main_db_type=\\'pgsql\\'';' >> $CONF_FILE\n  echo '$'dolibarr_main_db_port=5432';' >> $CONF_FILE\n  echo '$'dolibarr_main_db_user=\\'postgres\\'';' >> $CONF_FILE\n  echo '$'dolibarr_main_db_pass=\\'postgres\\'';' >> $CONF_FILE\nfi\necho '$'dolibarr_main_authentication=\\'dolibarr\\'';' >> $CONF_FILE\ncat $CONF_FILE\necho\n",
    "echo \"Create documents directory and set permissions\"\n# Add admin/temp subdirectory needed for unit tests\nmkdir -p $TRAVIS_BUILD_DIR/documents/admin/temp\nsudo chmod -R a+rwx $TRAVIS_BUILD_DIR/documents\necho \"***** First line of dolibarr.log\" > $TRAVIS_BUILD_DIR/documents/dolibarr.log\necho\n",
    "echo \"Setting up Apache\"\nsudo sed -i -e \"s,www-data,travis,g\" /etc/apache2/envvars\nsudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf\nsudo sed -e \"s?%TRAVIS_BUILD_DIR%?$(pwd)?g\" --in-place /etc/apache2/sites-available/000-default.conf\nsudo cat /etc/apache2/sites-available/000-default.conf\nsudo service apache2 restart\n"
  ],
  "script": [
    "echo \"Checking webserver availability by a wget -O - --debug http://127.0.0.1\"\n# Ensure we stop on error with set -e\nset +e\n# The wget should return a page with line '<meta name=\"generator\" content=\"Dolibarr installer\">\nwget -O - --debug http://127.0.0.1 > test.html\nhead -n 200 test.html\nsudo cat /var/log/apache2/travis_error_log\nset +e\necho\n",
    "echo \"Checking PHP syntax errors (only 1 version to not overload travis and avoid duplicate tests)\"\n# Ensure we catch errors\nset -e\n# Exclusions are defined in the ruleset.xml file\nif [ \"$TRAVIS_PHP_VERSION\" = \"8.1\" ]; then\n  parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \\\n    --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \\\n    --exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \\\n    --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \\\n    --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = \"8.2\" ]; then\n  parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \\\n    --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \\\n    --exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \\\n    --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \\\n    --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = \"8.3\" ]; then\n  parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \\\n    --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \\\n    --exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \\\n    --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \\\n    --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = \"8.4\" ]; then\n  parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \\\n    --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \\\n    --exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \\\n    --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \\\n    --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .\nfi\nset +e\necho\n",
    "echo \"Checking coding style (only for 1 version to not overload travis and avoid duplicate tests)\"\n# Ensure we catch errors\nset -e\nCACHE_OPT=\"--cache=${HOME}/.cache/dolibarr-phpcs-${TRAVIS_PHP_VERSION}.cache\"\n# Exclusions are defined in the ruleset.xml file\n#if [ \"$TRAVIS_PULL_REQUEST\" = \"false\" ] && [ \"$TRAVIS_PHP_VERSION\" = \"8.1\" ]; then\nif [ \"$TRAVIS_PHP_VERSION\" = \"8.1\" ]; then\n  phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = \"8.2\" ]; then\n  phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = \"8.3\" ]; then\n  phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = \"8.4\" ]; then\n  phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;\nfi\nset +e\necho\n",
    "echo \"Checking missing debug (only for 1 version to not overload travis and avoid duplicate tests)\"\n# Ensure we catch errors\nset -e\n# Exclusions are defined in the ruleset.xml file\n#if [ \"$TRAVIS_PULL_REQUEST\" = \"false\" ] && [ \"$TRAVIS_PHP_VERSION\" = \"8.1\" ]; then\nif [ \"$TRAVIS_PHP_VERSION\" = \"8.1\" ]; then\n   var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = \"8.2\" ]; then\n   var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = \"8.3\" ]; then\n   var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .\nfi\nif [ \"$TRAVIS_PHP_VERSION\" = \"8.4\" ]; then\n   var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .\nfi\nset +e\necho\n",
    "export INSTALL_FORCED_FILE=htdocs/install/install.forced.php\necho \"Setting up Dolibarr $INSTALL_FORCED_FILE to test installation\"\n# Ensure we catch errors\nset +e\necho '<?php ' > $INSTALL_FORCED_FILE\necho 'error_reporting(E_ALL);' >> $INSTALL_FORCED_FILE\necho '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE\nif [ \"$DB\" = 'mysql' ] || [ \"$DB\" = 'mariadb' ]; then\n  echo '$'force_install_type=\\'mysqli\\'';' >> $INSTALL_FORCED_FILE\n  echo '$'force_install_port=3306';' >> $INSTALL_FORCED_FILE\nfi\nif [ \"$DB\" = 'postgresql' ]; then\n  echo '$'force_install_type=\\'pgsql\\'';' >> $INSTALL_FORCED_FILE\n  echo '$'force_install_port=5432';' >> $INSTALL_FORCED_FILE\nfi\necho '$'force_install_dbserver=\\'127.0.0.1\\'';' >> $INSTALL_FORCED_FILE\necho '$'force_install_database=\\'travis\\'';' >> $INSTALL_FORCED_FILE\necho '$'force_install_databaselogin=\\'travis\\'';' >> $INSTALL_FORCED_FILE\necho '$'force_install_databasepass=\\'\\'';' >> $INSTALL_FORCED_FILE\necho '$'force_install_prefix=\\'llx_\\'';' >> $INSTALL_FORCED_FILE\necho '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE\necho '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE\necho '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE\necho '$'force_install_main_data_root=\\'$TRAVIS_BUILD_DIR/htdocs\\'';' >> $INSTALL_FORCED_FILE\n#cat $INSTALL_FORCED_FILE\necho\n",
    "echo \"Upgrading Dolibarr\"\n# Ensure we catch errors with -e. Set this to +e if you want to go to the end to see log files.\n# Note: We keep +e because with pgsql, one of upgrade process fails even if migration seems ok, so\n# I disable stop on error to be able to continue.\nset +e\ncd htdocs/install\nphp upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log\nphp upgrade2.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-2.log\nphp step5.php 3.5.0 3.6.0 > $TRAVIS_BUILD_DIR/upgrade350360-3.log\nphp upgrade.php 3.6.0 3.7.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade360370.log\nphp upgrade2.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-2.log\nphp step5.php 3.6.0 3.7.0 > $TRAVIS_BUILD_DIR/upgrade360370-3.log\nphp upgrade.php 3.7.0 3.8.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade370380.log\nphp upgrade2.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-2.log\nphp step5.php 3.7.0 3.8.0 > $TRAVIS_BUILD_DIR/upgrade370380-3.log\nphp upgrade.php 3.8.0 3.9.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade380390.log\nphp upgrade2.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-2.log\nphp step5.php 3.8.0 3.9.0 > $TRAVIS_BUILD_DIR/upgrade380390-3.log\nphp upgrade.php 3.9.0 4.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade390400.log\nphp upgrade2.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-2.log\nphp step5.php 3.9.0 4.0.0 > $TRAVIS_BUILD_DIR/upgrade390400-3.log\nphp upgrade.php 4.0.0 5.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade400500.log\nphp upgrade2.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-2.log\nphp step5.php 4.0.0 5.0.0 > $TRAVIS_BUILD_DIR/upgrade400500-3.log\nphp upgrade.php 5.0.0 6.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade500600.log\nphp upgrade2.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-2.log\nphp step5.php 5.0.0 6.0.0 > $TRAVIS_BUILD_DIR/upgrade500600-3.log\nphp upgrade.php 6.0.0 7.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade600700.log\nphp upgrade2.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-2.log\nphp step5.php 6.0.0 7.0.0 > $TRAVIS_BUILD_DIR/upgrade600700-3.log\nphp upgrade.php 7.0.0 8.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade700800.log\nphp upgrade2.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-2.log\nphp step5.php 7.0.0 8.0.0 > $TRAVIS_BUILD_DIR/upgrade700800-3.log\nphp upgrade.php 8.0.0 9.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade800900.log\nphp upgrade2.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-2.log\nphp step5.php 8.0.0 9.0.0 > $TRAVIS_BUILD_DIR/upgrade800900-3.log\nphp upgrade.php 9.0.0 10.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade9001000.log\nphp upgrade2.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-2.log\nphp step5.php 9.0.0 10.0.0 > $TRAVIS_BUILD_DIR/upgrade9001000-3.log\nphp upgrade.php 10.0.0 11.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade10001100.log\nphp upgrade2.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-2.log\nphp step5.php 10.0.0 11.0.0 > $TRAVIS_BUILD_DIR/upgrade10001100-3.log\nphp upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log\nphp upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log\nphp step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log\nphp upgrade.php 12.0.0 13.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade12001300.log\nphp upgrade2.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-2.log\nphp step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log\nphp upgrade.php 13.0.0 14.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade13001400.log\nphp upgrade2.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-2.log\nphp step5.php 13.0.0 14.0.0 > $TRAVIS_BUILD_DIR/upgrade13001400-3.log\nphp upgrade.php 14.0.0 15.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade14001500.log\nphp upgrade2.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-2.log\nphp step5.php 14.0.0 15.0.0 > $TRAVIS_BUILD_DIR/upgrade14001500-3.log\nphp upgrade.php 15.0.0 16.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade15001600.log\nphp upgrade2.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-2.log\nphp step5.php 15.0.0 16.0.0 > $TRAVIS_BUILD_DIR/upgrade15001600-3.log\nphp upgrade.php 16.0.0 17.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade16001700.log\nphp upgrade2.php 16.0.0 17.0.0 > $TRAVIS_BUILD_DIR/upgrade16001700-2.log\nphp step5.php 16.0.0 17.0.0 > $TRAVIS_BUILD_DIR/upgrade16001700-3.log\nphp upgrade.php 17.0.0 18.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade17001800.log\nphp upgrade2.php 17.0.0 18.0.0 > $TRAVIS_BUILD_DIR/upgrade17001800-2.log\nphp step5.php 17.0.0 18.0.0 > $TRAVIS_BUILD_DIR/upgrade17001800-3.log\nphp upgrade.php 18.0.0 19.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade18001900.log || cat $TRAVIS_BUILD_DIR/upgrade18001900.log\nphp upgrade2.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-2.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-2.log\nphp step5.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-3.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-3.log\nphp upgrade.php 19.0.0 20.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade19002000.log || cat $TRAVIS_BUILD_DIR/upgrade19002000.log\nphp upgrade2.php 19.0.0 20.0.0 > $TRAVIS_BUILD_DIR/upgrade19002000-2.log || cat $TRAVIS_BUILD_DIR/upgrade19002000-2.log\nphp step5.php 19.0.0 20.0.0 > $TRAVIS_BUILD_DIR/upgrade19002000-3.log || cat $TRAVIS_BUILD_DIR/upgrade19002000-3.log\nphp upgrade.php 20.0.0 21.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade20002100.log || cat $TRAVIS_BUILD_DIR/upgrade20002100.log\nphp upgrade2.php 20.0.0 21.0.0 > $TRAVIS_BUILD_DIR/upgrade20002100-2.log || cat $TRAVIS_BUILD_DIR/upgrade20002100-2.log\nphp step5.php 20.0.0 21.0.0 > $TRAVIS_BUILD_DIR/upgrade20002100-3.log || cat $TRAVIS_BUILD_DIR/upgrade20002100-3.log\nset +e\necho\n",
    "echo Show some debug info like table content or log\n#echo '\\d llx_adherent' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'\ncat $TRAVIS_BUILD_DIR/upgrade18001900.log\ncat $TRAVIS_BUILD_DIR/upgrade19002000.log\necho\n",
    "echo Result of migration scripts\nls -alrt $TRAVIS_BUILD_DIR/\n\necho Show content of last file\ncat $TRAVIS_BUILD_DIR/\"$(ls -rt $TRAVIS_BUILD_DIR/ | tail -n1)\"\n",
    "echo \"Enabling new modules\"\n# Enable modules not enabled into original dump\nset -e\nphp upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_ProductBatch,MAIN_MODULE_SupplierProposal,MAIN_MODULE_STRIPE,MAIN_MODULE_ExpenseReport > $TRAVIS_BUILD_DIR/enablemodule.log\nphp upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKET,MAIN_MODULE_ACCOUNTING,MAIN_MODULE_MRP >> $TRAVIS_BUILD_DIR/enablemodule.log\nphp upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_RECEPTION,MAIN_MODULE_RECRUITMENT >> $TRAVIS_BUILD_DIR/enablemodule.log\nphp upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_KnowledgeManagement,MAIN_MODULE_EventOrganization,MAIN_MODULE_PARTNERSHIP >> $TRAVIS_BUILD_DIR/enablemodule.log\nphp upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_EmailCollector >> $TRAVIS_BUILD_DIR/enablemodule.log\necho $?\ncd -\nset +e\necho\n#cat /tmp/dolibarr_install.log\ncat $TRAVIS_BUILD_DIR/enablemodule.log\necho\n",
    "echo \"Unit testing\"\n# Ensure we catch errors with -e. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file.\nset -e\nphpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php\nphpunitresult=$?\necho \"Phpunit return code = $phpunitresult\"\nset +e\necho\n"
  ],
  "after_script": [
    "echo \"After script - Output last lines of dolibarr.log\"\nls $TRAVIS_BUILD_DIR/documents\n#cat $TRAVIS_BUILD_DIR/documents/dolibarr.log\nsudo tail -n 50 $TRAVIS_BUILD_DIR/documents/dolibarr.log\necho \"After script - Output last lines of apache error.log\"\nsudo ls /var/log/apache2\nsudo tail -n 200 /var/log/apache2/travis_error_log\n"
  ],
  "after_success": [
    "echo Success\n"
  ],
  "after_failure": [
    "echo Failure detected, so we show samples of log to help diagnose\n# This part of code is executed only if the command that fails are enclosed with set +e\n# Show upgrade log files\n#for ficlog in `ls $TRAVIS_BUILD_DIR/*.log`\n#do\n  #echo \"Debugging information for file $ficlog\"\n  #cat $ficlog\n#done\n# Show Apache log file\necho \"Debugging information for file apache error.log\"\nsudo tail -n 200 /var/log/apache2/travis_error_log\nif [ \"$DEBUG\" = true ]; then\n  # Dolibarr log file\n  echo \"Debugging information for file dolibarr.log (latest 50 lines)\"\n  tail -n 200 $TRAVIS_BUILD_DIR/documents/dolibarr.log\n  # Database log file\n  echo \"Debugging information for file mysql error.log\"\n  sudo tail -n 200 /var/log/mysql/error.log\n  # TODO: PostgreSQL log file\n  echo\nfi"
  ]
}