From a0f282d100b9d87ad92690e60dffcb2ae053751a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 21 Dec 2022 23:34:32 +0100 Subject: [PATCH 1/6] Try a fix of phpunit regression --- test/phpunit/phpunittest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/phpunit/phpunittest.xml b/test/phpunit/phpunittest.xml index 84b31a8dd3b..8157d3f3e7a 100644 --- a/test/phpunit/phpunittest.xml +++ b/test/phpunit/phpunittest.xml @@ -1,8 +1,8 @@ Date: Thu, 22 Dec 2022 00:02:22 +0100 Subject: [PATCH 2/6] Add log to test phpunit pb --- test/phpunit/AdminLibTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/phpunit/AdminLibTest.php b/test/phpunit/AdminLibTest.php index 9ce135da263..0273960fb30 100644 --- a/test/phpunit/AdminLibTest.php +++ b/test/phpunit/AdminLibTest.php @@ -69,6 +69,8 @@ class AdminLibTest extends PHPUnit\Framework\TestCase $this->savdb=$db; print __METHOD__." db->type=".$db->type." user->id=".$user->id; + var_dump($GLOBALS); + //print " - db ".$db->db; print "\n"; } From 49e8b53fabaddd349b316104026ac4b6270687bb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 22 Dec 2022 00:33:03 +0100 Subject: [PATCH 3/6] Try fix for phpunit regression --- .travis.yml | 2 +- test/phpunit/AdminLibTest.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 45be1a9a6ba..4cf634d6b03 100644 --- a/.travis.yml +++ b/.travis.yml @@ -86,7 +86,7 @@ install: rm $TRAVIS_BUILD_DIR/composer.json rm $TRAVIS_BUILD_DIR/composer.lock composer -V - composer self-update + composer self-update 2.4.4 composer -n init composer -n config vendor-dir htdocs/includes composer -n config -g vendor-dir htdocs/includes diff --git a/test/phpunit/AdminLibTest.php b/test/phpunit/AdminLibTest.php index 0273960fb30..95a54fe6502 100644 --- a/test/phpunit/AdminLibTest.php +++ b/test/phpunit/AdminLibTest.php @@ -69,7 +69,6 @@ class AdminLibTest extends PHPUnit\Framework\TestCase $this->savdb=$db; print __METHOD__." db->type=".$db->type." user->id=".$user->id; - var_dump($GLOBALS); //print " - db ".$db->db; print "\n"; From 599aa6009a686ced404e35879d4439e4510779c3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 22 Dec 2022 00:37:33 +0100 Subject: [PATCH 4/6] Try to solve phpunit regression --- test/phpunit/AdminLibTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/test/phpunit/AdminLibTest.php b/test/phpunit/AdminLibTest.php index 95a54fe6502..a40e2257f3e 100644 --- a/test/phpunit/AdminLibTest.php +++ b/test/phpunit/AdminLibTest.php @@ -46,6 +46,7 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; */ class AdminLibTest extends PHPUnit\Framework\TestCase { + protected $backupGlobalsBlacklist = array('conf', 'user', 'langs', 'db'); protected $savconf; protected $savuser; protected $savlangs; From bd90d783c7eedb015069e84e7a0da37e11117178 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 22 Dec 2022 00:48:56 +0100 Subject: [PATCH 5/6] Reduce code --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4cf634d6b03..ec2205eb718 100644 --- a/.travis.yml +++ b/.travis.yml @@ -87,8 +87,8 @@ install: rm $TRAVIS_BUILD_DIR/composer.lock composer -V composer self-update 2.4.4 - composer -n init - composer -n config vendor-dir htdocs/includes + #composer -n init + #composer -n config vendor-dir htdocs/includes composer -n config -g vendor-dir htdocs/includes echo From e75617268b1e6ee71cbbfd77363fdbf0952329c7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 22 Dec 2022 01:04:06 +0100 Subject: [PATCH 6/6] Log --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ec2205eb718..62d04901e17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,7 +82,7 @@ before_install: install: - | - echo "Updating Composer" + echo "Updating Composer (version 2.5 is bugged and generate phpunit error Exception: Serialization of 'Closure' is not allowed)" rm $TRAVIS_BUILD_DIR/composer.json rm $TRAVIS_BUILD_DIR/composer.lock composer -V