From a3e0b2ca6630abf8e90e6c0d307e97685f3a6a7d Mon Sep 17 00:00:00 2001 From: Thomas Rieschl Date: Thu, 22 Oct 2020 11:30:54 +0200 Subject: [PATCH 01/18] feat: bump minimum PHP version, update phpunit * update phpunit.xml schema * fix deprecated/removed/changed stuff in PHPUnit 9 Signed-off-by: Thomas Rieschl --- .gitignore | 1 + .travis.yml | 29 +------ composer.json | 8 +- phpunit.xml.dist | 18 ++-- test/AbstractContainerTest.php | 14 ++-- test/Config/SessionConfigTest.php | 20 ++--- test/Config/StandardConfigTest.php | 18 ++-- test/ContainerTest.php | 18 ++-- test/ReflectionUtil.php | 21 +++++ test/SaveHandler/CacheTest.php | 5 +- .../SaveHandler/DbTableGatewayOptionsTest.php | 60 ++++++------- test/SaveHandler/DbTableGatewayTest.php | 20 +++-- test/SaveHandler/MongoDBOptionsTest.php | 84 +++++++++---------- test/SaveHandler/MongoDBTest.php | 20 ++--- .../ContainerAbstractServiceFactoryTest.php | 28 ++++--- test/Service/SessionConfigFactoryTest.php | 14 ++-- test/Service/SessionManagerFactoryTest.php | 40 +++++---- test/Service/StorageFactoryTest.php | 14 ++-- test/SessionArrayStorageTest.php | 6 +- test/SessionManagerTest.php | 31 +++++-- test/SessionStorageTest.php | 6 +- test/StorageTest.php | 4 +- test/autoload.php | 11 --- 23 files changed, 262 insertions(+), 228 deletions(-) create mode 100644 test/ReflectionUtil.php delete mode 100644 test/autoload.php diff --git a/.gitignore b/.gitignore index 87904ecb..0b92d9cf 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /laminas-mkdoc-theme/ /phpunit.xml /vendor/ +.phpunit.result.cache diff --git a/.travis.yml b/.travis.yml index d1f2636a..32db6971 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,39 +19,18 @@ services: matrix: fast_finish: true include: - - php: 5.6 - env: - - DEPS=lowest - - php: 5.6 - env: - - DEPS=latest - - php: 7 - env: - - DEPS=lowest - - php: 7 + - php: 7.3 env: - DEPS=latest - - php: 7.1 + - php: 7.3 env: - DEPS=lowest - - php: 7.1 + - php: 7.4 env: - DEPS=latest - CS_CHECK=true - TEST_COVERAGE=true - - php: 7.2 - env: - - DEPS=lowest - - php: 7.2 - env: - - DEPS=latest - - php: 7.3 - env: - - DEPS=lowest - - php: 7.3 - env: - - DEPS=latest - - php: 7.4 + - php: 8.0 env: - DEPS=latest diff --git a/composer.json b/composer.json index 0798fb17..26efb4bc 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ } }, "require": { - "php": "^5.6 || ^7.0", + "php": "^7.3 ||^8.0", "laminas/laminas-eventmanager": "^2.6.2 || ^3.0", "laminas/laminas-stdlib": "^3.2.1", "laminas/laminas-zendframework-bridge": "^1.0" @@ -40,7 +40,8 @@ "laminas/laminas-validator": "^2.6", "mongodb/mongodb": "^1.0.1", "php-mock/php-mock-phpunit": "^1.1.2 || ^2.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20" + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.3" }, "suggest": { "laminas/laminas-cache": "Laminas\\Cache component", @@ -56,9 +57,6 @@ } }, "autoload-dev": { - "files": [ - "test/autoload.php" - ], "psr-4": { "LaminasTest\\Session\\": "test/" } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 7f93db01..7c0f0982 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -15,18 +15,18 @@ - - + + ./src - - src/compatibility/autoload.php - src/Validator/AbstractValidatorChainEM2.php - - - + + + src/compatibility/autoload.php + src/Validator/AbstractValidatorChainEM2.php + + - +