From 4452595412251b0a89c5e122d0dc4c52375fac27 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Tue, 1 Aug 2023 18:15:10 +0200 Subject: [PATCH 01/18] Update PHPUnit minimum version to 8.5 With PHPUnit 8.5, which supports PHP >= 7.2, we no longer need the temporary changes from issue #29882 to provide PHP 8.1 compatibility. This reverts commit f82c03b1b5b215fa3926d427cb8d7407dcb9965f by removing the dependencies on custom forks of PHPUnit and required libraries. Fixes #32810 --- composer.json | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/composer.json b/composer.json index 90b7dd1a3e..71adbde81b 100644 --- a/composer.json +++ b/composer.json @@ -17,30 +17,13 @@ }, "require-dev": { "ext-zip": "*", - "phpunit/phpunit": "dev-mantis-6.5", - "phpunit/php-code-coverage": "@dev", - "phpunit/php-file-iterator": "@dev" + "phpunit/phpunit": "^8.5" }, "repositories": [ { "type": "vcs", "url": "https://github.com/mantisbt/securimage", "no-api": true - }, - { - "type": "vcs", - "url": "https://github.com/mantisbt/phpunit", - "no-api": true - }, - { - "type": "vcs", - "url": "https://github.com/mantisbt/php-code-coverage", - "no-api": true - }, - { - "type": "vcs", - "url": "https://github.com/mantisbt/php-file-iterator", - "no-api": true } ], "license": "GPL-2.0-or-later", From aabd6feea2d7b5760019e5cb768e5e54d41fc371 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Tue, 1 Aug 2023 18:22:17 +0200 Subject: [PATCH 02/18] Composer update - Removing phpdocumentor/reflection-common (1.0.1) - Removing phpdocumentor/reflection-docblock (4.3.4) - Removing phpdocumentor/type-resolver (0.5.1) - Removing phpspec/prophecy (v1.10.3) - Removing phpunit/phpunit-mock-objects (5.0.10) - Removing symfony/polyfill-ctype (v1.19.0) - Removing webmozart/assert (1.9.1) - Upgrading doctrine/instantiator (1.0.5 => 1.5.0) - Upgrading myclabs/deep-copy (1.7.0 => 1.11.1) - Upgrading phar-io/manifest (1.0.1 => 2.0.3) - Upgrading phar-io/version (1.0.1 => 3.2.1) - Upgrading phpunit/php-code-coverage (dev-mantis-5.3 7642884 => 7.0.15) - Upgrading phpunit/php-file-iterator (dev-mantis-1.4 89be108 => 2.0.5) - Upgrading phpunit/php-timer (1.0.9 => 2.1.3) - Upgrading phpunit/php-token-stream (2.0.2 => 3.1.3) - Upgrading phpunit/phpunit (dev-mantis-6.5 215feef => 8.5.33) - Upgrading sebastian/comparator (2.1.3 => 3.0.5) - Upgrading sebastian/diff (2.0.1 => 3.0.4) - Upgrading sebastian/environment (3.1.0 => 4.2.4) - Upgrading sebastian/exporter (3.1.4 => 3.1.5) - Upgrading sebastian/global-state (2.0.0 => 3.0.3) - Upgrading sebastian/resource-operations (1.0.0 => 2.0.2) - Locking sebastian/type (1.1.4) - Upgrading theseer/tokenizer (1.1.3 => 1.2.1) --- composer.lock | 946 ++++++++++++++++++-------------------------------- 1 file changed, 338 insertions(+), 608 deletions(-) diff --git a/composer.lock b/composer.lock index b409ddad59..5d7e691d11 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0ce17d41e53323852e7374dca40a494e", + "content-hash": "5ed62e080bbc3e980b66b0c25a31d935", "packages": [ { "name": "adodb/adodb-php", @@ -1385,34 +1385,32 @@ "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1 || ^8.0" }, "require-dev": { - "athletic/athletic": "~0.1.8", + "doctrine/coding-standard": "^9 || ^11", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" @@ -1426,42 +1424,60 @@ { "name": "Marco Pivetta", "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" + "homepage": "https://ocramius.github.io/" } ], "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ "constructor", "instantiate" ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/master" + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, - "time": "2015-06-14T21:17:01+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:15:36+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.7.0", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^4.1" + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", "autoload": { @@ -1486,34 +1502,41 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.x" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, - "time": "2017-10-19T19:58:43+00:00" + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2023-03-08T13:26:56+00:00" }, { "name": "phar-io/manifest", - "version": "1.0.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { "ext-dom": "*", "ext-phar": "*", - "phar-io/version": "^1.0.1", - "php": "^5.6 || ^7.0" + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1545,26 +1568,26 @@ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/master" + "source": "https://github.com/phar-io/manifest/tree/2.0.3" }, - "time": "2017-03-05T18:14:27+00:00" + "time": "2021-07-20T11:28:43+00:00" }, { "name": "phar-io/version", - "version": "1.0.1", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -1596,276 +1619,46 @@ "description": "Library for handling version information and constraints", "support": { "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/master" - }, - "time": "2017-03-05T17:38:23+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/master" - }, - "time": "2017-09-11T18:02:19+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "4.3.4", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", - "shasum": "" - }, - "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/release/4.x" - }, - "time": "2019-12-28T18:55:12+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.5.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "cf842904952e64e703800d094cdf34e715a8a3ae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/cf842904952e64e703800d094cdf34e715a8a3ae", - "reference": "cf842904952e64e703800d094cdf34e715a8a3ae", - "shasum": "" - }, - "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/master" - }, - "time": "2017-12-30T13:23:38+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "v1.10.3", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "451c3cd1418cf640de218914901e51b064abb093" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", - "reference": "451c3cd1418cf640de218914901e51b064abb093", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "require-dev": { - "phpspec/phpspec": "^2.5 || ^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" - }, - "time": "2020-03-05T15:02:03+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "dev-mantis-5.3", + "version": "7.0.15", "source": { "type": "git", - "url": "https://github.com/mantisbt/php-code-coverage", - "reference": "7642884eff886bf02cd8b931afad3b433da97be1" + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "819f92bba8b001d4363065928088de22f25a3a48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mantisbt/php-code-coverage/zipball/7642884eff886bf02cd8b931afad3b433da97be1", - "reference": "7642884eff886bf02cd8b931afad3b433da97be1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/819f92bba8b001d4363065928088de22f25a3a48", + "reference": "819f92bba8b001d4363065928088de22f25a3a48", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.0", - "phpunit/php-file-iterator": "dev-mantis-1.4@dev", + "php": ">=7.2", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^2.0.1", + "phpunit/php-token-stream": "^3.1.3 || ^4.0", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.0", + "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^8.2.2" }, "suggest": { - "ext-xdebug": "^2.5.5" + "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3.x-dev" + "dev-master": "7.0-dev" } }, "autoload": { @@ -1873,6 +1666,7 @@ "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -1891,31 +1685,41 @@ "xunit" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues" + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.15" }, - "time": "2022-04-15T00:05:14+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-07-26T12:20:09+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "dev-mantis-1.4", + "version": "2.0.5", "source": { "type": "git", - "url": "https://github.com/mantisbt/php-file-iterator", - "reference": "89be108433b1b8bac92d797accbf9602588d63ce" + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mantisbt/php-file-iterator/zipball/89be108433b1b8bac92d797accbf9602588d63ce", - "reference": "89be108433b1b8bac92d797accbf9602588d63ce", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", + "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1923,13 +1727,14 @@ "src/" ] }, + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1941,9 +1746,15 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "irc": "irc://irc.freenode.net/phpunit" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5" }, - "time": "2022-04-14T15:33:55+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:42:26+00:00" }, { "name": "phpunit/php-text-template", @@ -1992,28 +1803,28 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.9", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", - "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.1-dev" } }, "autoload": { @@ -2028,7 +1839,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -2039,35 +1850,41 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/master" + "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" }, - "time": "2017-02-26T11:10:40+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:20:02+00:00" }, { "name": "phpunit/php-token-stream", - "version": "2.0.2", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "791198a2c6254db10131eecfe8c06670700904db" + "reference": "9c1da83261628cb24b6a6df371b6e312b3954768" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", - "reference": "791198a2c6254db10131eecfe8c06670700904db", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9c1da83261628cb24b6a6df371b6e312b3954768", + "reference": "9c1da83261628cb24b6a6df371b6e312b3954768", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": "^7.0" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2.4" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -2092,60 +1909,61 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/master" + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.3" }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], "abandoned": true, - "time": "2017-11-27T05:48:46+00:00" + "time": "2021-07-26T12:15:06+00:00" }, { "name": "phpunit/phpunit", - "version": "dev-mantis-6.5", + "version": "8.5.33", "source": { "type": "git", - "url": "https://github.com/mantisbt/phpunit", - "reference": "215feef5692289bb3136991ee04d05f580321f2f" + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mantisbt/phpunit/zipball/215feef5692289bb3136991ee04d05f580321f2f", - "reference": "215feef5692289bb3136991ee04d05f580321f2f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", + "reference": "7d1ff0e8c6b35db78ff13e3e05517d7cbf7aa32e", "shasum": "" }, "require": { + "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.6.1", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", - "php": "^7.0", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "dev-mantis-5.3", - "phpunit/php-file-iterator": "dev-mantis-1.4", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.0", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.2", + "phpunit/php-code-coverage": "^7.0.12", + "phpunit/php-file-iterator": "^2.0.4", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^1.0.9", - "phpunit/phpunit-mock-objects": "^5.0.9", - "sebastian/comparator": "^2.1", - "sebastian/diff": "^2.0", - "sebastian/environment": "^3.1", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.5", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.3", + "sebastian/exporter": "^3.1.5", + "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, - "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2", - "phpunit/dbunit": "<3.0" - }, - "require-dev": { - "ext-pdo": "*" - }, "suggest": { + "ext-soap": "*", "ext-xdebug": "*", - "phpunit/php-invoker": "^1.1" + "phpunit/php-invoker": "^2.0.0" }, "bin": [ "phpunit" @@ -2153,7 +1971,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.5.x-dev" + "dev-master": "8.5-dev" } }, "autoload": { @@ -2161,15 +1979,7 @@ "src/" ] }, - "autoload-dev": { - "classmap": [ - "tests/" - ], - "files": [ - "src/Framework/Assert/Functions.php", - "tests/_files/CoveredFunction.php" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], @@ -2188,73 +1998,24 @@ "xunit" ], "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues" - }, - "time": "2022-04-14T16:19:48+00:00" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "5.0.10", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/cd1cf05c553ecfec36b170070573e540b67d3f1f", - "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.5", - "php": "^7.0", - "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.1" - }, - "conflict": { - "phpunit/phpunit": "<6.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.5.11" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.33" }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ + "funding": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit-mock-objects/issues", - "source": "https://github.com/sebastianbergmann/phpunit-mock-objects/tree/5.0.10" - }, - "abandoned": true, - "time": "2018-08-09T05:50:03+00:00" + "time": "2023-02-27T13:04:50+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -2313,30 +2074,30 @@ }, { "name": "sebastian/comparator", - "version": "2.1.3", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dc7ceb4a24aede938c7af2a9ed1de09609ca770", + "reference": "1dc7ceb4a24aede938c7af2a9ed1de09609ca770", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", + "php": ">=7.1", + "sebastian/diff": "^3.0", "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "^8.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2349,6 +2110,10 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, { "name": "Jeff Welch", "email": "whatthejeff@gmail.com" @@ -2360,10 +2125,6 @@ { "name": "Bernhard Schussek", "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" } ], "description": "Provides the functionality to compare PHP values for equality", @@ -2375,34 +2136,41 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/master" + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.5" }, - "time": "2018-02-01T13:46:46+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:31:48+00:00" }, { "name": "sebastian/diff", - "version": "2.0.1", + "version": "3.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" + "reference": "6296a0c086dd0117c1b78b059374d7fcbe7545ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/6296a0c086dd0117c1b78b059374d7fcbe7545ae", + "reference": "6296a0c086dd0117c1b78b059374d7fcbe7545ae", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2415,50 +2183,62 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, { "name": "Sebastian Bergmann", "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" } ], "description": "Diff implementation", "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ - "diff" + "diff", + "udiff", + "unidiff", + "unified diff" ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/master" + "source": "https://github.com/sebastianbergmann/diff/tree/3.0.4" }, - "time": "2017-08-03T08:09:46+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-05-07T05:30:20+00:00" }, { "name": "sebastian/environment", - "version": "3.1.0", + "version": "4.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.1" }, "require-dev": { - "phpunit/phpunit": "^6.1" + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -2485,22 +2265,28 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/master" + "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" }, - "time": "2017-07-01T08:51:00+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:53:42+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.4", + "version": "3.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db" + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/73a9676f2833b9a7c36968f9d882589cd75511e6", + "reference": "73a9676f2833b9a7c36968f9d882589cd75511e6", "shasum": "" }, "require": { @@ -2556,7 +2342,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.5" }, "funding": [ { @@ -2564,27 +2350,30 @@ "type": "github" } ], - "time": "2021-11-11T13:51:24+00:00" + "time": "2022-09-14T06:00:17+00:00" }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "66783ce213de415b451b904bfef9dda0cf9aeae0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/66783ce213de415b451b904bfef9dda0cf9aeae0", + "reference": "66783ce213de415b451b904bfef9dda0cf9aeae0", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "ext-dom": "*", + "phpunit/phpunit": "^8.0" }, "suggest": { "ext-uopz": "*" @@ -2592,7 +2381,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -2617,9 +2406,15 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/2.0.0" + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.3" }, - "time": "2017-04-27T15:39:26+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-02T09:23:32+00:00" }, { "name": "sebastian/object-enumerator", @@ -2798,25 +2593,25 @@ }, { "name": "sebastian/resource-operations", - "version": "1.0.0", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", "shasum": "" }, "require": { - "php": ">=5.6.0" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -2838,31 +2633,40 @@ "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/master" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" }, - "time": "2015-07-28T20:34:47+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:30:19+00:00" }, { - "name": "sebastian/version", - "version": "2.0.1", + "name": "sebastian/type", + "version": "1.1.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "1.1-dev" } }, "autoload": { @@ -2881,112 +2685,86 @@ "role": "lead" } ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/master" + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" }, - "time": "2016-10-03T07:35:21+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:25:11+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.19.0", + "name": "sebastian/version", + "version": "2.0.1", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/aed596913b70fae57be53d86faa2e9ef85a2297b", - "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-ctype": "For best performance" + "php": ">=5.6" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "dev-master": "2.0.x-dev" } }, "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.19.0" + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-23T09:01:57+00:00" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "theseer/tokenizer", - "version": "1.1.3", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "shasum": "" }, "require": { "ext-dom": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": "^7.0" + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { @@ -3008,82 +2786,34 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/master" - }, - "time": "2019-06-13T22:48:21+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.9.1", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<3.9.1" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36 || ^7.5.13" - }, - "type": "library", - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ + "funding": [ { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "url": "https://github.com/theseer", + "type": "github" } ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.9.1" - }, - "time": "2020-07-08T17:02:28+00:00" + "time": "2021-07-28T10:34:58+00:00" } ], "aliases": [], "minimum-stability": "stable", "stability-flags": { - "dapphp/securimage": 20, - "phpunit/phpunit": 20, - "phpunit/php-code-coverage": 20, - "phpunit/php-file-iterator": 20 + "dapphp/securimage": 20 }, "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.0 || ^8.0", + "php": "^7.2.5 || ^8.0", "ext-mbstring": "*", "ext-json": "*" }, - "platform-dev": [], + "platform-dev": { + "ext-zip": "*" + }, "platform-overrides": { - "php": "7.0.0" + "php": "7.2.5" }, "plugin-api-version": "2.3.0" } From 0931227cc888b63758b8f980007ea7506f50e456 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Tue, 1 Aug 2023 19:06:39 +0200 Subject: [PATCH 03/18] Tests: update function signatures for PHPUnit 8.5 --- tests/Mantis/MantisCoreBase.php | 2 +- tests/Mantis/PluginTest.php | 2 +- tests/Mantis/UserTest.php | 4 ++-- tests/soap/AttachmentTest.php | 2 +- tests/soap/CategoryTest.php | 2 +- tests/soap/ProjectTest.php | 2 +- tests/soap/SoapBase.php | 4 ++-- tests/soap/VersionTest.php | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/Mantis/MantisCoreBase.php b/tests/Mantis/MantisCoreBase.php index 368764d5b2..2075852116 100644 --- a/tests/Mantis/MantisCoreBase.php +++ b/tests/Mantis/MantisCoreBase.php @@ -44,7 +44,7 @@ abstract class MantisCoreBase extends PHPUnit\Framework\TestCase { /** * MantisCore tests setup */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); if( array_key_exists( 'MANTIS_TESTSUITE_USERNAME', $GLOBALS ) ) { diff --git a/tests/Mantis/PluginTest.php b/tests/Mantis/PluginTest.php index 1c8aa42012..81c7ff9e76 100644 --- a/tests/Mantis/PluginTest.php +++ b/tests/Mantis/PluginTest.php @@ -55,7 +55,7 @@ class MantisPluginTest extends MantisCoreBase { /** * Tests setup. */ - protected function setUp() { + protected function setUp(): void { plugin_register(self::MANTISCORE); } diff --git a/tests/Mantis/UserTest.php b/tests/Mantis/UserTest.php index 943d83d039..779e289b13 100644 --- a/tests/Mantis/UserTest.php +++ b/tests/Mantis/UserTest.php @@ -39,7 +39,7 @@ class MantisUserApiTest extends MantisCoreBase { protected static $user_id; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); $t_cookie = user_create( @@ -51,7 +51,7 @@ public static function setUpBeforeClass() { self::$user_id = user_get_id_by_cookie( $t_cookie ); } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { user_delete( self::$user_id ); } diff --git a/tests/soap/AttachmentTest.php b/tests/soap/AttachmentTest.php index ac8554c42e..1ca908c240 100644 --- a/tests/soap/AttachmentTest.php +++ b/tests/soap/AttachmentTest.php @@ -173,7 +173,7 @@ private function skipIfProjectDocumentationIsNotEnabled() { * Tear Down: Remove project attachments added by test * @return void */ - protected function tearDown() { + protected function tearDown(): void { SoapBase::tearDown(); foreach( $this->projectAttachmentsToDelete as $t_project_attachment_id ) { diff --git a/tests/soap/CategoryTest.php b/tests/soap/CategoryTest.php index 54e6452e04..8348ccf1f1 100644 --- a/tests/soap/CategoryTest.php +++ b/tests/soap/CategoryTest.php @@ -108,7 +108,7 @@ public function testAddRenameDeleteCategory() { * Tear Down: Remove categories created by tests * @return void */ - protected function tearDown() { + protected function tearDown(): void { parent::tearDown(); foreach( $this->categoryNamesToDelete as $t_category_name ) { diff --git a/tests/soap/ProjectTest.php b/tests/soap/ProjectTest.php index 175aee25ad..8319305db9 100644 --- a/tests/soap/ProjectTest.php +++ b/tests/soap/ProjectTest.php @@ -184,7 +184,7 @@ private function newProjectAsArray( $p_project_name ) { * Tear Down * @return void */ - protected function tearDown() { + protected function tearDown(): void { parent::tearDown(); foreach( $this->projectIdToDelete as $t_project_id ) { diff --git a/tests/soap/SoapBase.php b/tests/soap/SoapBase.php index 150d1459bb..aea74f0e3d 100644 --- a/tests/soap/SoapBase.php +++ b/tests/soap/SoapBase.php @@ -108,7 +108,7 @@ class SoapBase extends PHPUnit\Framework\TestCase { * setUp * @return void */ - protected function setUp() { + protected function setUp(): void { if( empty( $GLOBALS['MANTIS_TESTSUITE_SOAP_ENABLED'] ) ) { $this->markTestSkipped( 'The Soap tests are disabled.' ); } @@ -143,7 +143,7 @@ protected function extraSoapClientFlags() { * tearDown * @return void */ - protected function tearDown() { + protected function tearDown(): void { foreach ( $this->versionIdsToDelete as $t_version_id_to_delete ) { $this->client->mc_project_version_delete( $this->userName, $this->password, $t_version_id_to_delete ); } diff --git a/tests/soap/VersionTest.php b/tests/soap/VersionTest.php index b9bfc4fbbb..62042f8e33 100644 --- a/tests/soap/VersionTest.php +++ b/tests/soap/VersionTest.php @@ -41,7 +41,7 @@ class VersionTest extends SoapBase { /** * Sets up the fixture. */ - public function setUp() { + public function setUp(): void { parent::setUp(); # Define the test version's date order (used for assertion) From 4dc7db6fe3a21d94bb59860cfa9e4dc525e27d06 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Tue, 1 Aug 2023 19:38:09 +0200 Subject: [PATCH 04/18] Fix deprecated assertInternalType() Replace with assertThat() and isType() constraint. --- tests/Mantis/ConfigParserTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Mantis/ConfigParserTest.php b/tests/Mantis/ConfigParserTest.php index fb9d74b3da..4f0e4e0ef3 100644 --- a/tests/Mantis/ConfigParserTest.php +++ b/tests/Mantis/ConfigParserTest.php @@ -72,7 +72,7 @@ public function testScalarTypes( $p_string, $p_type ) { $t_parser = new ConfigParser( $p_string ); $t_parsed_result = $t_parser->parse(); - $this->assertInternalType( $p_type, $t_parsed_result ); + $this->assertThat( $t_parsed_result, $this->isType( $p_type ) ); $this->assertEquals( $t_parsed_result, $t_reference_result, $this->errorMessage( $p_string ) ); } From 0ff93e5333555def8da57e4a9c99fa14de987349 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Tue, 1 Aug 2023 19:47:40 +0200 Subject: [PATCH 05/18] Fix deprecated @expectedException annotation Replace with $this->expectException() --- tests/soap/EnumTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/soap/EnumTest.php b/tests/soap/EnumTest.php index 464326f693..67a92a86b5 100644 --- a/tests/soap/EnumTest.php +++ b/tests/soap/EnumTest.php @@ -57,9 +57,9 @@ public function testAccessLevel() { * Tests the mc_enum_access_levels with invalid credentials. * * @return void - * @expectedException SoapFault */ public function testAccessLevelAccessDenied() { + $this->expectException( SoapFault::class ); $this->client->mc_enum_access_levels( 'administrator', '' ); } @@ -89,9 +89,9 @@ public function testStatus() { * Tests mc_enum_status method with invalid credentials. * * @return void - * @expectedException SoapFault */ public function testStatusAccessDenied() { + $this->expectException( SoapFault::class ); $this->client->mc_enum_status( 'administrator', '' ); } @@ -118,10 +118,10 @@ public function testPriority() { /** * Tests mc_enum_priorities method with invalid credentials. * - * @expectedException SoapFault * @return void */ public function testPriorityAccessDenied() { + $this->expectException( SoapFault::class ); $this->client->mc_enum_priorities( 'administrator', '' ); } @@ -148,10 +148,10 @@ public function testReproducibility() { /** * Tests mc_enum_reproducibilities method with invalid credentials. * - * @expectedException SoapFault * @return void */ public function testReproducibilityAccessDenied() { + $this->expectException( SoapFault::class ); $this->client->mc_enum_reproducibilities( 'administrator', '' ); } @@ -181,10 +181,10 @@ public function testSeverity() { /** * Tests mc_enum_severities method with invalid credentials. * - * @expectedException SoapFault * @return void */ public function testSeverityAccessDenied() { + $this->expectException( SoapFault::class ); $this->client->mc_enum_severities( 'administrator', '' ); } @@ -211,10 +211,10 @@ public function testProjection() { /** * Tests mc_enum_projections method with invalid credentials. * - * @expectedException SoapFault * @return void */ public function testProjectionAccessDenied() { + $this->expectException( SoapFault::class ); $this->client->mc_enum_projections( 'administrator', '' ); } @@ -242,10 +242,10 @@ public function testEta() { /** * Tests mc_enum_etas method with invalid credentials. * - * @expectedException SoapFault * @return void */ public function testEtaAccessDenied() { + $this->expectException( SoapFault::class ); $this->client->mc_enum_etas( 'administrator', '' ); } @@ -276,10 +276,10 @@ public function testResolution() { /** * Tests mc_enum_resolutions method with invalid credentials. * - * @expectedException SoapFault * @return void */ public function testResolutionAccessDenied() { + $this->expectException( SoapFault::class ); $this->client->mc_enum_resolutions( 'administrator', '' ); } From d3203e0275d97ce83f793fae0404aa8b3a9ba252 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Tue, 1 Aug 2023 19:57:11 +0200 Subject: [PATCH 06/18] Fix deprecated assertContains() with String haystack Replace with assertStringContainsString() --- tests/soap/IssueAddTest.php | 13 ++++++++----- tests/soap/TagTest.php | 6 +++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/soap/IssueAddTest.php b/tests/soap/IssueAddTest.php index f292d4b486..61a98bfcb3 100644 --- a/tests/soap/IssueAddTest.php +++ b/tests/soap/IssueAddTest.php @@ -350,7 +350,10 @@ public function testCreateIssueWithFaultyVersionGeneratesError() { $this->fail( 'Invalid version did not raise error.' ); } catch ( SoapFault $e ) { - $this->assertContains( "Version 'noSuchVersion' does not exist in project", $e->getMessage() ); + $this->assertStringContainsString( + "Version 'noSuchVersion' does not exist in project", + $e->getMessage() + ); } } @@ -525,8 +528,8 @@ public function testIssuesGet() { $t_search_result_headers = $this->client->mc_issues_get_header( $this->userName, $this->password, array( $t_issue_id, $t_issue_id_2 ) ); $this->assertEquals( 2, count( $t_search_result_headers )); - $this->assertContains( 'testIssuesGet-1', $t_search_result_headers[0]->summary ); - $this->assertContains( 'testIssuesGet-2', $t_search_result_headers[1]->summary ); + $this->assertStringContainsString( 'testIssuesGet-1', $t_search_result_headers[0]->summary ); + $this->assertStringContainsString( 'testIssuesGet-2', $t_search_result_headers[1]->summary ); $this->assertEquals( VS_PUBLIC, $t_search_result_headers[0]->view_state ); $this->assertEquals( 0, $t_search_result_headers[0]->notes_count ); @@ -534,8 +537,8 @@ public function testIssuesGet() { $this->assertEquals( 10, $t_search_result_headers[0]->status ); $this->assertEquals( 2, count( $t_search_result_issues )); - $this->assertContains( 'testIssuesGet-1', $t_search_result_issues[0]->summary ); - $this->assertContains( 'testIssuesGet-2', $t_search_result_issues[1]->summary ); + $this->assertStringContainsString( 'testIssuesGet-1', $t_search_result_issues[0]->summary ); + $this->assertStringContainsString( 'testIssuesGet-2', $t_search_result_issues[1]->summary ); $this->assertEquals( VS_PUBLIC, $t_search_result_issues[0]->view_state->id); $this->assertEquals( 10, $t_search_result_issues[0]->status->id ); diff --git a/tests/soap/TagTest.php b/tests/soap/TagTest.php index a2222b3446..20218f81e9 100644 --- a/tests/soap/TagTest.php +++ b/tests/soap/TagTest.php @@ -90,7 +90,7 @@ public function testCreateTagWithInvalidName() { $this->client->mc_tag_add( $this->userName, $this->password, $t_tag_to_create ); self::fail( 'Expected an error' ); } catch ( SoapFault $e ) { - $this->assertContains( 'Invalid tag name', $e->getMessage() ); + $this->assertStringContainsString( 'Invalid tag name', $e->getMessage() ); } } @@ -103,7 +103,7 @@ public function testDeleteNonExistantTag() { $this->client->mc_tag_delete( $this->userName, $this->password, -1 ); self::fail( 'Expected an error' ); } catch ( SoapFault $e ) { - $this->assertContains( 'No tag with id', $e->getMessage() ); + $this->assertStringContainsString( 'No tag with id', $e->getMessage() ); } } @@ -136,7 +136,7 @@ public function testCreateTagWithExistingName() { $this->client->mc_tag_add( $this->userName, $this->password, $t_tag_to_create ); self::fail( 'Expected an error' ); } catch ( SoapFault $e ) { - $this->assertContains( 'A tag with the same name already exists', $e->getMessage() ); + $this->assertStringContainsString( 'A tag with the same name already exists', $e->getMessage() ); } } From 2b2121d4da6f8e8d96ecf75b07b7b17b7d3511b5 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Tue, 1 Aug 2023 20:01:07 +0200 Subject: [PATCH 07/18] Fix deprecated expectExceptionMessageRegExp() Replace with expectExceptionMessageMatches() --- tests/Mantis/ConfigParserTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Mantis/ConfigParserTest.php b/tests/Mantis/ConfigParserTest.php index 4f0e4e0ef3..f2bc633b2c 100644 --- a/tests/Mantis/ConfigParserTest.php +++ b/tests/Mantis/ConfigParserTest.php @@ -105,7 +105,7 @@ public function testArrays( $p_string ) { */ public function testExtraTokensError() { $this->expectException(Exception::class); - $this->expectExceptionMessageRegExp('/^Extra tokens found/'); + $this->expectExceptionMessageMatches('/^Extra tokens found/'); $t_parser = new ConfigParser( '1; 2' ); $t_parser->parse( ConfigParser::EXTRA_TOKENS_ERROR ); @@ -136,7 +136,7 @@ public function testExtraTokensIgnore() { */ public function testSyntaxError() { $this->expectException(Exception::class); - $this->expectExceptionMessageRegExp( '/^syntax error/'); + $this->expectExceptionMessageMatches( '/^syntax error/'); $t_parser = new ConfigParser( 'array(' ); $t_parser->parse(); @@ -149,7 +149,7 @@ public function testSyntaxError() { */ public function testInvalidTokensError() { $this->expectException(Exception::class); - $this->expectExceptionMessageRegExp('/^Unexpected token/'); + $this->expectExceptionMessageMatches('/^Unexpected token/'); $t_parser = new ConfigParser( 'echo 1;' ); $t_parser->parse(); @@ -162,7 +162,7 @@ public function testInvalidTokensError() { */ public function testUnknownConstantError() { $this->expectException(Exception::class); - $this->expectExceptionMessageRegExp('/^Unknown string literal/'); + $this->expectExceptionMessageMatches('/^Unknown string literal/'); # Make sure we have a string that is not a defined constant $t_constant = 'UNDEFINED_CONSTANT'; From 86202f0372e6ebd27b824a5cc51731c3486e9d44 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Wed, 2 Aug 2023 15:24:22 +0200 Subject: [PATCH 08/18] Tests: update function signatures for PHPUnit 8.5 --- tests/rest/RestBase.php | 4 ++-- tests/rest/RestImpersonateUserTest.php | 17 +---------------- tests/rest/RestIssueTest.php | 4 ++-- tests/rest/RestProjectVersionTest.php | 2 +- tests/rest/RestUserTest.php | 16 +--------------- 5 files changed, 7 insertions(+), 36 deletions(-) diff --git a/tests/rest/RestBase.php b/tests/rest/RestBase.php index 996a636c5a..1586b32253 100644 --- a/tests/rest/RestBase.php +++ b/tests/rest/RestBase.php @@ -94,7 +94,7 @@ class RestBase extends PHPUnit\Framework\TestCase { * setUp * @return void */ - protected function setUp() { + protected function setUp(): void { if( !isset( $GLOBALS['MANTIS_TESTSUITE_REST_ENABLED'] ) || !$GLOBALS['MANTIS_TESTSUITE_REST_ENABLED'] ) { $this->markTestSkipped( 'The REST API tests are disabled.' ); @@ -131,7 +131,7 @@ protected function setUp() { * tearDown * @return void */ - protected function tearDown() { + protected function tearDown(): void { foreach( $this->usersToDelete as $t_user_id ) { $t_response = $this->builder()->delete( '/users/' . $t_user_id, '' )->send(); $this->assertEquals( HTTP_STATUS_NO_CONTENT, $t_response->getStatusCode() ); diff --git a/tests/rest/RestImpersonateUserTest.php b/tests/rest/RestImpersonateUserTest.php index 21e4404437..7a0473c12b 100644 --- a/tests/rest/RestImpersonateUserTest.php +++ b/tests/rest/RestImpersonateUserTest.php @@ -31,22 +31,7 @@ * @requires extension curl * @group REST */ -class RestImpersonateUserTest extends RestBase { - /** - * Setup test fixture - * - * @return void - */ - public function setUp() { - parent::setUp(); - } - - /** - * Tear down the test fixture. - */ - public function tearDown() { - parent::tearDown(); - } +class RestImpersonateUserTests extends RestBase { /** * Test /users/me API without impersonation diff --git a/tests/rest/RestIssueTest.php b/tests/rest/RestIssueTest.php index db883f850c..1ff8660914 100644 --- a/tests/rest/RestIssueTest.php +++ b/tests/rest/RestIssueTest.php @@ -473,7 +473,7 @@ public function testCreateIssueNoProject() { $this->assertEquals( HTTP_STATUS_BAD_REQUEST, $t_response->getStatusCode() ); } - public function setUp() { + public function setUp(): void { parent::setUp(); # Retrieve the 3 most recent versions @@ -487,7 +487,7 @@ public function setUp() { } while( !tag_is_unique( $this->tag_name ) ); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); # Delete tag if it exists diff --git a/tests/rest/RestProjectVersionTest.php b/tests/rest/RestProjectVersionTest.php index 998076d6f4..66f9e37570 100644 --- a/tests/rest/RestProjectVersionTest.php +++ b/tests/rest/RestProjectVersionTest.php @@ -42,7 +42,7 @@ class RestProjectVersionTest extends RestBase { * * @return void */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->ver_base_url = '/projects/' . $this->getProjectId() . '/versions/'; diff --git a/tests/rest/RestUserTest.php b/tests/rest/RestUserTest.php index 4b2b27388e..29eddee5f5 100644 --- a/tests/rest/RestUserTest.php +++ b/tests/rest/RestUserTest.php @@ -31,15 +31,7 @@ * @requires extension curl * @group REST */ -class RestUserTest extends RestBase { - /** - * Setup test fixture - * - * @return void - */ - public function setUp() { - parent::setUp(); - } +class RestUserTests extends RestBase { /** * Test /users/me API which users use to get information about themselves. @@ -604,10 +596,4 @@ public function providerValidUserNames() { ); } - /** - * Tear down the test fixture. - */ - public function tearDown() { - parent::tearDown(); - } } \ No newline at end of file From f706c1e2a8e3de816002fc0478723e02b588b947 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Wed, 2 Aug 2023 18:45:39 +0200 Subject: [PATCH 09/18] Whitespace --- tests/rest/RestBase.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/rest/RestBase.php b/tests/rest/RestBase.php index 1586b32253..1c29c66879 100644 --- a/tests/rest/RestBase.php +++ b/tests/rest/RestBase.php @@ -244,10 +244,10 @@ protected function deleteAfterRunUserIfCreated( $p_response ) { if( isset( $t_body['users'] ) ) { $t_users = $t_body['users']; - $t_user_id = (int)$t_users[0]['id']; + $t_user_id = (int)$t_users[0]['id']; } if( isset( $t_body['user'] ) ) { $t_user = $t_body['user']; - $t_user_id = (int)$t_user['id']; + $t_user_id = (int)$t_user['id']; } else { $t_user_id = (int)$t_body['id']; } From 7ee3ddd9e4ca513ddfbee6bb7a992716f533e446 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Sun, 6 Aug 2023 18:52:43 +0200 Subject: [PATCH 10/18] Make RestBase an abstract class Prevents PHPUnit from throwing a warning: No tests found in class "RestBase". --- tests/rest/RestBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/rest/RestBase.php b/tests/rest/RestBase.php index 1c29c66879..b271e5d389 100644 --- a/tests/rest/RestBase.php +++ b/tests/rest/RestBase.php @@ -40,7 +40,7 @@ * @requires extension curl * @group REST */ -class RestBase extends PHPUnit\Framework\TestCase { +abstract class RestBase extends PHPUnit\Framework\TestCase { /** * @var string Base path for REST API */ From 73fd23dd7da2cee116ca9e51d250dc173a16cbe3 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Tue, 8 Aug 2023 01:11:39 +0200 Subject: [PATCH 11/18] Updating GuzzleHttp minimum version to 7.5 Fixes #32807 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 71adbde81b..01dd4f9bf8 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "ext-mbstring": "*", "ext-json": "*", "slim/slim": "^3.0", - "guzzlehttp/guzzle": "^6.2", + "guzzlehttp/guzzle": "^7.5", "vboctor/disposable_email_checker": "^3.0", "adodb/adodb-php": "^5.20.21", "phpmailer/phpmailer": "~6.0", From 839c4f0819190930aeefdf4ee197557dffb9becf Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Tue, 8 Aug 2023 01:14:06 +0200 Subject: [PATCH 12/18] Composer update - Removing symfony/polyfill-php72 (v1.19.0) - Removing symfony/polyfill-php70 (v1.19.0) - Removing symfony/polyfill-intl-normalizer (v1.19.0) - Removing symfony/polyfill-intl-idn (v1.19.0) - Removing paragonie/random_compat (v9.99.100) - Installing symfony/deprecation-contracts (v2.5.2) - Installing psr/http-client (1.0.2) - Upgrading guzzlehttp/guzzle (6.5.8 => 7.6.1) Fixes #32807 --- composer.lock | 433 +++++++++++--------------------------------------- 1 file changed, 92 insertions(+), 341 deletions(-) diff --git a/composer.lock b/composer.lock index 5d7e691d11..49402e7486 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5ed62e080bbc3e980b66b0c25a31d935", + "content-hash": "72ae0c4e961968a23fc800c640ac4beb", "packages": [ { "name": "adodb/adodb-php", @@ -232,37 +232,46 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.5.8", + "version": "7.6.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981" + "reference": "8444a2bacf1960bc6a2b62ed86b8e72e11eebe51" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981", - "reference": "a52f0440530b54fa079ce76e8c5d196a42cad981", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/8444a2bacf1960bc6a2b62ed86b8e72e11eebe51", + "reference": "8444a2bacf1960bc6a2b62ed86b8e72e11eebe51", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.9", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.17" + "guzzlehttp/promises": "^1.5", + "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.1" + "php-http/client-integration-tests": "^3.0", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "6.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { @@ -315,19 +324,20 @@ } ], "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", "keywords": [ "client", "curl", "framework", "http", "http client", + "psr-18", + "psr-7", "rest", "web service" ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/6.5.8" + "source": "https://github.com/guzzle/guzzle/tree/7.6.1" }, "funding": [ { @@ -343,7 +353,7 @@ "type": "tidelift" } ], - "time": "2022-06-20T22:16:07+00:00" + "time": "2023-05-15T20:43:01+00:00" }, { "name": "guzzlehttp/promises", @@ -584,56 +594,6 @@ }, "time": "2018-02-13T20:26:39+00:00" }, - { - "name": "paragonie/random_compat", - "version": "v9.99.100", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", - "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", - "shasum": "" - }, - "require": { - "php": ">= 7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "support": { - "email": "info@paragonie.com", - "issues": "https://github.com/paragonie/random_compat/issues", - "source": "https://github.com/paragonie/random_compat" - }, - "time": "2020-10-15T08:29:30+00:00" - }, { "name": "phpmailer/phpmailer", "version": "v6.8.0", @@ -821,6 +781,58 @@ }, "time": "2017-02-14T16:28:37+00:00" }, + { + "name": "psr/http-client", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client/tree/1.0.2" + }, + "time": "2023-04-10T20:12:12+00:00" + }, { "name": "psr/http-message", "version": "1.0.1", @@ -1006,290 +1018,35 @@ "time": "2021-10-02T19:38:22+00:00" }, { - "name": "symfony/polyfill-intl-idn", - "version": "v1.19.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "4ad5115c0f5d5172a9fe8147675ec6de266d8826" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/4ad5115c0f5d5172a9fe8147675ec6de266d8826", - "reference": "4ad5115c0f5d5172a9fe8147675ec6de266d8826", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php70": "^1.10", - "symfony/polyfill-php72": "^1.10" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.19-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.19.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-21T09:57:48+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.19.0", + "name": "symfony/deprecation-contracts", + "version": "v2.5.2", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8db0ae7936b42feb370840cf24de1a144fb0ef27" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8db0ae7936b42feb370840cf24de1a144fb0ef27", - "reference": "8db0ae7936b42feb370840cf24de1a144fb0ef27", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", "shasum": "" }, "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.19-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.19.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-23T09:01:57+00:00" - }, - { - "name": "symfony/polyfill-php70", - "version": "v1.19.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "3fe414077251a81a1b15b1c709faf5c2fbae3d4e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/3fe414077251a81a1b15b1c709faf5c2fbae3d4e", - "reference": "3fe414077251a81a1b15b1c709faf5c2fbae3d4e", - "shasum": "" - }, - "require": { - "paragonie/random_compat": "~1.0|~2.0|~9.99", - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.19-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php70\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php70/tree/v1.19.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-23T09:01:57+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.19.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "beecef6b463b06954638f02378f52496cb84bacc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/beecef6b463b06954638f02378f52496cb84bacc", - "reference": "beecef6b463b06954638f02378f52496cb84bacc", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" + "dev-main": "2.5-dev" }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, "files": [ - "bootstrap.php" + "function.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1306,16 +1063,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.19.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" }, "funding": [ { @@ -1331,7 +1082,7 @@ "type": "tidelift" } ], - "time": "2020-10-23T09:01:57+00:00" + "time": "2022-01-02T09:53:40+00:00" }, { "name": "vboctor/disposable_email_checker", From f50431108a5ea0e6b5e12882f43eb5d25cedecbb Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Wed, 9 Aug 2023 18:50:20 +0200 Subject: [PATCH 13/18] Ignore .phpunit.result.cache file --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index e3b49cbb8b..57a66489e5 100644 --- a/.gitignore +++ b/.gitignore @@ -53,6 +53,10 @@ api/rest/swagger /vendor/ composer.phar +# PHPUnit +.phpunit.result.cache + + # Settings below are for convenience when switching branches on Dev machines # v1.2.x config files From e6827c4a74f7ac57044ae419239f570d4e07ead4 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Wed, 9 Aug 2023 18:48:02 +0200 Subject: [PATCH 14/18] Fix errors when SOAP extension is not loaded Initialize defaultSoapClientOptions property in setUp(), to avoid a syntax error due to undefined constant WSDL_CACHE_NONE. Remove useless SoapAllTests::setUp() method. TestSuite class does not have this method so it is never actually called. Extension availability check is performed by `@requires extension` hints in the test cases' PHPDoc blocks. Fixes #32814 --- tests/soap/AllTests.php | 10 ---------- tests/soap/SoapBase.php | 11 +++++++---- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/tests/soap/AllTests.php b/tests/soap/AllTests.php index f9629984eb..71512eec6c 100644 --- a/tests/soap/AllTests.php +++ b/tests/soap/AllTests.php @@ -55,16 +55,6 @@ */ class SoapAllTests extends PHPUnit\Framework\TestSuite { - /** - * setUp - * @return void - */ - protected function setUp() { - if( ! extension_loaded( 'soap' ) ) { - $this->markTestSuiteSkipped( 'The SOAP extension is not available.' ); - } - } - /** * Initialises Soap Test Suite * @return SoapAllTests diff --git a/tests/soap/SoapBase.php b/tests/soap/SoapBase.php index aea74f0e3d..71ad0ebcfb 100644 --- a/tests/soap/SoapBase.php +++ b/tests/soap/SoapBase.php @@ -99,10 +99,7 @@ class SoapBase extends PHPUnit\Framework\TestCase { /** * @var array Soap Client Options Array */ - private $defaultSoapClientOptions = array( 'trace' => true, - 'exceptions' => true, - 'cache_wsdl' => WSDL_CACHE_NONE - ); + private $defaultSoapClientOptions; /** * setUp @@ -118,6 +115,12 @@ protected function setUp(): void { "You must define 'MANTIS_TESTSUITE_SOAP_HOST' in your bootstrap file" ); + $this->defaultSoapClientOptions = array( + 'trace' => true, + 'exceptions' => true, + 'cache_wsdl' => WSDL_CACHE_NONE, + ); + $this->client = new SoapClient( $t_wsdl, array_merge( $this->defaultSoapClientOptions, $this->extraSoapClientFlags() ) ); From d79c663bdd0fff5a63a3f39808dddea120661258 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Wed, 9 Aug 2023 19:07:52 +0200 Subject: [PATCH 15/18] Fix error when executing PHPUnit AllTests.php Argument #1 of PHPUnit\Framework\TestSuite::addTestSuite() must be a class name or object AllTests::suite() method called addTest() instead of addTestSuite() to include the 3 tests suites. Fixes #32815 --- tests/AllTests.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/AllTests.php b/tests/AllTests.php index aed342ef5c..c202e9e8fe 100644 --- a/tests/AllTests.php +++ b/tests/AllTests.php @@ -43,9 +43,9 @@ class AllTests public static function suite() { $t_suite = new PHPUnit\Framework\TestSuite( 'Mantis Bug Tracker' ); - $t_suite->addTest( MantisAllTests::suite() ); - $t_suite->addTest( SoapAllTests::suite() ); - $t_suite->addTest( RestAllTests::suite() ); + $t_suite->addTestSuite( MantisAllTests::class ); + $t_suite->addTestSuite( SoapAllTests::class ); + $t_suite->addTestSuite( SoapAllTests::class ); return $t_suite; } From f550281aa29d8b6f2efd78a153c7763521a22212 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Thu, 10 Aug 2023 01:52:52 +0200 Subject: [PATCH 16/18] Define the Test Suites with a phpunit.xml file Until today, the test suites were defined in "AllTests.php" files using the PHPUnit\Framework\TestSuite class, which is meant for internal use. The official, documented method to compose a test suite is to use XML configuration. This commit introduces the phpunit.xml, which replaces the AllTests.php scripts, and updates documentation and TravisCI script. Fixes #32816 --- build/travis_script.sh | 2 +- .../Developers_Guide/en-US/Contributors.xml | 47 ++++++++-- phpunit.xml | 23 +++++ tests/AllTests.php | 52 ------------ tests/Mantis/AllTests.php | 62 -------------- tests/rest/AllTests.php | 64 -------------- tests/soap/AllTests.php | 85 ------------------- 7 files changed, 62 insertions(+), 273 deletions(-) create mode 100644 phpunit.xml delete mode 100644 tests/AllTests.php delete mode 100644 tests/Mantis/AllTests.php delete mode 100644 tests/rest/AllTests.php delete mode 100644 tests/soap/AllTests.php diff --git a/build/travis_script.sh b/build/travis_script.sh index 7fffe14396..7d061d3ad7 100755 --- a/build/travis_script.sh +++ b/build/travis_script.sh @@ -27,7 +27,7 @@ function build_docbook() { if [[ -z $DOCBOOK ]] then echo "Executing MantisBT test scripts..." - vendor/bin/phpunit --bootstrap ./tests/bootstrap.php ./tests/AllTests.php + vendor/bin/phpunit else echo "Building DocBook..." build_docbook diff --git a/docbook/Developers_Guide/en-US/Contributors.xml b/docbook/Developers_Guide/en-US/Contributors.xml index 514d9690c0..6919228813 100644 --- a/docbook/Developers_Guide/en-US/Contributors.xml +++ b/docbook/Developers_Guide/en-US/Contributors.xml @@ -398,12 +398,25 @@ git merge master MantisBT has a suite of PHPUnit tests, which can be found in the /tests directory. - It is organized in 3 main sections: + It is organized in 3 distinct Test Suites, + defined in the phpunit.xml file: - MantisBT Core tests - SOAP API tests - REST API tests + + + mantis: MantisBT Core tests + + + + + soap: SOAP API tests + + + + + rest: REST API tests + + @@ -420,6 +433,20 @@ git merge master for the patches you are submitting. Please remember that your changes must not break existing tests. + + New Tests should be stored in the subdirectory corresponding to the + Test Suite they belong to; the file should be named + XxxxxTest.php, where + Xxxxx is the Test's name. + The Test.php suffix allows the script to be + automatically picked up by PHPUnit when running the Test Suite. + Without this suffix, the new script will have to be + + declared manually + with a <file> tag + in the phpunit.xml file's + relevant <testsuite> section. +
Initial Setup @@ -545,7 +572,8 @@ $g_anonymous_account = 'username'; # of the anonymous account created above SOAP extension - The PHP SOAP extension + The + PHP SOAP extension is required to run the SOAP tests. @@ -563,20 +591,21 @@ $g_anonymous_account = 'username'; # of the anonymous account created above repository's root -./vendor/bin/phpunit --bootstrap tests/bootstrap.php tests +./vendor/bin/phpunit Execution can be limited to a subset or individual test units -./vendor/bin/phpunit --bootstrap tests/bootstrap.php tests/rest -./vendor/bin/phpunit --bootstrap tests/bootstrap.php tests/core/Mantis/ConfigParserTest.php +./vendor/bin/phpunit --testsuite rest +./vendor/bin/phpunit tests/Mantis/ConfigParserTest.php For further details and options, refer to the - PHPUnit manual. + + PHPUnit manual.
diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000000..117b2fc99c --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,23 @@ + + + + + + tests/Mantis + + + + tests/soap + + + + tests/rest + + + + diff --git a/tests/AllTests.php b/tests/AllTests.php deleted file mode 100644 index c202e9e8fe..0000000000 --- a/tests/AllTests.php +++ /dev/null @@ -1,52 +0,0 @@ -. - -/** - * Testing Framework for MantisBT - * - * Configuration by users should be performed in bootstrap.php - * - * @package Tests - * @subpackage UnitTests - * @copyright Copyright 2002 MantisBT Team - mantisbt-dev@lists.sourceforge.net - * @link http://www.mantisbt.org - */ - -require_once 'TestConfig.php'; - -require_once 'Mantis/AllTests.php'; -require_once 'soap/AllTests.php'; -require_once 'rest/AllTests.php'; - -/** - * All tests - */ -class AllTests -{ - /** - * Test suite - * @return PHPUnit\Framework\TestSuite - */ - public static function suite() { - $t_suite = new PHPUnit\Framework\TestSuite( 'Mantis Bug Tracker' ); - - $t_suite->addTestSuite( MantisAllTests::class ); - $t_suite->addTestSuite( SoapAllTests::class ); - $t_suite->addTestSuite( SoapAllTests::class ); - - return $t_suite; - } -} diff --git a/tests/Mantis/AllTests.php b/tests/Mantis/AllTests.php deleted file mode 100644 index 6997f31a44..0000000000 --- a/tests/Mantis/AllTests.php +++ /dev/null @@ -1,62 +0,0 @@ -. - -/** - * MantisBT Core Unit Tests - * @package Tests - * @subpackage UnitTests - * @copyright Copyright 2002 MantisBT Team - mantisbt-dev@lists.sourceforge.net - * @link http://www.mantisbt.org - */ - - -/** - * Includes - */ -require_once dirname( dirname( __FILE__ ) ) . '/TestConfig.php'; - -require_once 'EnumTest.php'; -require_once 'HelperTest.php'; -require_once 'PluginTest.php'; -require_once 'PrepareTest.php'; -require_once 'MentionParsingTest.php'; -require_once 'StringTest.php'; -require_once 'ConfigParserTest.php'; - -/** - * All Test Cases - * @package Tests - * @subpackage UnitTests - */ -class MantisAllTests extends PHPUnit\Framework\TestSuite { - /** - * Defines test suite - * @return MantisAllTests - */ - public static function suite() { - $t_suite = new MantisAllTests( 'Main Code' ); - - $t_suite->addTestSuite( 'MantisEnumTest' ); - $t_suite->addTestSuite( 'MantisHelperTest' ); - $t_suite->addTestSuite( 'MantisPluginTest' ); - $t_suite->addTestSuite( 'MantisPrepareTest' ); - $t_suite->addTestSuite( 'MantisStringTest' ); - $t_suite->addTestSuite( 'MentionParsingTest' ); - $t_suite->addTestSuite( 'MantisConfigParserTest' ); - - return $t_suite; - } -} diff --git a/tests/rest/AllTests.php b/tests/rest/AllTests.php deleted file mode 100644 index 64f6e95e66..0000000000 --- a/tests/rest/AllTests.php +++ /dev/null @@ -1,64 +0,0 @@ -. - -/** - * Mantis Webservice Tests - * - * @package Tests - * @subpackage UnitTests - * @copyright Copyright MantisBT Team - mantisbt-dev@lists.sourceforge.net - * @link http://www.mantisbt.org - */ - -/** - * Test config - */ -require_once __DIR__ . '/RestImpersonateUserTest.php'; -require_once __DIR__ . '/RestIssueTest.php'; -require_once __DIR__ . '/RestProjectVersionTest.php'; -require_once __DIR__ . '/RestUserTest.php'; - -/** - * Soap Test Suite - * @package Tests - * @subpackage UnitTests - * @copyright Copyright 2002 MantisBT Team - mantisbt-dev@lists.sourceforge.net - * @link http://www.mantisbt.org - */ -class RestAllTests extends PHPUnit\Framework\TestSuite -{ - /** - * setUp - * @return void - */ - protected function setUp() { - } - - /** - * Initializes REST Test Suite - * @return RestAllTests - */ - public static function suite() { - $t_suite = new RestAllTests( 'REST API' ); - - $t_suite->addTestSuite( 'RestImpersonateUserTest' ); - $t_suite->addTestSuite( 'RestIssueTest' ); - $t_suite->addTestSuite( 'RestProjectVersionTest' ); - $t_suite->addTestSuite( 'RestUserTest' ); - - return $t_suite; - } -} diff --git a/tests/soap/AllTests.php b/tests/soap/AllTests.php deleted file mode 100644 index 71512eec6c..0000000000 --- a/tests/soap/AllTests.php +++ /dev/null @@ -1,85 +0,0 @@ -. - -/** - * Mantis Webservice Tests - * - * @package Tests - * @subpackage UnitTests - * @copyright Copyright 2002 MantisBT Team - mantisbt-dev@lists.sourceforge.net - * @link http://www.mantisbt.org - */ - -/** - * Test config - */ -require_once dirname( __FILE__ ) . '/../TestConfig.php'; - -require_once 'EnumTest.php'; -require_once 'IssueAddTest.php'; -require_once 'IssueMonitorTest.php'; -require_once 'IssueNoteTest.php'; -require_once 'IssueUpdateTest.php'; -require_once 'IssueHistoryTest.php'; -require_once 'FilterTest.php'; -require_once 'AttachmentTest.php'; -require_once 'LoginTest.php'; -require_once 'CategoryTest.php'; -require_once 'CompressionTest.php'; -require_once 'ProjectTest.php'; -require_once 'VersionTest.php'; -require_once 'RelationshipTest.php'; -require_once 'UserTest.php'; -require_once 'TagTest.php'; -require_once 'MentionTest.php'; - -/** - * Soap Test Suite - * @package Tests - * @subpackage UnitTests - * @copyright Copyright 2002 MantisBT Team - mantisbt-dev@lists.sourceforge.net - * @link http://www.mantisbt.org - */ -class SoapAllTests extends PHPUnit\Framework\TestSuite -{ - /** - * Initialises Soap Test Suite - * @return SoapAllTests - */ - public static function suite() { - $t_suite = new SoapAllTests( 'SOAP Interface' ); - - $t_suite->addTestSuite( 'EnumTest' ); - $t_suite->addTestSuite( 'IssueAddTest' ); - $t_suite->addTestSuite( 'IssueHistoryTest' ); - $t_suite->addTestSuite( 'IssueMonitorTest' ); - $t_suite->addTestSuite( 'IssueNoteTest' ); - $t_suite->addTestSuite( 'IssueUpdateTest' ); - $t_suite->addTestSuite( 'FilterTest' ); - $t_suite->addTestSuite( 'AttachmentTest' ); - $t_suite->addTestSuite( 'LoginTest' ); - $t_suite->addTestSuite( 'CategoryTest' ); - $t_suite->addTestSuite( 'CompressionTest' ); - $t_suite->addTestSuite( 'ProjectTest' ); - $t_suite->addTestSuite( 'VersionTest' ); - $t_suite->addTestSuite( 'RelationshipTest' ); - $t_suite->addTestSuite( 'UserTest' ); - $t_suite->addTestSuite( 'TagTest' ); - $t_suite->addTestSuite( 'MentionTest' ); - - return $t_suite; - } -} From ffa0e90b336d7539087231d36f62ffaf44e3fd25 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Thu, 10 Aug 2023 18:23:16 +0200 Subject: [PATCH 17/18] Make UserTest uniqueness provider more dynamic When building test email addresses, use the user and domain from the TEST_EMAIL constant, to ensure the test cases in providerEmailUnique remain relevant in case the reference email is modified. --- tests/Mantis/UserTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/Mantis/UserTest.php b/tests/Mantis/UserTest.php index 779e289b13..b067c6de54 100644 --- a/tests/Mantis/UserTest.php +++ b/tests/Mantis/UserTest.php @@ -35,6 +35,7 @@ */ class MantisUserApiTest extends MantisCoreBase { + /** @var string Use of reserved TLD '.test' per RFC2606 */ const TEST_EMAIL = 'test@uniqueness.test'; protected static $user_id; @@ -81,6 +82,9 @@ public function testEmailUnique( $p_email, $p_user_id, $p_unique ) { * @return array [email_address, user_id, unique] */ public function providerEmailUnique() { + [$t_user, $t_domain] = explode( '@', self::TEST_EMAIL ); + $t_user_sql_like_pattern = substr_replace( $t_user, '_', 1, 1 ); + return [ "Existing email, new user" => array( self::TEST_EMAIL, null, false ), @@ -91,9 +95,9 @@ public function providerEmailUnique() { "Existing email with different case" => array( ucfirst(self::TEST_EMAIL), null, false ), "Email matching SQL LIKE pattern" - => array( 't_st@uniqueness.test', null, true ), + => array( "$t_user_sql_like_pattern@$t_domain", null, true ), "Non-existing email" - => array( 'unique@uniqueness.test', null, true ), + => array( "unique@$t_domain", null, true ), ]; } From 9224acb65154b9513db73dbdf3c220292a70b058 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Mon, 14 Aug 2023 17:26:14 +0200 Subject: [PATCH 18/18] Use fake sendmail script for TravisCI builds This avoids 'sh: 1: /usr/sbin/sendmail: not found' error message displayed after PHPUnit suite execution, as sendmail is not installed on Travis. Note: This is not a "real" error and does not actually cause the build to fail, but it could lead someone reviewing the build's log to think that something went wrong, so it should be fixed to avoid confusion. The fakesendmail.sh script was copied from PHPMailer's test suite [1]. It will generate a .eml file in /tmp/fakemail directory, each time the test suite sends an email. Fixes #32828 [1]: https://github.com/PHPMailer/PHPMailer/blob/v6.8.0/test/fakesendmail.sh --- .travis.yml | 7 +++++++ tests/fakesendmail.sh | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100755 tests/fakesendmail.sh diff --git a/.travis.yml b/.travis.yml index 9340e6323b..99d1407cd9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,13 @@ install: before_script: # Ignore E_DEPRECATED notices when running PHP 8.1 builds - if php -r "exit( (int)! version_compare( '$TRAVIS_PHP_VERSION', '8.1', '>=' ) );"; then echo 'error_reporting = E_ALL & ~E_DEPRECATED' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/mantis_php81.ini; fi + + # sendmail replacement + - chmod +x "$TRAVIS_BUILD_DIR/tests/fakesendmail.sh" + - echo 'sendmail_path = $TRAVIS_BUILD_DIR/tests/fakesendmail.sh' > ./tests/sendmail.ini + - phpenv config-add ./tests/sendmail.ini + + # MantisBT setup - ./build/travis_before_script.sh script: diff --git a/tests/fakesendmail.sh b/tests/fakesendmail.sh new file mode 100755 index 0000000000..edf0479a7c --- /dev/null +++ b/tests/fakesendmail.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +#Fake sendmail script, adapted from: +#https://github.com/mrded/MNPP/blob/ee64fb2a88efc70ba523b78e9ce61f9f1ed3b4a9/init/fake-sendmail.sh + +#Create a temp folder to put messages in +numPath="${TMPDIR-/tmp/}fakemail" +umask 037 +mkdir -p ${numPath} + +if [ ! -f ${numPath}/num ]; then + echo "0" > ${numPath}/num +fi +num=`cat ${numPath}/num` +num=$((${num} + 1)) +echo ${num} > ${numPath}/num + +name="${numPath}/message_${num}.eml" +while read line +do + echo ${line} >> ${name} +done +exit 0