From 799ee7ed364fa535c7301a82db762154f0cfe9f7 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Fri, 9 Feb 2024 14:40:11 -0800 Subject: [PATCH 01/39] updates dependencies. --- composer.lock | 1237 ++++++++++++++++--------------------------------- 1 file changed, 404 insertions(+), 833 deletions(-) diff --git a/composer.lock b/composer.lock index 07c4efa..ef2d89e 100644 --- a/composer.lock +++ b/composer.lock @@ -7,114 +7,43 @@ "content-hash": "da3664a6287c104b6ec646b95beed4ea", "packages": [], "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^8.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "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/1.4.0" - }, - "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": "2020-11-10T18:47:58+00:00" - }, { "name": "fakerphp/faker", - "version": "v1.14.1", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1" + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1", - "reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/bfb4fe148adbf78eff521199619b93a52ae3554b", + "reference": "bfb4fe148adbf78eff521199619b93a52ae3554b", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", - "psr/container": "^1.0", - "symfony/deprecation-contracts": "^2.2" + "php": "^7.4 || ^8.0", + "psr/container": "^1.0 || ^2.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" }, "conflict": { "fzaninotto/faker": "*" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", + "doctrine/persistence": "^1.3 || ^2.0", "ext-intl": "*", - "symfony/phpunit-bridge": "^4.4 || ^5.2" + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" }, "suggest": { + "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", "ext-curl": "Required by Faker\\Provider\\Image to download images.", "ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.", "ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.", "ext-mbstring": "Required for multibyte Unicode string functionality." }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "v1.15-dev" - } - }, "autoload": { "psr-4": { "Faker\\": "src/Faker/" @@ -137,9 +66,9 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v.1.14.1" + "source": "https://github.com/FakerPHP/Faker/tree/v1.23.1" }, - "time": "2021-03-30T06:27:33+00:00" + "time": "2024-01-02T13:46:09+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -194,38 +123,38 @@ }, { "name": "mockery/mockery", - "version": "1.4.3", + "version": "1.6.7", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea" + "reference": "0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/d1339f64479af1bee0e82a0413813fe5345a54ea", - "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea", + "url": "https://api.github.com/repos/mockery/mockery/zipball/0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06", + "reference": "0cc058854b3195ba21dc6b1f7b1f60f4ef3a9c06", "shasum": "" }, "require": { "hamcrest/hamcrest-php": "^2.0.1", "lib-pcre": ">=7.0", - "php": "^7.3 || ^8.0" + "php": ">=7.3" }, "conflict": { "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.3" + "phpunit/phpunit": "^8.5 || ^9.6.10", + "symplify/easy-coding-standard": "^12.0.8" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, "autoload": { - "psr-0": { - "Mockery": "library/" + "files": [ + "library/helpers.php", + "library/Mockery.php" + ], + "psr-4": { + "Mockery\\": "library/Mockery" } }, "notification-url": "https://packagist.org/downloads/", @@ -236,12 +165,20 @@ { "name": "Pádraic Brady", "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "homepage": "https://github.com/padraic", + "role": "Author" }, { "name": "Dave Marshall", "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" + "homepage": "https://davedevelopment.co.uk", + "role": "Developer" + }, + { + "name": "Nathanael Esayeas", + "email": "nathanael.esayeas@protonmail.com", + "homepage": "https://github.com/ghostwriter", + "role": "Lead Developer" } ], "description": "Mockery is a simple yet flexible PHP mock object framework", @@ -259,44 +196,48 @@ "testing" ], "support": { + "docs": "https://docs.mockery.io/", "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.4.3" + "rss": "https://github.com/mockery/mockery/releases.atom", + "security": "https://github.com/mockery/mockery/security/advisories", + "source": "https://github.com/mockery/mockery" }, - "time": "2021-02-24T09:51:49+00:00" + "time": "2023-12-10T02:24:34+00:00" }, { "name": "myclabs/deep-copy", - "version": "1.10.2", + "version": "1.11.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "shasum": "" }, "require": { "php": "^7.1 || ^8.0" }, - "replace": { - "myclabs/deep-copy": "self.version" + "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": "^7.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": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - }, "files": [ "src/DeepCopy/deep_copy.php" - ] + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -312,7 +253,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, "funding": [ { @@ -320,29 +261,31 @@ "type": "tidelift" } ], - "time": "2020-11-13T09:40:50+00:00" + "time": "2023-03-08T13:26:56+00:00" }, { "name": "nikic/php-parser", - "version": "v4.10.5", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f" + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f", - "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4a21235f7e56e713259a6f76bf4b5ea08502b9dc", + "reference": "4a21235f7e56e713259a6f76bf4b5ea08502b9dc", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-json": "*", "ext-tokenizer": "*", - "php": ">=7.0" + "php": ">=7.4" }, "require-dev": { "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "bin": [ "bin/php-parse" @@ -350,7 +293,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.9-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -374,22 +317,22 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.0" }, - "time": "2021-05-03T19:11:20+00:00" + "time": "2024-01-07T17:17:35+00:00" }, { "name": "phar-io/manifest", - "version": "2.0.1", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/phar-io/manifest.git", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { @@ -434,22 +377,22 @@ "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": "2020-06-27T14:33:11+00:00" + "time": "2021-07-20T11:28:43+00:00" }, { "name": "phar-io/version", - "version": "3.1.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { @@ -485,275 +428,50 @@ "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/3.1.0" - }, - "time": "2021-02-23T14:00:09+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.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/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.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" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "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/master" - }, - "time": "2020-09-03T19:13:55+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.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": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" - }, - "time": "2020-09-17T18:55:26+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "1.13.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.1", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11.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/1.13.0" + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2021-03-17T13:42:18+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.6", + "version": "11.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f6293e1b30a2354e8428e004689671b83871edde" + "reference": "5e238e4b982cb272bf9faeee6f33af83d465d0e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", - "reference": "f6293e1b30a2354e8428e004689671b83871edde", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/5e238e4b982cb272bf9faeee6f33af83d465d0e2", + "reference": "5e238e4b982cb272bf9faeee6f33af83d465d0e2", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.10.2", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.3", - "phpunit/php-text-template": "^2.0.2", - "sebastian/code-unit-reverse-lookup": "^2.0.2", - "sebastian/complexity": "^2.0", - "sebastian/environment": "^5.1.2", - "sebastian/lines-of-code": "^1.0.3", - "sebastian/version": "^3.0.1", + "nikic/php-parser": "^5.0", + "php": ">=8.2", + "phpunit/php-file-iterator": "^5.0", + "phpunit/php-text-template": "^4.0", + "sebastian/code-unit-reverse-lookup": "^4.0", + "sebastian/complexity": "^4.0", + "sebastian/environment": "^7.0", + "sebastian/lines-of-code": "^3.0", + "sebastian/version": "^5.0", "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "suggest": { - "ext-pcov": "*", - "ext-xdebug": "*" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "11.0-dev" } }, "autoload": { @@ -781,7 +499,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/11.0.0" }, "funding": [ { @@ -789,32 +508,32 @@ "type": "github" } ], - "time": "2021-03-28T07:26:59+00:00" + "time": "2024-02-02T06:03:46+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.5", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + "reference": "99e95c94ad9500daca992354fa09d7b99abe2210" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/99e95c94ad9500daca992354fa09d7b99abe2210", + "reference": "99e95c94ad9500daca992354fa09d7b99abe2210", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -841,7 +560,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/5.0.0" }, "funding": [ { @@ -849,28 +569,28 @@ "type": "github" } ], - "time": "2020-09-28T05:57:25+00:00" + "time": "2024-02-02T06:05:04+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "5d8d9355a16d8cc5a1305b0a85342cfa420612be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5d8d9355a16d8cc5a1305b0a85342cfa420612be", + "reference": "5d8d9355a16d8cc5a1305b0a85342cfa420612be", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-pcntl": "*" @@ -878,7 +598,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -904,7 +624,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/5.0.0" }, "funding": [ { @@ -912,32 +633,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2024-02-02T06:05:50+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "d38f6cbff1cdb6f40b03c9811421561668cc133e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/d38f6cbff1cdb6f40b03c9811421561668cc133e", + "reference": "d38f6cbff1cdb6f40b03c9811421561668cc133e", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -963,7 +684,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/4.0.0" }, "funding": [ { @@ -971,32 +693,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2024-02-02T06:06:56+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "8a59d9e25720482ee7fcdf296595e08795b84dc5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/8a59d9e25720482ee7fcdf296595e08795b84dc5", + "reference": "8a59d9e25720482ee7fcdf296595e08795b84dc5", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -1022,7 +744,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/7.0.0" }, "funding": [ { @@ -1030,24 +753,23 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2024-02-02T06:08:01+00:00" }, { "name": "phpunit/phpunit", - "version": "9.5.5", + "version": "11.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "89ff45ea9d70e35522fb6654a2ebc221158de276" + "reference": "2f281e7e6776aea920cab5fc5a48d0fefbe1f39e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/89ff45ea9d70e35522fb6654a2ebc221158de276", - "reference": "89ff45ea9d70e35522fb6654a2ebc221158de276", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2f281e7e6776aea920cab5fc5a48d0fefbe1f39e", + "reference": "2f281e7e6776aea920cab5fc5a48d0fefbe1f39e", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.3.1", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -1055,34 +777,27 @@ "ext-xml": "*", "ext-xmlwriter": "*", "myclabs/deep-copy": "^1.10.1", - "phar-io/manifest": "^2.0.1", + "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", - "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.3", - "phpunit/php-file-iterator": "^3.0.5", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.3", - "phpunit/php-timer": "^5.0.2", - "sebastian/cli-parser": "^1.0.1", - "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", - "sebastian/diff": "^4.0.3", - "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", - "sebastian/global-state": "^5.0.1", - "sebastian/object-enumerator": "^4.0.3", - "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^2.3.2", - "sebastian/version": "^3.0.2" - }, - "require-dev": { - "ext-pdo": "*", - "phpspec/prophecy-phpunit": "^2.0.1" + "php": ">=8.2", + "phpunit/php-code-coverage": "^11.0", + "phpunit/php-file-iterator": "^5.0", + "phpunit/php-invoker": "^5.0", + "phpunit/php-text-template": "^4.0", + "phpunit/php-timer": "^7.0", + "sebastian/cli-parser": "^3.0", + "sebastian/code-unit": "^3.0", + "sebastian/comparator": "^6.0", + "sebastian/diff": "^6.0", + "sebastian/environment": "^7.0", + "sebastian/exporter": "^6.0", + "sebastian/global-state": "^7.0", + "sebastian/object-enumerator": "^6.0", + "sebastian/type": "^5.0", + "sebastian/version": "^5.0" }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -1090,15 +805,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.5-dev" + "dev-main": "11.0-dev" } }, "autoload": { - "classmap": [ - "src/" - ], "files": [ "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1121,38 +836,48 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.5" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.0.2" }, "funding": [ { - "url": "https://phpunit.de/donate.html", + "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" } ], - "time": "2021-06-05T04:49:07+00:00" + "time": "2024-02-04T09:09:14+00:00" }, { "name": "psr/container", - "version": "1.1.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { - "php": ">=7.2.0" + "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -1179,34 +904,34 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-03-05T17:36:06+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + "reference": "efd6ce5bb8131fe981e2f879dbd47605fbe0cc6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", - "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/efd6ce5bb8131fe981e2f879dbd47605fbe0cc6f", + "reference": "efd6ce5bb8131fe981e2f879dbd47605fbe0cc6f", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1229,7 +954,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/3.0.0" }, "funding": [ { @@ -1237,32 +963,32 @@ "type": "github" } ], - "time": "2020-09-28T06:08:49+00:00" + "time": "2024-02-02T05:48:04+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "6634549cb8d702282a04a774e36a7477d2bd9015" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/6634549cb8d702282a04a774e36a7477d2bd9015", + "reference": "6634549cb8d702282a04a774e36a7477d2bd9015", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1285,7 +1011,8 @@ "homepage": "https://github.com/sebastianbergmann/code-unit", "support": { "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + "security": "https://github.com/sebastianbergmann/code-unit/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.0" }, "funding": [ { @@ -1293,32 +1020,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2024-02-02T05:50:41+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "df80c875d3e459b45c6039e4d9b71d4fbccae25d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/df80c875d3e459b45c6039e4d9b71d4fbccae25d", + "reference": "df80c875d3e459b45c6039e4d9b71d4fbccae25d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1340,7 +1067,8 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + "security": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/security/policy", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/4.0.0" }, "funding": [ { @@ -1348,34 +1076,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2024-02-02T05:52:17+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.6", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "bd0f2fa5b9257c69903537b266ccb80fcf940db8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/bd0f2fa5b9257c69903537b266ccb80fcf940db8", + "reference": "bd0f2fa5b9257c69903537b266ccb80fcf940db8", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/diff": "^6.0", + "sebastian/exporter": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1414,7 +1144,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/6.0.0" }, "funding": [ { @@ -1422,33 +1153,33 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2024-02-02T05:53:45+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.2", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + "reference": "88a434ad86150e11a606ac4866b09130712671f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", - "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/88a434ad86150e11a606ac4866b09130712671f0", + "reference": "88a434ad86150e11a606ac4866b09130712671f0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.7", - "php": ">=7.3" + "nikic/php-parser": "^5.0", + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1471,7 +1202,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/4.0.0" }, "funding": [ { @@ -1479,33 +1211,33 @@ "type": "github" } ], - "time": "2020-10-26T15:52:27+00:00" + "time": "2024-02-02T05:55:19+00:00" }, { "name": "sebastian/diff", - "version": "4.0.4", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + "reference": "3e3f502419518897a923aa1c64d51f9def2e0aff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", - "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3e3f502419518897a923aa1c64d51f9def2e0aff", + "reference": "3e3f502419518897a923aa1c64d51f9def2e0aff", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^11.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1537,7 +1269,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/6.0.0" }, "funding": [ { @@ -1545,27 +1278,27 @@ "type": "github" } ], - "time": "2020-10-26T13:10:38+00:00" + "time": "2024-02-02T05:56:35+00:00" }, { "name": "sebastian/environment", - "version": "5.1.3", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac" + "reference": "100d8b855d7180f79f9a9a5c483f2d960581c3ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/388b6ced16caa751030f6a69e588299fa09200ac", - "reference": "388b6ced16caa751030f6a69e588299fa09200ac", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/100d8b855d7180f79f9a9a5c483f2d960581c3ea", + "reference": "100d8b855d7180f79f9a9a5c483f2d960581c3ea", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "suggest": { "ext-posix": "*" @@ -1573,7 +1306,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -1592,7 +1325,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -1600,7 +1333,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.3" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/7.0.0" }, "funding": [ { @@ -1608,34 +1342,34 @@ "type": "github" } ], - "time": "2020-09-28T05:52:38+00:00" + "time": "2024-02-02T05:57:54+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + "reference": "d0c0a93fc746b0c066037f1e7d09104129e868ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d0c0a93fc746b0c066037f1e7d09104129e868ff", + "reference": "d0c0a93fc746b0c066037f1e7d09104129e868ff", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.2", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1670,14 +1404,15 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/6.0.0" }, "funding": [ { @@ -1685,38 +1420,35 @@ "type": "github" } ], - "time": "2020-09-28T05:24:23+00:00" + "time": "2024-02-02T05:58:52+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.3", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49" + "reference": "590e7cbc6565fa2e26c3df4e629a34bb0bc00c17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23bd5951f7ff26f12d4e3242864df3e08dec4e49", - "reference": "23bd5951f7ff26f12d4e3242864df3e08dec4e49", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/590e7cbc6565fa2e26c3df4e629a34bb0bc00c17", + "reference": "590e7cbc6565fa2e26c3df4e629a34bb0bc00c17", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -1735,13 +1467,14 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.3" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/7.0.0" }, "funding": [ { @@ -1749,33 +1482,33 @@ "type": "github" } ], - "time": "2021-06-11T13:31:12+00:00" + "time": "2024-02-02T05:59:33+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + "reference": "376c5b3f6b43c78fdc049740bca76a7c846706c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", - "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/376c5b3f6b43c78fdc049740bca76a7c846706c0", + "reference": "376c5b3f6b43c78fdc049740bca76a7c846706c0", "shasum": "" }, "require": { - "nikic/php-parser": "^4.6", - "php": ">=7.3" + "nikic/php-parser": "^5.0", + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -1798,7 +1531,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/3.0.0" }, "funding": [ { @@ -1806,34 +1540,34 @@ "type": "github" } ], - "time": "2020-11-28T06:42:11+00:00" + "time": "2024-02-02T06:00:36+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "f75f6c460da0bbd9668f43a3dde0ec0ba7faa678" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f75f6c460da0bbd9668f43a3dde0ec0ba7faa678", + "reference": "f75f6c460da0bbd9668f43a3dde0ec0ba7faa678", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.2", + "sebastian/object-reflector": "^4.0", + "sebastian/recursion-context": "^6.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1855,7 +1589,8 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/6.0.0" }, "funding": [ { @@ -1863,32 +1598,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2024-02-02T06:01:29+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "bb2a6255d30853425fd38f032eb64ced9f7f132d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/bb2a6255d30853425fd38f032eb64ced9f7f132d", + "reference": "bb2a6255d30853425fd38f032eb64ced9f7f132d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -1910,7 +1645,8 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/4.0.0" }, "funding": [ { @@ -1918,32 +1654,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2024-02-02T06:02:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.4", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + "reference": "b75224967b5a466925c6d54e68edd0edf8dd4ed4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", - "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b75224967b5a466925c6d54e68edd0edf8dd4ed4", + "reference": "b75224967b5a466925c6d54e68edd0edf8dd4ed4", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -1970,10 +1706,11 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/6.0.0" }, "funding": [ { @@ -1981,87 +1718,32 @@ "type": "github" } ], - "time": "2020-10-26T13:17:30+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "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/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T06:45:17+00:00" + "time": "2024-02-02T06:08:48+00:00" }, { "name": "sebastian/type", - "version": "2.3.2", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "0d1c587401514d17e8f9258a27e23527cb1b06c1" + "reference": "b8502785eb3523ca0dd4afe9ca62235590020f3f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0d1c587401514d17e8f9258a27e23527cb1b06c1", - "reference": "0d1c587401514d17e8f9258a27e23527cb1b06c1", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b8502785eb3523ca0dd4afe9ca62235590020f3f", + "reference": "b8502785eb3523ca0dd4afe9ca62235590020f3f", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^11.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2084,7 +1766,8 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/2.3.2" + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/5.0.0" }, "funding": [ { @@ -2092,29 +1775,29 @@ "type": "github" } ], - "time": "2021-06-04T13:02:07+00:00" + "time": "2024-02-02T06:09:34+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "13999475d2cb1ab33cb73403ba356a814fdbb001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/13999475d2cb1ab33cb73403ba356a814fdbb001", + "reference": "13999475d2cb1ab33cb73403ba356a814fdbb001", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2137,7 +1820,8 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/5.0.0" }, "funding": [ { @@ -2145,20 +1829,20 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2024-02-02T06:10:47+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.6.0", + "version": "3.8.1", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "14f5fff1e64118595db5408e946f3a22c75807f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", - "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/14f5fff1e64118595db5408e946f3a22c75807f7", + "reference": "14f5fff1e64118595db5408e946f3a22c75807f7", "shasum": "" }, "require": { @@ -2168,11 +1852,11 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" }, "bin": [ - "bin/phpcs", - "bin/phpcbf" + "bin/phpcbf", + "bin/phpcs" ], "type": "library", "extra": { @@ -2187,125 +1871,76 @@ "authors": [ { "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2021-04-09T00:54:41+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.4-dev" + "role": "Former lead" }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Juliette Reinders Folmer", + "role": "Current lead" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" } ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" }, "funding": [ { - "url": "https://symfony.com/sponsor", - "type": "custom" + "url": "https://github.com/PHPCSStandards", + "type": "github" }, { - "url": "https://github.com/fabpot", + "url": "https://github.com/jrfnl", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" } ], - "time": "2021-03-23T23:28:01+00:00" + "time": "2024-01-11T20:47:48+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.23.0", + "name": "symfony/deprecation-contracts", + "version": "v3.4.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", "shasum": "" }, "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-ctype": "For best performance" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "3.4-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\\Ctype\\": "" - }, "files": [ - "bootstrap.php" + "function.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -2314,24 +1949,18 @@ ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for ctype functions", + "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0" }, "funding": [ { @@ -2347,20 +1976,20 @@ "type": "tidelift" } ], - "time": "2021-02-19T12:13:01+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "theseer/tokenizer", - "version": "1.2.0", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "75a63c33a8577608444246075ea0af0d052e452a" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", - "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -2389,7 +2018,7 @@ "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" + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" }, "funding": [ { @@ -2397,65 +2026,7 @@ "type": "github" } ], - "time": "2020-07-12T23:59:07+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "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.10.0" - }, - "time": "2021-03-09T10:59:23+00:00" + "time": "2023-11-20T00:12:19+00:00" } ], "aliases": [], @@ -2472,5 +2043,5 @@ "php": ">=8.0" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.6.0" } From 335aa1dba6cdac7821109d9ecdca6233acc49943 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Fri, 9 Feb 2024 16:49:29 -0800 Subject: [PATCH 02/39] tranform phpunit config file to v11 compliant format. --- phpunit.xml.dist | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 3f9c46a..15c3bed 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,19 +1,18 @@ - - - - - tests - - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + backupGlobals="false" + colors="true" + processIsolation="false" + stopOnFailure="false" + xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd" + cacheDirectory=".phpunit.cache" + backupStaticProperties="false" +> + + + tests + + From 04b6ccf43af5737f2583a3730552d95082cbaf7b Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Fri, 9 Feb 2024 16:50:05 -0800 Subject: [PATCH 03/39] adjust name of phpunit cache file in git ignore list. --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 22717d3..cc1a941 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ *.patch /bin/* /vendor/ -.phpunit.result.cache +.phpunit.cache From e5a48af80e1d34d8bb3c786db553ce2b7e2e0f08 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Fri, 9 Feb 2024 16:57:50 -0800 Subject: [PATCH 04/39] update minimum PHP version requirement to 8.1 PHPUnit 11 requires PHP 8.1 or higher. --- composer.json | 2 +- composer.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 5ea1adb..94a8f72 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=8.0" + "php": ">=8.1" }, "require-dev": { "mockery/mockery": "@stable", diff --git a/composer.lock b/composer.lock index ef2d89e..dec0e18 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": "da3664a6287c104b6ec646b95beed4ea", + "content-hash": "e91750a12181241cca0c36923768597e", "packages": [], "packages-dev": [ { @@ -2040,7 +2040,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=8.0" + "php": ">=8.1" }, "platform-dev": [], "plugin-api-version": "2.6.0" From 845d813076384ef4bdabaa619b05b56ab48973fa Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Fri, 9 Feb 2024 17:00:26 -0800 Subject: [PATCH 05/39] bump PHP version to 8.1 on GH actions. staying in lock-step with required min version specified in package file. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 518815b..7933b84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - php-version: [8.0] + php-version: [8.1] steps: - uses: actions/checkout@v2 @@ -38,7 +38,7 @@ jobs: strategy: matrix: - php-version: [8.0] + php-version: [8.1] steps: - uses: actions/checkout@v2 From 88cf6db2a165a8c0af4410be4adf231003e3f330 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Fri, 9 Feb 2024 17:21:09 -0800 Subject: [PATCH 06/39] adds phpcs config file and configures its cache file to be git-ignored. --- .gitignore | 1 + phpcs.xml.dist | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 phpcs.xml.dist diff --git a/.gitignore b/.gitignore index cc1a941..5aa5031 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /bin/* /vendor/ .phpunit.cache +.phpcs-cache diff --git a/phpcs.xml.dist b/phpcs.xml.dist new file mode 100644 index 0000000..e73b4da --- /dev/null +++ b/phpcs.xml.dist @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + bin/ + src/ + tests/ + From 05e8110a408061e7390549e905f0c1bfda523fe5 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Fri, 9 Feb 2024 17:25:51 -0800 Subject: [PATCH 07/39] ditch command line flags from phpcs invocations in the CI. we're specifying everything we need in the new phpcs config file now. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7933b84..fab0e5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,9 +27,9 @@ jobs: - name: install dependencies run: composer install --no-interaction --prefer-dist - name: lint src - run: bin/phpcs --standard=PSR2 src + run: bin/phpcs src - name: lint tests - run: bin/phpcs --standard=PSR2 tests + run: bin/phpcs tests tests: name: PHPUnit Tests From d611111d18b83b66a01341238b8a24805346a56f Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Fri, 9 Feb 2024 17:26:54 -0800 Subject: [PATCH 08/39] updates test coverage. - declare PHP strict mode - resolves all PHPUnit-related deprecations - resolves all Faker-related deprecations --- .../MeSH/Model/AllowableQualifierTest.php | 33 +-- tests/Ilios/MeSH/Model/BaseTest.php | 229 ----------------- tests/Ilios/MeSH/Model/BaseTestCase.php | 232 ++++++++++++++++++ .../Ilios/MeSH/Model/ConceptRelationTest.php | 39 +-- tests/Ilios/MeSH/Model/ConceptTest.php | 90 +++---- tests/Ilios/MeSH/Model/DescriptorSetTest.php | 43 +--- tests/Ilios/MeSH/Model/DescriptorTest.php | 135 +++------- .../Ilios/MeSH/Model/EntryCombinationTest.php | 43 +--- tests/Ilios/MeSH/Model/ReferenceTest.php | 33 +-- tests/Ilios/MeSH/Model/TermTest.php | 99 +++----- tests/Ilios/MeSH/ParserTest.php | 51 ++-- 11 files changed, 408 insertions(+), 619 deletions(-) delete mode 100644 tests/Ilios/MeSH/Model/BaseTest.php create mode 100644 tests/Ilios/MeSH/Model/BaseTestCase.php diff --git a/tests/Ilios/MeSH/Model/AllowableQualifierTest.php b/tests/Ilios/MeSH/Model/AllowableQualifierTest.php index 461674e..ce118c8 100644 --- a/tests/Ilios/MeSH/Model/AllowableQualifierTest.php +++ b/tests/Ilios/MeSH/Model/AllowableQualifierTest.php @@ -1,50 +1,39 @@ object = new AllowableQualifier(); } - /** - * @inheritdoc - */ public function tearDown(): void { parent::tearDown(); unset($this->object); } - /** - * @covers \Ilios\MeSH\Model\AllowableQualifier::getQualifierReference - * @covers \Ilios\MeSH\Model\AllowableQualifier::setQualifierReference - */ - public function testGetSetQualifierReference() + public function testGetSetQualifierReference(): void { $this->modelSetTest($this->object, 'qualifierReference', 'Reference'); } - /** - * @covers \Ilios\MeSH\Model\AllowableQualifier::getAbbreviation - * @covers \Ilios\MeSH\Model\AllowableQualifier::setAbbreviation - */ - public function testGetSetAbbreviation() + public function testGetSetAbbreviation(): void { $this->basicSetTest($this->object, 'abbreviation', 'string'); } diff --git a/tests/Ilios/MeSH/Model/BaseTest.php b/tests/Ilios/MeSH/Model/BaseTest.php deleted file mode 100644 index f8e612f..0000000 --- a/tests/Ilios/MeSH/Model/BaseTest.php +++ /dev/null @@ -1,229 +0,0 @@ -randomNumber(); - case 'float': - return $faker->randomFloat(); - case 'string': - return $faker->text; - case 'email': - return $faker->email; - case 'phone': - return $faker->phoneNumber; - case 'datetime': - return $faker->dateTime; - case 'bool': - case 'boolean': - return $faker->boolean(); - default: - throw new \Exception("No values for type {$type}"); - } - } - - /** - * A generic test for setters methods. - * - * @param object $model - * @param string $property - * @param string $type - */ - protected function basicSetTest($model, $property, $type) - { - $setMethod = $this->getSetMethodForProperty($property); - $getMethod = $this->getGetMethodForProperty($property); - $this->assertTrue(method_exists($model, $setMethod), "Method {$setMethod} missing"); - $this->assertTrue(method_exists($model, $getMethod), "Method {$getMethod} missing"); - $expected = $this->getValueForType($type); - $model->$setMethod($expected); - $this->assertSame($expected, $model->$getMethod()); - } - - /** - * A generic test method for getters/setters of model-type properties. - * - * @param object $model - * @param string $property - * @param string $modelName - */ - protected function modelSetTest($model, $property, $modelName) - { - $setMethod = $this->getSetMethodForProperty($property); - $getMethod = $this->getGetMethodForProperty($property); - $this->assertTrue(method_exists($model, $setMethod), "Method {$setMethod} missing"); - $this->assertTrue(method_exists($model, $getMethod), "Method {$getMethod} missing"); - $expected = m::mock('Ilios\\MeSH\\Model\\' .$modelName); - $model->$setMethod($expected); - $this->assertSame($expected, $model->$getMethod()); - } - - /** - * A generic test for boolean setter methods. - * - * @param object $model - * @param string $property - * @param boolean $is should we use is vs has when generating the method. - */ - protected function booleanSetTest($model, $property, $is = true) - { - $setMethod = $this->getSetMethodForProperty($property); - $isMethod = $is?$this->getIsMethodForProperty($property):$this->getHasMethodForProperty($property); - $this->assertTrue(method_exists($model, $setMethod), "Method {$setMethod} missing"); - $this->assertTrue(method_exists($model, $isMethod), "Method {$isMethod} missing"); - $expected = $this->getValueForType('boolean'); - $model->$setMethod($expected); - $this->assertSame($expected, $model->$isMethod()); - } - - /** - * A generic test for model setters which hold lists of other models. - * - * @param object $model - * @param string $property - * @param string $modelName - * @param string|bool $getter name of the method to use instead of a generated method, or FALSE if n/a. - * @param string|bool $setter name of the method to use instead of a generated method, or FALSE if n/a. - */ - protected function addModelToListTest($model, $property, $modelName, $getter = false, $setter = false) - { - $n = 10; - $arr = $this->getArrayOfMockObjects('Ilios\\MeSH\\Model\\' . $modelName, $n); - $addMethod = $setter?$setter:$this->getAddMethodForProperty($property); - $getMethod = $getter?$getter:$this->getGetMethodForListProperty($property); - $this->assertTrue(method_exists($model, $addMethod), "Method {$addMethod} missing"); - $this->assertTrue(method_exists($model, $getMethod), "Method {$getMethod} missing"); - foreach ($arr as $obj) { - $model->$addMethod($obj); - } - $results = $model->$getMethod(); - $this->assertTrue(is_array($results), "{$getMethod} did not return an array."); - $this->assertEquals(count($results), $n); - for ($i = 0; $i < $n; $i++) { - $this->assertEquals($results[$i], $arr[$i]); - } - } - - /** - * A generic test for model setters which hold lists of text. - * - * @param object $model - * @param string $property - * @param string|bool $getter name of the method to use instead of a generated method, or FALSE if n/a. - * @param string|bool $setter name of the method to use instead of a generated method, or FALSE if n/a. - */ - public function addTextToListTest($model, $property, $getter = false, $setter = false) - { - $n = 10; - $arr = []; - for ($i = 0; $i < $n; $i++) { - $arr[] = $this->getValueForType('string'); - } - $addMethod = $setter?$setter:$this->getAddMethodForProperty($property); - $getMethod = $getter?$getter:$this->getGetMethodForListProperty($property); - $this->assertTrue(method_exists($model, $addMethod), "Method {$addMethod} missing"); - $this->assertTrue(method_exists($model, $getMethod), "Method {$getMethod} missing"); - foreach ($arr as $obj) { - $model->$addMethod($obj); - } - $results = $model->$getMethod(); - $this->assertTrue(is_array($results), "{$getMethod} did not return an array."); - $this->assertEquals(count($results), $n); - for ($i = 0; $i < $n; $i++) { - $this->assertEquals($results[$i], $arr[$i]); - } - } -} diff --git a/tests/Ilios/MeSH/Model/BaseTestCase.php b/tests/Ilios/MeSH/Model/BaseTestCase.php new file mode 100644 index 0000000..b357822 --- /dev/null +++ b/tests/Ilios/MeSH/Model/BaseTestCase.php @@ -0,0 +1,232 @@ + $faker->randomNumber(), + 'float' => $faker->randomFloat(), + 'string' => $faker->text(), + 'email' => $faker->email(), + 'phone' => $faker->phoneNumber(), + 'datetime' => $faker->dateTime(), + 'bool', 'boolean' => $faker->boolean(), + default => throw new Exception("No values for type $type"), + }; + } + + /** + * A generic test for setters methods. + * + * @param object $model + * @param string $property + * @param string $type + * @throws Exception + */ + protected function basicSetTest(object $model, string $property, string $type): void + { + $setMethod = $this->getSetMethodForProperty($property); + $getMethod = $this->getGetMethodForProperty($property); + $this->assertTrue(method_exists($model, $setMethod), "Method $setMethod missing"); + $this->assertTrue(method_exists($model, $getMethod), "Method $getMethod missing"); + $expected = $this->getValueForType($type); + $model->$setMethod($expected); + $this->assertSame($expected, $model->$getMethod()); + } + + /** + * A generic test method for getters/setters of model-type properties. + * + * @param object $model + * @param string $property + * @param string $modelName + */ + protected function modelSetTest(object $model, string $property, string $modelName): void + { + $setMethod = $this->getSetMethodForProperty($property); + $getMethod = $this->getGetMethodForProperty($property); + $this->assertTrue(method_exists($model, $setMethod), "Method $setMethod missing"); + $this->assertTrue(method_exists($model, $getMethod), "Method $getMethod missing"); + $expected = m::mock('Ilios\\MeSH\\Model\\' . $modelName); + $model->$setMethod($expected); + $this->assertSame($expected, $model->$getMethod()); + } + + /** + * A generic test for boolean setter methods. + * + * @param object $model + * @param string $property + * @param boolean $is should we use "is" vs "has" when generating the method? + * @throws Exception + */ + protected function booleanSetTest(object $model, string $property, bool $is = true): void + { + $setMethod = $this->getSetMethodForProperty($property); + $isMethod = $is ? $this->getIsMethodForProperty($property) : $this->getHasMethodForProperty($property); + $this->assertTrue(method_exists($model, $setMethod), "Method $setMethod missing"); + $this->assertTrue(method_exists($model, $isMethod), "Method $isMethod missing"); + $expected = $this->getValueForType('boolean'); + $model->$setMethod($expected); + $this->assertSame($expected, $model->$isMethod()); + } + + /** + * A generic test for model setters which hold lists of other models. + * + * @param object $model + * @param string $property + * @param string $modelName + * @param string|bool $getter name of the method to use instead of a generated method, or FALSE if n/a. + * @param string|bool $setter name of the method to use instead of a generated method, or FALSE if n/a. + */ + protected function addModelToListTest( + object $model, + string $property, + string $modelName, + string|bool $getter = false, + string|bool $setter = false + ): void { + $n = 10; + $arr = $this->getArrayOfMockObjects('Ilios\\MeSH\\Model\\' . $modelName, $n); + $addMethod = $setter ?: $this->getAddMethodForProperty($property); + $getMethod = $getter ?: $this->getGetMethodForListProperty($property); + $this->assertTrue(method_exists($model, $addMethod), "Method $addMethod missing"); + $this->assertTrue(method_exists($model, $getMethod), "Method $getMethod missing"); + foreach ($arr as $obj) { + $model->$addMethod($obj); + } + $results = $model->$getMethod(); + $this->assertTrue(is_array($results), "$getMethod did not return an array."); + $this->assertEquals(count($results), $n); + for ($i = 0; $i < $n; $i++) { + $this->assertEquals($results[$i], $arr[$i]); + } + } + + /** + * A generic test for model setters which hold lists of text. + * + * @param object $model + * @param string $property + * @param string|bool $getter name of the method to use instead of a generated method, or FALSE if n/a. + * @param string|bool $setter name of the method to use instead of a generated method, or FALSE if n/a. + * @throws Exception + */ + public function addTextToListTest( + object $model, + string $property, + string|bool $getter = false, + string|bool $setter = false + ): void { + $n = 10; + $arr = []; + for ($i = 0; $i < $n; $i++) { + $arr[] = $this->getValueForType('string'); + } + $addMethod = $setter ?: $this->getAddMethodForProperty($property); + $getMethod = $getter ?: $this->getGetMethodForListProperty($property); + $this->assertTrue(method_exists($model, $addMethod), "Method $addMethod missing"); + $this->assertTrue(method_exists($model, $getMethod), "Method $getMethod missing"); + foreach ($arr as $obj) { + $model->$addMethod($obj); + } + $results = $model->$getMethod(); + $this->assertTrue(is_array($results), "$getMethod did not return an array."); + $this->assertEquals(count($results), $n); + for ($i = 0; $i < $n; $i++) { + $this->assertEquals($results[$i], $arr[$i]); + } + } +} diff --git a/tests/Ilios/MeSH/Model/ConceptRelationTest.php b/tests/Ilios/MeSH/Model/ConceptRelationTest.php index b3d27f0..3d5179b 100644 --- a/tests/Ilios/MeSH/Model/ConceptRelationTest.php +++ b/tests/Ilios/MeSH/Model/ConceptRelationTest.php @@ -1,59 +1,44 @@ object = new ConceptRelation(); } - /** - * @inheritdoc - */ public function tearDown(): void { parent::tearDown(); unset($this->object); } - /** - * @covers \Ilios\MeSH\Model\ConceptRelation::getName - * @covers \Ilios\MeSH\Model\ConceptRelation::setName - */ - public function testGetSetName() + public function testGetSetName(): void { $this->basicSetTest($this->object, 'name', 'string'); } - /** - * @covers \Ilios\MeSH\Model\ConceptRelation::getConcept1Ui - * @covers \Ilios\MeSH\Model\ConceptRelation::setConcept1Ui - */ - public function testGetSetConcept1Ui() + public function testGetSetConcept1Ui(): void { $this->basicSetTest($this->object, 'concept1Ui', 'string'); } - /** - * @covers \Ilios\MeSH\Model\ConceptRelation::getConcept2Ui - * @covers \Ilios\MeSH\Model\ConceptRelation::setConcept2Ui - */ - public function testGetSetConcept2Ui() + public function testGetSetConcept2Ui(): void { $this->basicSetTest($this->object, 'concept2Ui', 'string'); } diff --git a/tests/Ilios/MeSH/Model/ConceptTest.php b/tests/Ilios/MeSH/Model/ConceptTest.php index 991d757..e5b046c 100644 --- a/tests/Ilios/MeSH/Model/ConceptTest.php +++ b/tests/Ilios/MeSH/Model/ConceptTest.php @@ -1,123 +1,91 @@ object = new Concept(); } - /** - * @inheritdoc - */ public function tearDown(): void { parent::tearDown(); unset($this->object); } - /** - * @covers \Ilios\MeSH\Model\Concept::__construct - */ - public function testConstructor() + public function testConstructor(): void { $this->assertEmpty($this->object->getRelatedRegistryNumbers()); $this->assertEmpty($this->object->getTerms()); } - /** - * @covers \Ilios\MeSH\Model\Concept::isPreferred - * @covers \Ilios\MeSH\Model\Concept::setPreferred - */ - public function testIsSetPreferred() + public function testIsSetPreferred(): void { $this->booleanSetTest($this->object, 'preferred', true); } - /** - * @covers \Ilios\MeSH\Model\Concept::getCasn1Name - * @covers \Ilios\MeSH\Model\Concept::setCasn1Name - */ - public function testGetSetCasn1Name() + public function testGetSetCasn1Name(): void { $this->basicSetTest($this->object, 'casn1Name', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Concept::getRegistryNumber - * @covers \Ilios\MeSH\Model\Concept::setRegistryNumber - */ - public function testGetSetRegistryNumber() + public function testGetSetRegistryNumber(): void { $this->basicSetTest($this->object, 'registryNumber', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Concept::getScopeNote - * @covers \Ilios\MeSH\Model\Concept::setScopeNote - */ - public function testGetSetScopeNote() + public function testGetSetScopeNote(): void { $this->basicSetTest($this->object, 'scopeNote', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Concept::getTranslatorsEnglishScopeNote - * @covers \Ilios\MeSH\Model\Concept::setTranslatorsEnglishScopeNote - */ - public function testGetSetTranslatorsEnglishScopeNote() + public function testGetSetTranslatorsEnglishScopeNote(): void { $this->basicSetTest($this->object, 'translatorsEnglishScopeNote', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Concept::getTranslatorsScopeNote - * @covers \Ilios\MeSH\Model\Concept::setTranslatorsScopeNote - */ - public function testGetSetTranslatorsScopeNote() + public function testGetSetTranslatorsScopeNote(): void { $this->basicSetTest($this->object, 'translatorsScopeNote', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Concept::addRelatedRegistryNumber - * @covers \Ilios\MeSH\Model\Concept::getRelatedRegistryNumbers - */ - public function testAddGetRelatedRegistryNumbers() + public function testAddGetRelatedRegistryNumbers(): void { $this->addTextToListTest($this->object, 'relatedRegistryNumber'); } - /** - * @covers \Ilios\MeSH\Model\Concept::addConceptRelation - * @covers \Ilios\MeSH\Model\Concept::getConceptRelations - */ - public function testAddGetConceptRelations() + public function testAddGetConceptRelations(): void { $this->addModelToListTest($this->object, 'conceptRelation', 'ConceptRelation'); } - /** - * @covers \Ilios\MeSH\Model\Concept::addTerm - * @covers \Ilios\MeSH\Model\Concept::getTerms - */ - public function testAddGetTerms() + public function testAddGetTerms(): void { $this->addModelToListTest($this->object, 'term', 'Term'); } + + public function testGetSetUi(): void + { + $this->basicSetTest($this->object, 'ui', 'string'); + } + + public function testGetSetName(): void + { + $this->basicSetTest($this->object, 'name', 'string'); + } } diff --git a/tests/Ilios/MeSH/Model/DescriptorSetTest.php b/tests/Ilios/MeSH/Model/DescriptorSetTest.php index a9cb891..ffcb372 100644 --- a/tests/Ilios/MeSH/Model/DescriptorSetTest.php +++ b/tests/Ilios/MeSH/Model/DescriptorSetTest.php @@ -1,50 +1,39 @@ object = new DescriptorSet(); } - /** - * @covers \Ilios\MeSH\Model\DescriptorSet::__construct - */ - public function testConstructor() + public function testConstructor(): void { $this->assertEmpty($this->object->getDescriptors()); $this->assertEmpty($this->object->getDescriptorUis()); } - /** - * @covers \Ilios\MeSH\Model\DescriptorSet::setLanguageCode - * @covers \Ilios\MeSH\Model\DescriptorSet::getLanguageCode - */ - public function testGetSetLanguageCode() + public function testGetSetLanguageCode(): void { $this->basicSetTest($this->object, 'languageCode', 'string'); } - /** - * @covers \Ilios\MeSH\Model\DescriptorSet::addDescriptor - * @covers \Ilios\MeSH\Model\DescriptorSet::getDescriptors - */ - public function testAddGetDescriptors() + public function testAddGetDescriptors(): void { $descriptor = new Descriptor(); $descriptor->setUi('D0000001'); @@ -65,10 +54,7 @@ public function testAddGetDescriptors() $this->assertEquals($this->object->getDescriptors()[1], $descriptor3); } - /** - * @covers \Ilios\MeSH\Model\DescriptorSet::getDescriptorUis - */ - public function testGetSetDescriptorUis() + public function testGetSetDescriptorUis(): void { $uis = ['D000001', 'D000002']; foreach ($uis as $ui) { @@ -84,10 +70,7 @@ public function testGetSetDescriptorUis() $this->assertEmpty(array_diff($results, $uis)); } - /** - * @covers \Ilios\MeSH\Model\DescriptorSet::getDescriptorByUi - */ - public function testFindDescriptorByUi() + public function testFindDescriptorByUi(): void { $ui = 'D000001'; $descriptor = new Descriptor(); diff --git a/tests/Ilios/MeSH/Model/DescriptorTest.php b/tests/Ilios/MeSH/Model/DescriptorTest.php index 4346d12..25b3963 100644 --- a/tests/Ilios/MeSH/Model/DescriptorTest.php +++ b/tests/Ilios/MeSH/Model/DescriptorTest.php @@ -1,187 +1,126 @@ object = new Descriptor(); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::__construct - */ - public function testConstructor() + public function testConstructor(): void { $this->assertEmpty($this->object->getConcepts()); $this->assertEmpty($this->object->getEntryCombinations()); $this->assertEmpty($this->object->getAllowableQualifiers()); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::setClass - * @covers \Ilios\MeSH\Model\Descriptor::getClass - */ - public function testGetSetClass() + public function testGetSetClass(): void { $this->basicSetTest($this->object, 'class', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::setDateCreated - * @covers \Ilios\MeSH\Model\Descriptor::getDateCreated - */ - public function testGetSetDateCreated() + public function testGetSetDateCreated(): void { $this->basicSetTest($this->object, 'dateCreated', 'datetime'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::setDateRevised - * @covers \Ilios\MeSH\Model\Descriptor::getDateRevised - */ - public function testGetSetDateRevised() + public function testGetSetDateRevised(): void { $this->basicSetTest($this->object, 'dateRevised', 'datetime'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::setDateEstablished - * @covers \Ilios\MeSH\Model\Descriptor::getDateEstablished - */ - public function testGetSetDateEstablished() + public function testGetSetDateEstablished(): void { $this->basicSetTest($this->object, 'dateEstablished', 'datetime'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::addAllowableQualifier - * @covers \Ilios\MeSH\Model\Descriptor::getAllowableQualifiers - */ - public function testAddGetAllowableQualifiers() + public function testAddGetAllowableQualifiers(): void { $this->addModelToListTest($this->object, 'allowableQualifier', 'AllowableQualifier'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::setAnnotation - * @covers \Ilios\MeSH\Model\Descriptor::getAnnotation - */ - public function testGetSetAnnotation() + public function testGetSetAnnotation(): void { $this->basicSetTest($this->object, 'annotation', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::setHistoryNote - * @covers \Ilios\MeSH\Model\Descriptor::getHistoryNote - */ - public function testGetSetHistoryNote() + public function testGetSetHistoryNote(): void { $this->basicSetTest($this->object, 'historyNote', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::setNlmClassificationNumber - * @covers \Ilios\MeSH\Model\Descriptor::getNlmClassificationNumber - */ - public function testNlmClassificationNumber() + public function testNlmClassificationNumber(): void { $this->basicSetTest($this->object, 'nlmClassificationNumber', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::setOnlineNote - * @covers \Ilios\MeSH\Model\Descriptor::getOnlineNote - */ - public function testGetSetOnlineNote() + public function testGetSetOnlineNote(): void { $this->basicSetTest($this->object, 'onlineNote', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::setPublicMeshNote - * @covers \Ilios\MeSH\Model\Descriptor::getPublicMeshNote - */ - public function testGetSetPublicMeshNote() + public function testGetSetPublicMeshNote(): void { $this->basicSetTest($this->object, 'publicMeshNote', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::addPreviousIndexing - * @covers \Ilios\MeSH\Model\Descriptor::getPreviousIndexing - */ - public function testAddGetPreviousIndexing() + public function testAddGetPreviousIndexing(): void { $this->addTextToListTest($this->object, 'previousIndexing', 'getPreviousIndexing'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::addEntryCombination - * @covers \Ilios\MeSH\Model\Descriptor::getEntryCombinations - */ - public function testAddGetEntryCombinations() + public function testAddGetEntryCombinations(): void { $this->addModelToListTest($this->object, 'entryCombination', 'EntryCombination'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::addRelatedDescriptor - * @covers \Ilios\MeSH\Model\Descriptor::getRelatedDescriptors - */ - public function testAddGetRelatedDescriptors() + public function testAddGetRelatedDescriptors(): void { $this->addModelToListTest($this->object, 'relatedDescriptor', 'Reference'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::setConsiderAlso - * @covers \Ilios\MeSH\Model\Descriptor::getConsiderAlso - */ - public function testGetSetConsiderAlso() + public function testGetSetConsiderAlso(): void { $this->basicSetTest($this->object, 'considerAlso', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::addPharmacologicalAction - * @covers \Ilios\MeSH\Model\Descriptor::getPharmacologicalActions - */ - public function testAddGetPharmacologicalAction() + public function testAddGetPharmacologicalAction(): void { $this->addModelToListTest($this->object, 'pharmacologicalAction', 'Reference'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::addTreeNumber - * @covers \Ilios\MeSH\Model\Descriptor::getTreeNumbers - */ - public function testAddGetTreeNumbers() + public function testAddGetTreeNumbers(): void { $this->addTextToListTest($this->object, 'treeNumber'); } - /** - * @covers \Ilios\MeSH\Model\Descriptor::addConcept - * @covers \Ilios\MeSH\Model\Descriptor::getConcepts - */ - public function testAddGetConcepts() + public function testAddGetConcepts(): void { $this->addModelToListTest($this->object, 'concept', 'Concept'); } + + public function testGetSetUi(): void + { + $this->basicSetTest($this->object, 'ui', 'string'); + } + + public function testGetSetName(): void + { + $this->basicSetTest($this->object, 'name', 'string'); + } } diff --git a/tests/Ilios/MeSH/Model/EntryCombinationTest.php b/tests/Ilios/MeSH/Model/EntryCombinationTest.php index 0a0830c..68e385f 100644 --- a/tests/Ilios/MeSH/Model/EntryCombinationTest.php +++ b/tests/Ilios/MeSH/Model/EntryCombinationTest.php @@ -1,68 +1,49 @@ object = new EntryCombination(); } - /** - * @inheritdoc - */ public function tearDown(): void { parent::tearDown(); unset($this->object); } - /** - * @covers \Ilios\MeSH\Model\EntryCombination::getDescriptorIn - * @covers \Ilios\MeSH\Model\EntryCombination::setDescriptorIn - */ - public function testGetSetDescriptorIn() + public function testGetSetDescriptorIn(): void { $this->modelSetTest($this->object, 'descriptorIn', 'Reference'); } - /** - * @covers \Ilios\MeSH\Model\EntryCombination::getDescriptorOut - * @covers \Ilios\MeSH\Model\EntryCombination::setDescriptorOut - */ - public function testGetSetDescriptorOut() + public function testGetSetDescriptorOut(): void { $this->modelSetTest($this->object, 'descriptorOut', 'Reference'); } - /** - * @covers \Ilios\MeSH\Model\EntryCombination::getQualifierIn - * @covers \Ilios\MeSH\Model\EntryCombination::setQualifierIn - */ - public function testGetSetQualifierIn() + public function testGetSetQualifierIn(): void { $this->modelSetTest($this->object, 'qualifierIn', 'Reference'); } - /** - * @covers \Ilios\MeSH\Model\EntryCombination::getQualifierOut - * @covers \Ilios\MeSH\Model\EntryCombination::setQualifierOut - */ - public function testGetSetQualifierOut() + public function testGetSetQualifierOut(): void { $this->modelSetTest($this->object, 'qualifierOut', 'Reference'); } diff --git a/tests/Ilios/MeSH/Model/ReferenceTest.php b/tests/Ilios/MeSH/Model/ReferenceTest.php index b91a27d..6ac9da2 100644 --- a/tests/Ilios/MeSH/Model/ReferenceTest.php +++ b/tests/Ilios/MeSH/Model/ReferenceTest.php @@ -1,50 +1,39 @@ object = new Reference(); } - /** - * @inheritdoc - */ public function tearDown(): void { parent::tearDown(); unset($this->object); } - /** - * @covers \Ilios\MeSH\Model\Reference::getUi - * @covers \Ilios\MeSH\Model\Reference::setUi - */ - public function testGetSetUi() + public function testGetSetUi(): void { $this->basicSetTest($this->object, 'ui', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Reference::getName - * @covers \Ilios\MeSH\Model\Reference::setName - */ - public function testGetSetName() + public function testGetSetName(): void { $this->basicSetTest($this->object, 'name', 'string'); } diff --git a/tests/Ilios/MeSH/Model/TermTest.php b/tests/Ilios/MeSH/Model/TermTest.php index d0a449c..4e8ee98 100644 --- a/tests/Ilios/MeSH/Model/TermTest.php +++ b/tests/Ilios/MeSH/Model/TermTest.php @@ -1,122 +1,89 @@ object = new Term(); } - /** - * @covers \Ilios\MeSH\Model\Term::__construct - */ - public function testConstructor() + public function testConstructor(): void { $this->assertEmpty($this->object->getThesaurusIds()); } - /** - * @covers \Ilios\MeSH\Model\Term::isPermuted - * @covers \Ilios\MeSH\Model\Term::setPermuted - */ - public function testIsSetPermuted() + public function testIsSetPermuted(): void { - $this->booleanSetTest($this->object, 'permuted', true); + $this->booleanSetTest($this->object, 'permuted'); } - /** - * @covers \Ilios\MeSH\Model\Term::isConceptPreferred - * @covers \Ilios\MeSH\Model\Term::setConceptPreferred - */ - public function testIsSetConceptPreferred() + public function testIsSetConceptPreferred(): void { - $this->booleanSetTest($this->object, 'conceptPreferred', true); + $this->booleanSetTest($this->object, 'conceptPreferred'); } - /** - * @covers \Ilios\MeSH\Model\Term::isRecordPreferred - * @covers \Ilios\MeSH\Model\Term::setRecordPreferred - */ - public function testIsSetRecordPreferred() + public function testIsSetRecordPreferred(): void { - $this->booleanSetTest($this->object, 'recordPreferred', true); + $this->booleanSetTest($this->object, 'recordPreferred'); } - /** - * @covers \Ilios\MeSH\Model\Term::getLexicalTag - * @covers \Ilios\MeSH\Model\Term::setLexicalTag - */ - public function testGetSetLexicalTag() + public function testGetSetLexicalTag(): void { $this->basicSetTest($this->object, 'lexicalTag', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Term::getAbbreviation - * @covers \Ilios\MeSH\Model\Term::setAbbreviation - */ - public function testGetSetAbbreviation() + public function testGetSetAbbreviation(): void { $this->basicSetTest($this->object, 'abbreviation', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Term::getSortVersion - * @covers \Ilios\MeSH\Model\Term::setSortVersion - */ - public function testGetSetSortVersion() + public function testGetSetSortVersion(): void { $this->basicSetTest($this->object, 'sortVersion', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Term::getEntryVersion - * @covers \Ilios\MeSH\Model\Term::setEntryVersion - */ - public function testGetSetEntryVersion() + public function testGetSetEntryVersion(): void { $this->basicSetTest($this->object, 'entryVersion', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Term::addThesaurusId - * @covers \Ilios\MeSH\Model\Term::getThesaurusIds - */ - public function testAddGetThesaurusIds() + public function testAddGetThesaurusIds(): void { $this->addTextToListTest($this->object, 'thesaurusId'); } - /** - * @covers \Ilios\MeSH\Model\Term::getNote - * @covers \Ilios\MeSH\Model\Term::setNote - */ - public function testGetSetNote() + public function testGetSetNote(): void { $this->basicSetTest($this->object, 'note', 'string'); } - /** - * @covers \Ilios\MeSH\Model\Term::getDateCreated - * @covers \Ilios\MeSH\Model\Term::setDateCreated - */ - public function testGetDateCreated() + public function testGetDateCreated(): void { $this->basicSetTest($this->object, 'dateCreated', 'datetime'); } + + public function testGetSetUi(): void + { + $this->basicSetTest($this->object, 'ui', 'string'); + } + + public function testGetSetName(): void + { + $this->basicSetTest($this->object, 'name', 'string'); + } } diff --git a/tests/Ilios/MeSH/ParserTest.php b/tests/Ilios/MeSH/ParserTest.php index 7d7c683..5fa6d7b 100644 --- a/tests/Ilios/MeSH/ParserTest.php +++ b/tests/Ilios/MeSH/ParserTest.php @@ -1,55 +1,46 @@ parser = new Parser(); } - /** - * @inheritdoc - */ protected function tearDown(): void { unset($this->parser); } - /** - * @covers \Ilios\MeSH\Parser::parse - */ - public function testForInvalidInputUriFailure() + public function testForInvalidInputUriFailure(): void { $uri = 'this/is/a/path/that/does/not/exist/desc.xml'; try { $this->parser->parse($uri); - } catch (\Exception $e) { - $this->assertSame("XML reader failed to open ${uri}.", $e->getMessage()); + } catch (Exception $e) { + $this->assertSame("XML reader failed to open $uri.", $e->getMessage()); } } - /** - * @covers \Ilios\MeSH\Parser::parse - */ - public function testForIncompleteDateFailure() + public function testForIncompleteDateFailure(): void { - $xml =<< @@ -68,17 +59,14 @@ public function testForIncompleteDateFailure() try { /* @link http://php.net/manual/en/wrappers.data.php */ $this->parser->parse('data://text/plain;base64,' . base64_encode($xml)); - } catch (\Exception $e) { + } catch (Exception $e) { $this->assertSame('Could not retrieve Year/Month/Day info from node "DateCreated".', $e->getMessage()); } } - /** - * @covers \Ilios\MeSH\Parser::parse - */ - public function testForInvalidStringNodeFailure() + public function testForInvalidStringNodeFailure(): void { - $xml =<< @@ -99,15 +87,12 @@ public function testForInvalidStringNodeFailure() EOL; try { $this->parser->parse('data://text/plain;base64,' . base64_encode($xml)); - } catch (\Exception $e) { + } catch (Exception $e) { $this->assertSame('Node "QualifierName" does not contain a child node of type "String".', $e->getMessage()); } } - /** - * @covers \Ilios\MeSH\Parser::parse - */ - public function testParse() + public function testParse(): void { $file = __DIR__ . '/desc.xml'; $descriptorsSet = $this->parser->parse($file); From 87eb37554a3b07c8c955714e3061da914001d6a3 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Sun, 11 Feb 2024 19:06:59 -0800 Subject: [PATCH 09/39] updates model classes. - strict mode - type hints - ditch pointless comments --- src/Ilios/MeSH/Model/AllowableQualifier.php | 36 +-- src/Ilios/MeSH/Model/Concept.php | 154 +++--------- src/Ilios/MeSH/Model/ConceptRelation.php | 38 +-- src/Ilios/MeSH/Model/Descriptor.php | 255 ++++---------------- src/Ilios/MeSH/Model/DescriptorSet.php | 35 +-- src/Ilios/MeSH/Model/EntryCombination.php | 54 ++--- src/Ilios/MeSH/Model/Identifiable.php | 17 +- src/Ilios/MeSH/Model/Nameable.php | 17 +- src/Ilios/MeSH/Model/Reference.php | 2 + src/Ilios/MeSH/Model/Term.php | 162 +++---------- 10 files changed, 182 insertions(+), 588 deletions(-) diff --git a/src/Ilios/MeSH/Model/AllowableQualifier.php b/src/Ilios/MeSH/Model/AllowableQualifier.php index a1a6ab6..3f88e2e 100644 --- a/src/Ilios/MeSH/Model/AllowableQualifier.php +++ b/src/Ilios/MeSH/Model/AllowableQualifier.php @@ -1,5 +1,7 @@ qualifierReference; } - /** - * @param Reference $reference - */ - public function setQualifierReference(Reference $reference) + public function setQualifierReference(Reference $reference): void { $this->qualifierReference = $reference; } - /** - * @return string - */ - public function getAbbreviation() + public function getAbbreviation(): string { return $this->abbreviation; } - /** - * @param string $abbreviation - */ - public function setAbbreviation($abbreviation) + public function setAbbreviation(string $abbreviation): void { $this->abbreviation = $abbreviation; } diff --git a/src/Ilios/MeSH/Model/Concept.php b/src/Ilios/MeSH/Model/Concept.php index b189f77..bce1260 100644 --- a/src/Ilios/MeSH/Model/Concept.php +++ b/src/Ilios/MeSH/Model/Concept.php @@ -1,5 +1,7 @@ preferred; } - /** - * @param boolean $preferred - */ - public function setPreferred($preferred) + public function setPreferred(bool $preferred): void { $this->preferred = $preferred; } - /** - * @return string - */ - public function getCasn1Name() + public function getCasn1Name(): ?string { return $this->casn1Name; } - /** - * @param string $casn1Name - */ - public function setCasn1Name($casn1Name) + public function setCasn1Name(?string $casn1Name): void { $this->casn1Name = $casn1Name; } - /** - * @return string - */ - public function getRegistryNumber() + public function getRegistryNumber(): ?string { return $this->registryNumber; } - /** - * @param string $registryNumber - */ - public function setRegistryNumber($registryNumber) + public function setRegistryNumber(?string $registryNumber): void { $this->registryNumber = $registryNumber; } - /** - * @return string - */ - public function getScopeNote() + public function getScopeNote(): ?string { return $this->scopeNote; } - /** - * @param string $scopeNote - */ - public function setScopeNote($scopeNote) + public function setScopeNote(?string $scopeNote): void { $this->scopeNote = $scopeNote; } - /** - * @return string - */ - public function getTranslatorsEnglishScopeNote() + public function getTranslatorsEnglishScopeNote(): ?string { return $this->translatorsEnglishScopeNote; } - /** - * @param string $translatorsEnglishScopeNote - */ - public function setTranslatorsEnglishScopeNote($translatorsEnglishScopeNote) + public function setTranslatorsEnglishScopeNote(?string $translatorsEnglishScopeNote): void { $this->translatorsEnglishScopeNote = $translatorsEnglishScopeNote; } - /** - * @return string - */ - public function getTranslatorsScopeNote() + public function getTranslatorsScopeNote(): ?string { return $this->translatorsScopeNote; } - /** - * @param string $translatorsScopeNote - */ - public function setTranslatorsScopeNote($translatorsScopeNote) + public function setTranslatorsScopeNote(?string $translatorsScopeNote): void { $this->translatorsScopeNote = $translatorsScopeNote; } - /** - * @return \string[] - */ - public function getRelatedRegistryNumbers() + public function getRelatedRegistryNumbers(): array { return $this->relatedRegistryNumbers; } - /** - * @param string $relatedRegistryNumber - */ - public function addRelatedRegistryNumber($relatedRegistryNumber) + public function addRelatedRegistryNumber(string $relatedRegistryNumber): void { $this->relatedRegistryNumbers[] = $relatedRegistryNumber; } - /** - * @return ConceptRelation[] - */ - public function getConceptRelations() + public function getConceptRelations(): array { return $this->conceptRelations; } - /** - * @param ConceptRelation $conceptRelation - */ - public function addConceptRelation(ConceptRelation $conceptRelation) + public function addConceptRelation(ConceptRelation $conceptRelation): void { $this->conceptRelations[] = $conceptRelation; } - /** - * @return Term[] - */ - public function getTerms() + public function getTerms(): array { return $this->terms; } - /** - * @param Term $term - */ - public function addTerm(Term $term) + public function addTerm(Term $term): void { $this->terms[] = $term; } diff --git a/src/Ilios/MeSH/Model/ConceptRelation.php b/src/Ilios/MeSH/Model/ConceptRelation.php index 9732a2e..fa456ef 100644 --- a/src/Ilios/MeSH/Model/ConceptRelation.php +++ b/src/Ilios/MeSH/Model/ConceptRelation.php @@ -1,5 +1,7 @@ concept1Ui; } - /** - * @param string $concept1Ui - */ - public function setConcept1Ui($concept1Ui) + public function setConcept1Ui(string $concept1Ui): void { $this->concept1Ui = $concept1Ui; } - /** - * @return string - */ - public function getConcept2Ui() + public function getConcept2Ui(): string { return $this->concept2Ui; } - /** - * @param string $concept2Ui - */ - public function setConcept2Ui($concept2Ui) + public function setConcept2Ui(string $concept2Ui): void { $this->concept2Ui = $concept2Ui; } diff --git a/src/Ilios/MeSH/Model/Descriptor.php b/src/Ilios/MeSH/Model/Descriptor.php index b702ff9..8c129d8 100644 --- a/src/Ilios/MeSH/Model/Descriptor.php +++ b/src/Ilios/MeSH/Model/Descriptor.php @@ -2,230 +2,129 @@ namespace Ilios\MeSH\Model; +use DateTime; + /** * Class Descriptor * @package Ilios\MeSH\Model */ class Descriptor extends Reference { - /** - * @var string - */ - protected $class; + protected string $class; - /** - * @var \DateTime - */ - protected $dateCreated = null; + protected DateTime $dateCreated; - /** - * @var \DateTime|null - */ - protected $dateEstablished = null; + protected ?DateTime $dateEstablished = null; - /** - * @var \DateTime|null - */ - protected $dateRevised = null; + protected ?DateTime $dateRevised = null; - /** - * @var AllowableQualifier[] - */ - protected $allowableQualifiers = []; + protected array $allowableQualifiers = []; - /** - * @var string - */ - protected $annotation; + protected ?string $annotation = null; - /** - * @var string - */ - protected $historyNote; + protected ?string $historyNote = null; - /** - * @var string - */ - protected $nlmClassificationNumber; + protected ?string $nlmClassificationNumber = null; - /** - * @var string - */ - protected $onlineNote; + protected ?string $onlineNote = null; - /** - * @var string - */ - protected $publicMeshNote; + protected ?string $publicMeshNote; - /** - * @var string[] - */ - protected $previousIndexing = []; + protected array $previousIndexing = []; - /** - * @var EntryCombination[] - */ - protected $entryCombinations = []; + protected array $entryCombinations = []; - /** - * A list of related descriptors references. - * @var Reference[] - */ - protected $relatedDescriptors = []; + protected array $relatedDescriptors = []; - /** - * @var string - */ - protected $considerAlso; + protected ?string $considerAlso = null; - /** - * @var Reference[] - */ - protected $pharmacologicalActions = []; + protected array $pharmacologicalActions = []; - /** - * @var string[] - */ - protected $treeNumbers = []; + protected array $treeNumbers = []; - /** - * @var Concept[] - */ - protected $concepts = []; + protected array $concepts = []; - /** - * @return string - */ - public function getClass() + public function getClass(): string { return $this->class; } - /** - * @param string $class - */ - public function setClass($class) + public function setClass(string $class): void { $this->class = $class; } - /** - * @return \DateTime - */ - public function getDateCreated() + public function getDateCreated(): DateTime { return $this->dateCreated; } - /** - * @param \DateTime $date - */ - public function setDateCreated(\DateTime $date) + public function setDateCreated(DateTime $date): void { $this->dateCreated = $date; } - /** - * @return \DateTime|null - */ - public function getDateRevised() + public function getDateRevised(): ?DateTime { return $this->dateRevised; } - /** - * @param \DateTime $date - */ - public function setDateRevised(\DateTime $date) + public function setDateRevised(?DateTime $date): void { $this->dateRevised = $date; } - /** - * @return \DateTime|null - */ - public function getDateEstablished() + public function getDateEstablished(): ?DateTime { return $this->dateEstablished; } - /** - * @param \DateTime $date |null - */ - public function setDateEstablished(\DateTime $date) + public function setDateEstablished(?DateTime $date): void { $this->dateEstablished = $date; } - /** - * @return AllowableQualifier[] - */ - public function getAllowableQualifiers() + public function getAllowableQualifiers(): array { return $this->allowableQualifiers; } - /** - * @param AllowableQualifier $qualifier - */ - public function addAllowableQualifier(AllowableQualifier $qualifier) + public function addAllowableQualifier(AllowableQualifier $qualifier): void { $this->allowableQualifiers[] = $qualifier; } - /** - * @return string - */ - public function getAnnotation() + public function getAnnotation(): ?string { return $this->annotation; } - /** - * @param string $annotation - */ - public function setAnnotation($annotation) + public function setAnnotation(?string $annotation): void { $this->annotation = $annotation; } - /** - * @return string - */ - public function getHistoryNote() + public function getHistoryNote(): ?string { return $this->historyNote; } - /** - * @param string $historyNote - */ - public function setHistoryNote($historyNote) + public function setHistoryNote(?string $historyNote): void { $this->historyNote = $historyNote; } - /** - * @return string - */ - public function getNlmClassificationNumber() + public function getNlmClassificationNumber(): ?string { return $this->nlmClassificationNumber; } - /** - * @param string $nlmClassificationNumber - */ - public function setNlmClassificationNumber($nlmClassificationNumber) + public function setNlmClassificationNumber(?string $nlmClassificationNumber): void { $this->nlmClassificationNumber = $nlmClassificationNumber; } - /** - * @return string - */ - public function getOnlineNote() + public function getOnlineNote(): ?string { return $this->onlineNote; } @@ -233,135 +132,87 @@ public function getOnlineNote() /** * @param string $onlineNote */ - public function setOnlineNote($onlineNote) + public function setOnlineNote(?string $onlineNote): void { $this->onlineNote = $onlineNote; } - /** - * @return string - */ - public function getPublicMeshNote() + public function getPublicMeshNote(): ?string { return $this->publicMeshNote; } - /** - * @param string $publicMeshNote - */ - public function setPublicMeshNote($publicMeshNote) + public function setPublicMeshNote(?string $publicMeshNote): void { $this->publicMeshNote = $publicMeshNote; } - /** - * @return string[] - */ - public function getPreviousIndexing() + public function getPreviousIndexing(): array { return $this->previousIndexing; } - /** - * @param string $previousIndexing - */ - public function addPreviousIndexing($previousIndexing) + public function addPreviousIndexing(string $previousIndexing): void { $this->previousIndexing[] = $previousIndexing; } - /** - * @return EntryCombination[] - */ - public function getEntryCombinations() + public function getEntryCombinations(): array { return $this->entryCombinations; } - /** - * @param EntryCombination $entryCombination - */ - public function addEntryCombination($entryCombination) + public function addEntryCombination(EntryCombination $entryCombination): void { $this->entryCombinations[] = $entryCombination; } - /** - * @return Reference[] - */ - public function getRelatedDescriptors() + public function getRelatedDescriptors(): array { return $this->relatedDescriptors; } - /** - * @param Reference $reference - */ - public function addRelatedDescriptor(Reference $reference) + public function addRelatedDescriptor(Reference $reference): void { $this->relatedDescriptors[] = $reference; } - /** - * @return string - */ - public function getConsiderAlso() + public function getConsiderAlso(): ?string { return $this->considerAlso; } - /** - * @param string $considerAlso - */ - public function setConsiderAlso($considerAlso) + public function setConsiderAlso(?string $considerAlso): void { $this->considerAlso = $considerAlso; } - /** - * @return Reference[] - */ - public function getPharmacologicalActions() + public function getPharmacologicalActions(): array { return $this->pharmacologicalActions; } - /** - * @param Reference $reference - */ - public function addPharmacologicalAction($reference) + public function addPharmacologicalAction(Reference $reference): void { $this->pharmacologicalActions[] = $reference; } - /** - * @return string[] - */ - public function getTreeNumbers() + public function getTreeNumbers(): array { return $this->treeNumbers; } - /** - * @param string $treeNumber - */ - public function addTreeNumber($treeNumber) + public function addTreeNumber(string $treeNumber): void { $this->treeNumbers[] = $treeNumber; } - /** - * @return Concept[] - */ - public function getConcepts() + public function getConcepts(): array { return $this->concepts; } - /** - * @param Concept $concept - */ - public function addConcept(Concept $concept) + public function addConcept(Concept $concept): void { $this->concepts[] = $concept; } diff --git a/src/Ilios/MeSH/Model/DescriptorSet.php b/src/Ilios/MeSH/Model/DescriptorSet.php index f81597e..69ae30d 100644 --- a/src/Ilios/MeSH/Model/DescriptorSet.php +++ b/src/Ilios/MeSH/Model/DescriptorSet.php @@ -1,5 +1,7 @@ languageCode; } - /** - * @param string $code - */ - public function setLanguageCode($code) + public function setLanguageCode(?string $code): void { $this->languageCode = $code; } - /** - * @param \Ilios\MeSH\Model\Descriptor $descriptor - */ - public function addDescriptor(Descriptor $descriptor) + public function addDescriptor(Descriptor $descriptor): void { // @todo check for empty keys and duplicates here. maybe. [ST 2015/03/15] $this->descriptors[$descriptor->getUi()] = $descriptor; @@ -45,18 +32,16 @@ public function addDescriptor(Descriptor $descriptor) /** * Retrieves all descriptors in this set. - * @return Descriptor[] */ - public function getDescriptors() + public function getDescriptors(): array { return array_values($this->descriptors); } /** * Returns the identifiers of all descriptors in this set. - * @return array */ - public function getDescriptorUis() + public function getDescriptorUis(): array { return array_keys($this->descriptors); } @@ -66,7 +51,7 @@ public function getDescriptorUis() * @param string $ui The descriptor's identifier. * @return bool|Descriptor the descriptor if found, otherwise FALSE. */ - public function findDescriptorByUi($ui) + public function findDescriptorByUi(string $ui): bool|Descriptor { if (array_key_exists($ui, $this->descriptors)) { return $this->descriptors[$ui]; diff --git a/src/Ilios/MeSH/Model/EntryCombination.php b/src/Ilios/MeSH/Model/EntryCombination.php index 96c8c21..912f422 100644 --- a/src/Ilios/MeSH/Model/EntryCombination.php +++ b/src/Ilios/MeSH/Model/EntryCombination.php @@ -1,5 +1,7 @@ descriptorIn; } - /** - * @param Reference $descriptorIn - */ - public function setDescriptorIn(Reference $descriptorIn) + public function setDescriptorIn(Reference $descriptorIn): void { $this->descriptorIn = $descriptorIn; } - /** - * @return Reference - */ - public function getDescriptorOut() + public function getDescriptorOut(): Reference { return $this->descriptorOut; } - /** - * @param Reference $descriptorOut - */ - public function setDescriptorOut(Reference $descriptorOut) + public function setDescriptorOut(Reference $descriptorOut): void { $this->descriptorOut = $descriptorOut; } - /** - * @return Reference - */ - public function getQualifierIn() + public function getQualifierIn(): Reference { return $this->qualifierIn; } - /** - * @param Reference $qualifierIn - */ - public function setQualifierIn(Reference $qualifierIn) + public function setQualifierIn(Reference $qualifierIn): void { $this->qualifierIn = $qualifierIn; } - /** - * @return Reference - */ - public function getQualifierOut() + public function getQualifierOut(): ?Reference { return $this->qualifierOut; } - /** - * @param Reference $qualifierOut - */ - public function setQualifierOut(Reference $qualifierOut) + public function setQualifierOut(?Reference $qualifierOut): void { $this->qualifierOut = $qualifierOut; } diff --git a/src/Ilios/MeSH/Model/Identifiable.php b/src/Ilios/MeSH/Model/Identifiable.php index 561bb1d..0a49e28 100644 --- a/src/Ilios/MeSH/Model/Identifiable.php +++ b/src/Ilios/MeSH/Model/Identifiable.php @@ -1,5 +1,7 @@ ui; } - /** - * @param $ui - */ - public function setUi($ui) + public function setUi(string $ui): void { $this->ui = $ui; } diff --git a/src/Ilios/MeSH/Model/Nameable.php b/src/Ilios/MeSH/Model/Nameable.php index 57a8881..c0e119a 100644 --- a/src/Ilios/MeSH/Model/Nameable.php +++ b/src/Ilios/MeSH/Model/Nameable.php @@ -1,5 +1,7 @@ name; } - /** - * @param string $name - */ - public function setName($name) + public function setName(string $name): void { $this->name = $name; } diff --git a/src/Ilios/MeSH/Model/Reference.php b/src/Ilios/MeSH/Model/Reference.php index f9efe15..a9b1639 100644 --- a/src/Ilios/MeSH/Model/Reference.php +++ b/src/Ilios/MeSH/Model/Reference.php @@ -1,5 +1,7 @@ permuted; } - /** - * @param boolean $permuted - */ - public function setPermuted($permuted) + public function setPermuted(bool $permuted): void { $this->permuted = $permuted; } - /** - * @return boolean - */ - public function isConceptPreferred() + public function isConceptPreferred(): bool { return $this->conceptPreferred; } - /** - * @param boolean $conceptPreferred - */ - public function setConceptPreferred($conceptPreferred) + public function setConceptPreferred(bool $conceptPreferred): void { $this->conceptPreferred = $conceptPreferred; } - /** - * @return boolean - */ - public function isRecordPreferred() + public function isRecordPreferred(): bool { return $this->recordPreferred; } - /** - * @param boolean $recordPreferred - */ - public function setRecordPreferred($recordPreferred) + public function setRecordPreferred(bool $recordPreferred): void { $this->recordPreferred = $recordPreferred; } - /** - * @return string - */ - public function getLexicalTag() + public function getLexicalTag(): string { return $this->lexicalTag; } - /** - * @param string $lexicalTag - */ - public function setLexicalTag($lexicalTag) + public function setLexicalTag(string $lexicalTag): void { $this->lexicalTag = $lexicalTag; } - /** - * @return string - */ - public function getAbbreviation() + public function getAbbreviation(): ?string { return $this->abbreviation; } - /** - * @param string $abbreviation - */ - public function setAbbreviation($abbreviation) + public function setAbbreviation(?string $abbreviation): void { $this->abbreviation = $abbreviation; } - /** - * @return string - */ - public function getSortVersion() + public function getSortVersion(): ?string { return $this->sortVersion; } - /** - * @param string $sortVersion - */ - public function setSortVersion($sortVersion) + public function setSortVersion(?string $sortVersion): void { $this->sortVersion = $sortVersion; } - /** - * @return string - */ - public function getEntryVersion() + public function getEntryVersion(): ?string { return $this->entryVersion; } - /** - * @param string $entryVersion - */ - public function setEntryVersion($entryVersion) + public function setEntryVersion(?string $entryVersion): void { $this->entryVersion = $entryVersion; } - /** - * @return string[] - */ - public function getThesaurusIds() + public function getThesaurusIds(): array { return $this->thesaurusIds; } - /** - * @param string $thesaurusId - */ - public function addThesaurusId($thesaurusId) + public function addThesaurusId(string $thesaurusId): void { $this->thesaurusIds[] = $thesaurusId; } - /** - * @return string - */ - public function getNote() + public function getNote(): ?string { return $this->note; } - /** - * @param string $note - */ - public function setNote($note) + public function setNote(?string $note): void { $this->note = $note; } - /** - * @return \DateTime - */ - public function getDateCreated() + public function getDateCreated(): ?DateTime { return $this->dateCreated; } - /** - * @param \DateTime $dateCreated - */ - public function setDateCreated($dateCreated) + public function setDateCreated(?DateTime $dateCreated): void { $this->dateCreated = $dateCreated; } From b1d777690313e6c56406903c6facaeba790c61c9 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 11:58:32 -0800 Subject: [PATCH 10/39] make $name attr "nullable". according to the DTD, ConceptRelation::RelationName is an "implied" attribute, which makes it optional. --- src/Ilios/MeSH/Model/ConceptRelation.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Ilios/MeSH/Model/ConceptRelation.php b/src/Ilios/MeSH/Model/ConceptRelation.php index fa456ef..781b3ab 100644 --- a/src/Ilios/MeSH/Model/ConceptRelation.php +++ b/src/Ilios/MeSH/Model/ConceptRelation.php @@ -10,12 +10,23 @@ */ class ConceptRelation { - use Nameable; + protected ?string $name = null; protected string $concept1Ui; protected string $concept2Ui; + public function getName(): ?string + { + return $this->name; + } + + public function setName(?string $name): void + { + $this->name = $name; + } + + public function getConcept1Ui(): string { return $this->concept1Ui; From e9d89d526b89a85286fe2063cb7deb5014140365 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 12:38:50 -0800 Subject: [PATCH 11/39] dissolve Nameable trait. meld it into Reference class, its only consumer. --- src/Ilios/MeSH/Model/Nameable.php | 24 ------------------------ src/Ilios/MeSH/Model/Reference.php | 14 +++++++++++++- 2 files changed, 13 insertions(+), 25 deletions(-) delete mode 100644 src/Ilios/MeSH/Model/Nameable.php diff --git a/src/Ilios/MeSH/Model/Nameable.php b/src/Ilios/MeSH/Model/Nameable.php deleted file mode 100644 index c0e119a..0000000 --- a/src/Ilios/MeSH/Model/Nameable.php +++ /dev/null @@ -1,24 +0,0 @@ -name; - } - - public function setName(string $name): void - { - $this->name = $name; - } -} diff --git a/src/Ilios/MeSH/Model/Reference.php b/src/Ilios/MeSH/Model/Reference.php index a9b1639..0af5778 100644 --- a/src/Ilios/MeSH/Model/Reference.php +++ b/src/Ilios/MeSH/Model/Reference.php @@ -11,5 +11,17 @@ class Reference { use Identifiable; - use Nameable; + + protected string $name; + + public function getName(): string + { + return $this->name; + } + + public function setName(string $name): void + { + $this->name = $name; + } + } From 6da2d643ff3aae14f488e630e2c3c80a1a3035ac Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 12:41:08 -0800 Subject: [PATCH 12/39] expand scope of setter/getter test helper to allow for NULL input checks. this will come in handy when testing Models with nullable attrs. --- tests/Ilios/MeSH/Model/BaseTestCase.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/Ilios/MeSH/Model/BaseTestCase.php b/tests/Ilios/MeSH/Model/BaseTestCase.php index b357822..480460a 100644 --- a/tests/Ilios/MeSH/Model/BaseTestCase.php +++ b/tests/Ilios/MeSH/Model/BaseTestCase.php @@ -109,12 +109,13 @@ protected function getValueForType(string $type): mixed /** * A generic test for setters methods. * - * @param object $model - * @param string $property - * @param string $type + * @param object $model + * @param string $property + * @param string $type + * @param bool $nullable if TRUE then an additional getter/setter check for NULL is performed. * @throws Exception */ - protected function basicSetTest(object $model, string $property, string $type): void + protected function basicSetTest(object $model, string $property, string $type, bool $nullable = false): void { $setMethod = $this->getSetMethodForProperty($property); $getMethod = $this->getGetMethodForProperty($property); @@ -123,6 +124,10 @@ protected function basicSetTest(object $model, string $property, string $type): $expected = $this->getValueForType($type); $model->$setMethod($expected); $this->assertSame($expected, $model->$getMethod()); + if ($nullable) { + $model->$setMethod(null); + $this->assertNull($model->$getMethod()); + } } /** From eebef5a799b17478caa9202fec8fd4c0b1fac68a Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 12:45:36 -0800 Subject: [PATCH 13/39] unearth PHPUnit attribute from docblock. *headdesk --- tests/Ilios/MeSH/Model/AllowableQualifierTest.php | 2 +- tests/Ilios/MeSH/Model/ConceptRelationTest.php | 2 +- tests/Ilios/MeSH/Model/ConceptTest.php | 2 +- tests/Ilios/MeSH/Model/DescriptorSetTest.php | 2 +- tests/Ilios/MeSH/Model/DescriptorTest.php | 2 +- tests/Ilios/MeSH/Model/EntryCombinationTest.php | 2 +- tests/Ilios/MeSH/Model/ReferenceTest.php | 2 +- tests/Ilios/MeSH/Model/TermTest.php | 2 +- tests/Ilios/MeSH/ParserTest.php | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/Ilios/MeSH/Model/AllowableQualifierTest.php b/tests/Ilios/MeSH/Model/AllowableQualifierTest.php index ce118c8..da48e21 100644 --- a/tests/Ilios/MeSH/Model/AllowableQualifierTest.php +++ b/tests/Ilios/MeSH/Model/AllowableQualifierTest.php @@ -10,8 +10,8 @@ * Class AllowableQualifierTest * * @package Ilios\MeSH\Model - * #[CoversClass(AllowableQualifier::class)] */ +#[CoversClass(AllowableQualifier::class)] class AllowableQualifierTest extends BaseTestCase { protected AllowableQualifier $object; diff --git a/tests/Ilios/MeSH/Model/ConceptRelationTest.php b/tests/Ilios/MeSH/Model/ConceptRelationTest.php index 3d5179b..5e54f9f 100644 --- a/tests/Ilios/MeSH/Model/ConceptRelationTest.php +++ b/tests/Ilios/MeSH/Model/ConceptRelationTest.php @@ -10,8 +10,8 @@ * Class ConceptRelationTest * * @package Ilios\MeSH\Model - * #[CoversClass(ConceptRelation::class)] */ +#[CoversClass(ConceptRelation::class)] class ConceptRelationTest extends BaseTestCase { protected ConceptRelation $object; diff --git a/tests/Ilios/MeSH/Model/ConceptTest.php b/tests/Ilios/MeSH/Model/ConceptTest.php index e5b046c..671d90b 100644 --- a/tests/Ilios/MeSH/Model/ConceptTest.php +++ b/tests/Ilios/MeSH/Model/ConceptTest.php @@ -10,8 +10,8 @@ * Class ConceptTest * * @package Ilios\MeSH\Model - * #[CoversClass(Concept::class)] */ +#[CoversClass(Concept::class)] class ConceptTest extends BaseTestCase { protected Concept $object; diff --git a/tests/Ilios/MeSH/Model/DescriptorSetTest.php b/tests/Ilios/MeSH/Model/DescriptorSetTest.php index ffcb372..7f2c507 100644 --- a/tests/Ilios/MeSH/Model/DescriptorSetTest.php +++ b/tests/Ilios/MeSH/Model/DescriptorSetTest.php @@ -10,8 +10,8 @@ * Class DescriptorSetTest * * @package Ilios\MeSH\Model - * #[CoversClass(DescriptorSet::class)] */ +#[CoversClass(DescriptorSet::class)] class DescriptorSetTest extends BaseTestCase { protected DescriptorSet $object; diff --git a/tests/Ilios/MeSH/Model/DescriptorTest.php b/tests/Ilios/MeSH/Model/DescriptorTest.php index 25b3963..be2652e 100644 --- a/tests/Ilios/MeSH/Model/DescriptorTest.php +++ b/tests/Ilios/MeSH/Model/DescriptorTest.php @@ -10,8 +10,8 @@ * Class DescriptorTest * * @package Ilios\MeSH\Model - * #[CoversClass(Descriptor::class)] */ +#[CoversClass(Descriptor::class)] class DescriptorTest extends BaseTestCase { protected Descriptor $object; diff --git a/tests/Ilios/MeSH/Model/EntryCombinationTest.php b/tests/Ilios/MeSH/Model/EntryCombinationTest.php index 68e385f..4f66322 100644 --- a/tests/Ilios/MeSH/Model/EntryCombinationTest.php +++ b/tests/Ilios/MeSH/Model/EntryCombinationTest.php @@ -10,8 +10,8 @@ * Class EntryCombinationTest * * @package Ilios\MeSH\Model - * #[CoversClass(EntryCombination::class)] */ +#[CoversClass(EntryCombination::class)] class EntryCombinationTest extends BaseTestCase { protected EntryCombination $object; diff --git a/tests/Ilios/MeSH/Model/ReferenceTest.php b/tests/Ilios/MeSH/Model/ReferenceTest.php index 6ac9da2..9fe7c81 100644 --- a/tests/Ilios/MeSH/Model/ReferenceTest.php +++ b/tests/Ilios/MeSH/Model/ReferenceTest.php @@ -10,8 +10,8 @@ * Class ReferenceTest * * @package Ilios\MeSH\Model - * #[CoversClass(Reference::class)] */ +#[CoversClass(Reference::class)] class ReferenceTest extends BaseTestCase { protected Reference $object; diff --git a/tests/Ilios/MeSH/Model/TermTest.php b/tests/Ilios/MeSH/Model/TermTest.php index 4e8ee98..b91649c 100644 --- a/tests/Ilios/MeSH/Model/TermTest.php +++ b/tests/Ilios/MeSH/Model/TermTest.php @@ -10,8 +10,8 @@ * Class TermTest * * @package Ilios\MeSH\Model - * #[CoversClass(Term::class)] */ +#[CoversClass(Term::class)] class TermTest extends BaseTestCase { protected Term $object; diff --git a/tests/Ilios/MeSH/ParserTest.php b/tests/Ilios/MeSH/ParserTest.php index 5fa6d7b..72a308b 100644 --- a/tests/Ilios/MeSH/ParserTest.php +++ b/tests/Ilios/MeSH/ParserTest.php @@ -12,8 +12,8 @@ * Class ParserTest * * @package Ilios\MeSH - * #[CoversClass(Parser::class)] */ +#[CoversClass(Parser::class)] class ParserTest extends TestCase { protected Parser $parser; From 871576c53ef72069b8926406d2c765dd8ff87a0d Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 14:54:17 -0800 Subject: [PATCH 14/39] appease the code linter. --- src/Ilios/MeSH/Model/Descriptor.php | 2 + src/Ilios/MeSH/Model/Reference.php | 1 - src/Ilios/MeSH/Parser.php | 138 ++++++++++++++-------------- 3 files changed, 72 insertions(+), 69 deletions(-) diff --git a/src/Ilios/MeSH/Model/Descriptor.php b/src/Ilios/MeSH/Model/Descriptor.php index 8c129d8..0b299e1 100644 --- a/src/Ilios/MeSH/Model/Descriptor.php +++ b/src/Ilios/MeSH/Model/Descriptor.php @@ -1,5 +1,7 @@ name = $name; } - } diff --git a/src/Ilios/MeSH/Parser.php b/src/Ilios/MeSH/Parser.php index 1f9b021..5c2a63a 100644 --- a/src/Ilios/MeSH/Parser.php +++ b/src/Ilios/MeSH/Parser.php @@ -1,5 +1,7 @@ reader; if (!@$reader->open($uri)) { - throw new \Exception('XML reader failed to open '.$uri.'.'); + throw new \Exception('XML reader failed to open ' . $uri . '.'); }; // start reading the XML File. From 8c1d34c829d72e785d60585c518479eac2d4988d Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 15:30:26 -0800 Subject: [PATCH 15/39] updates links and docs. --- README.md | 12 ++++++------ src/Ilios/MeSH/Parser.php | 2 +- tests/Ilios/MeSH/ParserTest.php | 4 ++-- tests/Ilios/MeSH/desc.xml | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 9f8587d..5378935 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # MeSH Parser -This PHP code library provides tools for extracting [Medical Subject Headings](https://www.nlm.nih.gov/mesh/) +This PHP code library provides tools for extracting [Medical Subject Headings](https://www.nlm.nih.gov/mesh/meshhome.html) (MeSH) descriptors and associated data from a given XML file into an object representation. -It expects its input to be compliant with the 2019 or 2020 [MeSH DTDs](https://www.nlm.nih.gov/databases/dtd/). +It expects its input to be compliant with the 2023 or 2024 [MeSH DTDs](https://www.nlm.nih.gov/databases/download/mesh.html). ## Installation @@ -15,11 +15,11 @@ composer require ilios/mesh-parser ## Usage -Instantiate `\Ilios\MeSH\Parser` and invoke its `parse()` method with an URI that points at valid MeSH descriptors +Instantiate `\Ilios\MeSH\Parser` and invoke its `parse()` method with a URI that points at valid MeSH descriptors XML file. This method call will return an instance of `\Ilios\MeSH\Model\DescriptorSet`; this is the entry point into the object representation of the descriptors data model. -Use getter methods on this object and its sub-components to traverse and process this model. +Use getter methods on this object and its subcomponents to traverse and process this model. ### Example @@ -28,8 +28,8 @@ Use getter methods on this object and its sub-components to traverse and process require __DIR__ . '/vendor/autoload.php'; -// provide an URL or a local file path. -//$uri = 'ftp://nlmpubs.nlm.nih.gov/online/mesh/MESH_FILES/xmlmesh/desc2020.xml'; +// provide a URL or a local file path. +//$uri = 'https://nlmpubs.nlm.nih.gov/projects/mesh/MESH_FILES/xmlmesh/desc2024.xml'; $uri = __DIR__ . '/desc2019.xml'; // instantiate the parser and parse the input. diff --git a/src/Ilios/MeSH/Parser.php b/src/Ilios/MeSH/Parser.php index 5c2a63a..f27cd47 100644 --- a/src/Ilios/MeSH/Parser.php +++ b/src/Ilios/MeSH/Parser.php @@ -16,7 +16,7 @@ /** * Class Parser * @package Ilios\MeSH - * @link http://www.nlm.nih.gov/databases/dtd/nlmdescriptorrecordset_20160101.dtd + * @link https://nlmpubs.nlm.nih.gov/projects/mesh/MESH_FILES/xmlmesh/DTD/2024/nlmdescriptorrecordset_20240101.dtd */ class Parser { diff --git a/tests/Ilios/MeSH/ParserTest.php b/tests/Ilios/MeSH/ParserTest.php index 72a308b..8fe35b9 100644 --- a/tests/Ilios/MeSH/ParserTest.php +++ b/tests/Ilios/MeSH/ParserTest.php @@ -42,7 +42,7 @@ public function testForIncompleteDateFailure(): void { $xml = << - + D000000 @@ -68,7 +68,7 @@ public function testForInvalidStringNodeFailure(): void { $xml = << - + D000000 diff --git a/tests/Ilios/MeSH/desc.xml b/tests/Ilios/MeSH/desc.xml index 6f75cd7..f74e3ec 100644 --- a/tests/Ilios/MeSH/desc.xml +++ b/tests/Ilios/MeSH/desc.xml @@ -3,7 +3,7 @@ Fake MeSH descriptors set, for testing purposes. It contains all possible elements defined by the schema. --> - + D000000 From 583c3f49b87a34f0337ca35c2c33956d24729d71 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 15:41:33 -0800 Subject: [PATCH 16/39] expand test matrix to PHP 8.2 and 8.3 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fab0e5c..8ec2253 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - php-version: [8.1] + php-version: [8.1, 8.2, 8.3] steps: - uses: actions/checkout@v2 @@ -38,7 +38,7 @@ jobs: strategy: matrix: - php-version: [8.1] + php-version: [8.1, 8.2, 8.3] steps: - uses: actions/checkout@v2 From d15f0ab791c15c77b05e1b5acbde03589fbc7647 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 15:43:14 -0800 Subject: [PATCH 17/39] ditch PHP 8.1. update dependencies. --- .github/workflows/ci.yml | 4 ++-- composer.json | 2 +- composer.lock | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ec2253..f0ac6f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: - php-version: [8.1, 8.2, 8.3] + php-version: [8.2, 8.3] steps: - uses: actions/checkout@v2 @@ -38,7 +38,7 @@ jobs: strategy: matrix: - php-version: [8.1, 8.2, 8.3] + php-version: [8.2, 8.3] steps: - uses: actions/checkout@v2 diff --git a/composer.json b/composer.json index 94a8f72..c44c5fc 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=8.1" + "php": ">=8.2" }, "require-dev": { "mockery/mockery": "@stable", diff --git a/composer.lock b/composer.lock index dec0e18..d99f9be 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": "e91750a12181241cca0c36923768597e", + "content-hash": "65356ab6f769667fadefae399dfa38a1", "packages": [], "packages-dev": [ { @@ -757,16 +757,16 @@ }, { "name": "phpunit/phpunit", - "version": "11.0.2", + "version": "11.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "2f281e7e6776aea920cab5fc5a48d0fefbe1f39e" + "reference": "de24e7e7c67fbf437f7b6cd7bc919f2dc6fd89d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2f281e7e6776aea920cab5fc5a48d0fefbe1f39e", - "reference": "2f281e7e6776aea920cab5fc5a48d0fefbe1f39e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/de24e7e7c67fbf437f7b6cd7bc919f2dc6fd89d4", + "reference": "de24e7e7c67fbf437f7b6cd7bc919f2dc6fd89d4", "shasum": "" }, "require": { @@ -837,7 +837,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/11.0.2" + "source": "https://github.com/sebastianbergmann/phpunit/tree/11.0.3" }, "funding": [ { @@ -853,7 +853,7 @@ "type": "tidelift" } ], - "time": "2024-02-04T09:09:14+00:00" + "time": "2024-02-10T06:31:16+00:00" }, { "name": "psr/container", @@ -2040,7 +2040,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=8.1" + "php": ">=8.2" }, "platform-dev": [], "plugin-api-version": "2.6.0" From c590765fb79be774f9c144326be3fa98a26385bc Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 15:58:32 -0800 Subject: [PATCH 18/39] https it is. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c44c5fc..5e495e3 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "Ilios", "MeSH" ], - "homepage": "http://iliosproject.org/", + "homepage": "https://iliosproject.org/", "license": "MIT", "authors": [ { From 573650fc8deac3be07b9d0d936322f965c54130d Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 16:04:54 -0800 Subject: [PATCH 19/39] add PHPStan to the mix. --- composer.json | 3 ++- composer.lock | 64 ++++++++++++++++++++++++++++++++++++++++++++++- phpstan.dist.neon | 5 ++++ 3 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 phpstan.dist.neon diff --git a/composer.json b/composer.json index 5e495e3..20f463a 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,8 @@ "mockery/mockery": "@stable", "phpunit/phpunit": "@stable", "squizlabs/php_codesniffer": "@stable", - "fakerphp/faker": "@stable" + "fakerphp/faker": "@stable", + "phpstan/phpstan": "^1.10" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index d99f9be..7c1f96d 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": "65356ab6f769667fadefae399dfa38a1", + "content-hash": "20db6827045e7ea08355e3f6f33f7ae6", "packages": [], "packages-dev": [ { @@ -432,6 +432,68 @@ }, "time": "2022-02-21T01:04:05+00:00" }, + { + "name": "phpstan/phpstan", + "version": "1.10.58", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "a23518379ec4defd9e47cbf81019526861623ec2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/a23518379ec4defd9e47cbf81019526861623ec2", + "reference": "a23518379ec4defd9e47cbf81019526861623ec2", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2024-02-12T20:02:57+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "11.0.0", diff --git a/phpstan.dist.neon b/phpstan.dist.neon new file mode 100644 index 0000000..46b0f47 --- /dev/null +++ b/phpstan.dist.neon @@ -0,0 +1,5 @@ +parameters: + level: 5 + paths: + - src + - tests From 8aeddfcf4aa2cc7090282093ae4cd67a0f0f64f6 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 16:11:46 -0800 Subject: [PATCH 20/39] declare the XMLWriter PHP extension as requirement. --- composer.json | 3 ++- composer.lock | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 20f463a..017e66c 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,8 @@ } ], "require": { - "php": ">=8.2" + "php": ">=8.2", + "ext-xmlreader": "*" }, "require-dev": { "mockery/mockery": "@stable", diff --git a/composer.lock b/composer.lock index 7c1f96d..8a7413e 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": "20db6827045e7ea08355e3f6f33f7ae6", + "content-hash": "c0a888e89bb364d1ef17e673e7f2a763", "packages": [], "packages-dev": [ { @@ -2102,7 +2102,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=8.2" + "php": ">=8.2", + "ext-xmlreader": "*" }, "platform-dev": [], "plugin-api-version": "2.6.0" From 9407b30e2aaf2eaea6e7460c6ce6c2bd04047b8b Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 16:13:10 -0800 Subject: [PATCH 21/39] declare the DOM PHP extension as requirement. --- composer.json | 1 + composer.lock | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 017e66c..36f3df0 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ ], "require": { "php": ">=8.2", + "ext-dom": "*", "ext-xmlreader": "*" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 8a7413e..80cebcf 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": "c0a888e89bb364d1ef17e673e7f2a763", + "content-hash": "fdb9edf3338640916c5ad54063fda48f", "packages": [], "packages-dev": [ { @@ -2103,6 +2103,7 @@ "prefer-lowest": false, "platform": { "php": ">=8.2", + "ext-dom": "*", "ext-xmlreader": "*" }, "platform-dev": [], From 4d019ca859ea10b4f6d470f84d3bc3f74855c0e3 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 16:20:20 -0800 Subject: [PATCH 22/39] cleanup the Parser class. - add type hints where missing - simplify paths via imports - An vs a - drop unnecessary function args where defaults suffice - fix up code comments --- src/Ilios/MeSH/Parser.php | 73 ++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/src/Ilios/MeSH/Parser.php b/src/Ilios/MeSH/Parser.php index f27cd47..cb0be65 100644 --- a/src/Ilios/MeSH/Parser.php +++ b/src/Ilios/MeSH/Parser.php @@ -4,6 +4,10 @@ namespace Ilios\MeSH; +use DateTime; +use DateTimeZone; +use DOMNode; +use Exception; use Ilios\MeSH\Model\AllowableQualifier; use Ilios\MeSH\Model\Concept; use Ilios\MeSH\Model\ConceptRelation; @@ -12,6 +16,7 @@ use Ilios\MeSH\Model\EntryCombination; use Ilios\MeSH\Model\Reference; use Ilios\MeSH\Model\Term; +use XMLReader; /** * Class Parser @@ -90,58 +95,54 @@ class Parser public const PREFERRED_CONCEPT_YN = 'PreferredConceptYN'; public const RECORD_PREFERRED_TERM_YN = 'RecordPreferredTermYN'; public const RELATION_NAME = 'RelationName'; - - /** - * @var \XMLReader - */ - protected $reader; + protected XMLReader $reader; /** * Parser constructor. */ public function __construct() { - $this->reader = new \XMLReader(); + $this->reader = new XMLReader(); } /** * Parses a given descriptors XML file into an object model. - * @param string $uri An URI pointing at that file. + * @param string $uri A URI pointing at that file. * @return DescriptorSet The set of parsed descriptors. - * @throws \Exception + * @throws Exception */ - public function parse($uri) + public function parse(string $uri): DescriptorSet { - /* @var Concept */ + /* @var Concept $currentConcept */ $currentConcept = null; - /* @var AllowableQualifier */ + /* @var AllowableQualifier $currentAllowableQualifier */ $currentAllowableQualifier = null; - /* @var ConceptRelation */ + /* @var ConceptRelation $currentConceptRelation */ $currentConceptRelation = null; - /* @var Descriptor */ + /* @var Descriptor $currentDescriptor */ $currentDescriptor = null; - /* @var EntryCombination */ + /* @var EntryCombination $currentEntryCombination */ $currentEntryCombination = null; - /* @var Reference */ + /* @var Reference $currentDescriptorReference */ $currentDescriptorReference = null; - /* @var Reference */ + /* @var Reference $currentConceptReference */ $currentConceptReference = null; - /* @var Reference */ + /* @var Reference $currentQualifierReference */ $currentQualifierReference = null; - /* @var Term */ + /* @var Term $currentTerm */ $currentTerm = null; $descriptors = new DescriptorSet(); $reader = $this->reader; if (!@$reader->open($uri)) { - throw new \Exception('XML reader failed to open ' . $uri . '.'); - }; + throw new Exception('XML reader failed to open ' . $uri . '.'); + } // start reading the XML File. while ($reader->read()) { $nodeType = $reader->nodeType; - if (\XMLReader::ELEMENT === $nodeType) { + if (XMLReader::ELEMENT === $nodeType) { switch ($reader->name) { case self::ABBREVIATION: $abbreviation = $this->getNodeContents($reader); @@ -350,7 +351,7 @@ public function parse($uri) $currentDescriptor->addTreeNumber($number); break; } - } elseif (\XMLReader::END_ELEMENT === $nodeType) { + } elseif (XMLReader::END_ELEMENT === $nodeType) { switch ($reader->name) { case self::ALLOWABLE_QUALIFIER: $currentAllowableQualifier->setQualifierReference($currentQualifierReference); @@ -407,11 +408,11 @@ public function parse($uri) } /** - * @param \DOMNode $node - * @return \DateTime - * @throws \Exception + * @param DOMNode $node + * @return DateTime + * @throws Exception */ - protected function getDateFromNode(\DOMNode $node) + protected function getDateFromNode(DOMNode $node): DateTime { $children = $node->childNodes; $ymd = []; @@ -429,24 +430,24 @@ protected function getDateFromNode(\DOMNode $node) } } if (3 !== count($ymd)) { - throw new \Exception( + throw new Exception( sprintf('Could not retrieve Year/Month/Day info from node "%s".', $node->nodeName) ); } - $dt = new \DateTime(); - $dt->setTimezone(new \DateTimeZone('UTC')); - $dt->setTime(0, 0, 0); + $dt = new DateTime(); + $dt->setTimezone(new DateTimeZone('UTC')); + $dt->setTime(0, 0); $dt->setDate($ymd['year'], $ymd['month'], $ymd['day']); return $dt; } /** - * @param \DOMNode $node + * @param DOMNode $node * @return string - * @throws \Exception + * @throws Exception */ - protected function getStringNodeContents(\DOMNode $node) + protected function getStringNodeContents(DOMNode $node): string { $children = $node->childNodes; $contents = false; @@ -457,7 +458,7 @@ protected function getStringNodeContents(\DOMNode $node) } } if (false === $contents) { - throw new \Exception( + throw new Exception( sprintf('Node "%s" does not contain a child node of type "String".', $node->nodeName) ); } @@ -469,10 +470,10 @@ protected function getStringNodeContents(\DOMNode $node) * Wrapper around XMLReader::readString() that trims any * whitespace off of node contents. * - * @param \XMLReader $reader + * @param XMLReader $reader * @return string */ - protected function getNodeContents(\XMLReader $reader) + protected function getNodeContents(XMLReader $reader): string { return trim($reader->readString()); } From 7449a01eb56ae83788dfe6825be4c9b729f4cd96 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 16:24:02 -0800 Subject: [PATCH 23/39] rm unused class constants. --- src/Ilios/MeSH/Parser.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/Ilios/MeSH/Parser.php b/src/Ilios/MeSH/Parser.php index cb0be65..49243cb 100644 --- a/src/Ilios/MeSH/Parser.php +++ b/src/Ilios/MeSH/Parser.php @@ -28,16 +28,13 @@ class Parser // Elements public const ABBREVIATION = 'Abbreviation'; public const ALLOWABLE_QUALIFIER = 'AllowableQualifier'; - public const ALLOWABLE_QUALIFIER_LIST = 'AllowableQualifiersList'; public const ANNOTATION = 'Annotation'; public const CASN1_NAME = 'CASN1Name'; public const CONCEPT = 'Concept'; public const CONCEPT1_UI = 'Concept1UI'; public const CONCEPT2_UI = 'Concept2UI'; - public const CONCEPT_LIST = 'ConceptList'; public const CONCEPT_NAME = 'ConceptName'; public const CONCEPT_RELATION = 'ConceptRelation'; - public const CONCEPT_RELATION_LIST = 'ConceptRelationList'; public const CONCEPT_UI = 'ConceptUI'; public const CONSIDER_ALSO = 'ConsiderAlso'; public const DATE_CREATED = 'DateCreated'; @@ -47,43 +44,34 @@ class Parser public const DESCRIPTOR_NAME = 'DescriptorName'; public const DESCRIPTOR_RECORD = 'DescriptorRecord'; public const DESCRIPTOR_RECORD_SET = 'DescriptorRecordSet'; - public const DESCRIPTOR_REFERRED_TO = 'DescriptorReferredTo'; public const DESCRIPTOR_UI = 'DescriptorUI'; public const ECIN = 'ECIN'; public const ECOUT = 'ECOUT'; public const ENTRY_COMBINATION = 'EntryCombination'; - public const ENTRY_COMBINATION_LIST = 'EntryCombinationList'; public const ENTRY_VERSION = 'EntryVersion'; public const HISTORY_NOTE = 'HistoryNote'; public const MONTH = 'Month'; public const NLM_CLASSIFICATION_NUMBER = 'NLMClassificationNumber'; public const ONLINE_NOTE = 'OnlineNote'; public const PHARMACOLOGICAL_ACTION = 'PharmacologicalAction'; - public const PHARMACOLOGICAL_ACTION_LIST = 'PharmacologicalActionList'; public const PREVIOUS_INDEXING = 'PreviousIndexing'; - public const PREVIOUS_INDEXING_LIST = 'PreviousIndexingList'; public const PUBLIC_MESH_NOTE = 'PublicMeSHNote'; public const QUALIFIER_NAME = 'QualifierName'; public const QUALIFIER_REFERRED_TO = 'QualifierReferredTo'; public const QUALIFIER_UI = 'QualifierUI'; public const REGISTRY_NUMBER = 'RegistryNumber'; public const RELATED_REGISTRY_NUMBER = 'RelatedRegistryNumber'; - public const RELATED_REGISTRY_NUMBER_LIST = 'RelatedRegistryNumberList'; public const SCOPE_NOTE = 'ScopeNote'; public const SEE_RELATED_DESCRIPTOR = 'SeeRelatedDescriptor'; - public const SEE_RELATED_LIST = 'SeeRelatedList'; public const SORT_VERSION = 'SortVersion'; public const STRING = 'String'; public const TERM = 'Term'; - public const TERM_LIST = 'TermList'; public const TERM_NOTE = 'TermNote'; public const TERM_UI = 'TermUI'; public const THESAURUS_ID = 'ThesaurusID'; - public const THESAURUS_ID_LIST = 'ThesaurusIDlist'; public const TRANSLATORS_ENGLISH_SCOPE_NOTE = 'TranslatorsEnglishScopeNote'; public const TRANSLATORS_SCOPE_NOTE = 'TranslatorsScopeNote'; public const TREE_NUMBER = 'TreeNumber'; - public const TREE_NUMBER_LIST = 'TreeNumberList'; public const YEAR = 'Year'; // Attributes From 510c548b68e025aa4bb8f6b4cebb71225cb47e99 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 16:29:21 -0800 Subject: [PATCH 24/39] consolidate case statements with same body. --- src/Ilios/MeSH/Parser.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Ilios/MeSH/Parser.php b/src/Ilios/MeSH/Parser.php index 49243cb..ee9f441 100644 --- a/src/Ilios/MeSH/Parser.php +++ b/src/Ilios/MeSH/Parser.php @@ -232,9 +232,6 @@ public function parse(string $uri): DescriptorSet } break; case self::ECIN: - $currentDescriptorReference = new Reference(); - $currentQualifierReference = new Reference(); - break; case self::ECOUT: $currentDescriptorReference = new Reference(); $currentQualifierReference = new Reference(); @@ -259,6 +256,7 @@ public function parse(string $uri): DescriptorSet $currentDescriptor->setOnlineNote($note); break; case self::PHARMACOLOGICAL_ACTION: + case self::SEE_RELATED_DESCRIPTOR: $currentDescriptorReference = new Reference(); break; case self::PREVIOUS_INDEXING: @@ -292,9 +290,6 @@ public function parse(string $uri): DescriptorSet $note = $this->getNodeContents($reader); $currentConcept->setScopeNote($note); break; - case self::SEE_RELATED_DESCRIPTOR: - $currentDescriptorReference = new Reference(); - break; case self::SORT_VERSION: $version = $this->getNodeContents($reader); $currentTerm->setSortVersion($version); From c08bd30355952013cd902af5bc4462346ea95a42 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 16:48:02 -0800 Subject: [PATCH 25/39] rm dead code branch. courtesy of PHPStan lvl 5. explanation: that local variable was never instantiated as a Reference object, thus remaining NULL throughout parsing, thus the if conditional was always evaluating to FALSE. turns out that we don't need to local Referencevariable after all - we want to set concept id (UI) and name directly on the Concept object. which we've been doing. in sum - not a bugfix, just cleanup. --- src/Ilios/MeSH/Parser.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Ilios/MeSH/Parser.php b/src/Ilios/MeSH/Parser.php index ee9f441..c1f699f 100644 --- a/src/Ilios/MeSH/Parser.php +++ b/src/Ilios/MeSH/Parser.php @@ -113,8 +113,6 @@ public function parse(string $uri): DescriptorSet $currentEntryCombination = null; /* @var Reference $currentDescriptorReference */ $currentDescriptorReference = null; - /* @var Reference $currentConceptReference */ - $currentConceptReference = null; /* @var Reference $currentQualifierReference */ $currentQualifierReference = null; /* @var Term $currentTerm */ @@ -165,11 +163,7 @@ public function parse(string $uri): DescriptorSet break; case self::CONCEPT_NAME: $name = $this->getStringNodeContents($reader->expand()); - if ($currentConceptReference) { - $currentConceptReference->setName($name); - } else { - $currentConcept->setName($name); - } + $currentConcept->setName($name); break; case self::CONCEPT_RELATION: $currentConceptRelation = new ConceptRelation(); @@ -180,11 +174,7 @@ public function parse(string $uri): DescriptorSet break; case self::CONCEPT_UI: $ui = $this->getNodeContents($reader); - if ($currentConceptReference) { - $currentConceptReference->setUi($ui); - } else { - $currentConcept->setUi($ui); - } + $currentConcept->setUi($ui); break; case self::CONSIDER_ALSO: $also = $this->getNodeContents($reader); From d7c4b57872639becc48c2dd82af1ce906cedd2ba Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 16:53:12 -0800 Subject: [PATCH 26/39] update file name in code example. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5378935..a0566ec 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ require __DIR__ . '/vendor/autoload.php'; // provide a URL or a local file path. //$uri = 'https://nlmpubs.nlm.nih.gov/projects/mesh/MESH_FILES/xmlmesh/desc2024.xml'; -$uri = __DIR__ . '/desc2019.xml'; +$uri = __DIR__ . '/desc2024.xml'; // instantiate the parser and parse the input. $parser = new \Ilios\MeSH\Parser(); From 0a32f402c78e0223b32d70e8a708a97f0fc05bb0 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 17:03:44 -0800 Subject: [PATCH 27/39] dial in PHPCS config and streamline linting step in the CI. exclude the vendor dir. in the CI, lint all configured dirs in one step. --- .github/workflows/ci.yml | 6 ++---- phpcs.xml.dist | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0ac6f3..fe3f4f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,10 +26,8 @@ jobs: php-version: ${{ matrix.php-version }} - name: install dependencies run: composer install --no-interaction --prefer-dist - - name: lint src - run: bin/phpcs src - - name: lint tests - run: bin/phpcs tests + - name: lint PHP + run: bin/phpcs tests: name: PHPUnit Tests diff --git a/phpcs.xml.dist b/phpcs.xml.dist index e73b4da..dcbb514 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -15,4 +15,5 @@ bin/ src/ tests/ + vendor From 8774940e81bafe3a7a349e4ba5f18f64fe0036cc Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 17:06:04 -0800 Subject: [PATCH 28/39] run PHPStan in the CI pipeline. --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe3f4f7..f4e020f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,8 @@ jobs: run: composer install --no-interaction --prefer-dist - name: lint PHP run: bin/phpcs + - name: static code analysis + run: bin/phpstan tests: name: PHPUnit Tests From 638ae8908ab343ff721195f6834314e02475be43 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Mon, 12 Feb 2024 17:07:59 -0800 Subject: [PATCH 29/39] update actions/checkout to v4 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4e020f..5e5f10a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: php-version: [8.2, 8.3] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use PHP ${{ matrix.php-version }} uses: shivammathur/setup-php@v2 with: @@ -41,7 +41,7 @@ jobs: php-version: [8.2, 8.3] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use PHP ${{ matrix.php-version }} uses: shivammathur/setup-php@v2 with: From 66418e5911628183d5779550546467010c18b7df Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Tue, 13 Feb 2024 08:54:48 -0800 Subject: [PATCH 30/39] initalize nullable class member to null. --- src/Ilios/MeSH/Model/Descriptor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ilios/MeSH/Model/Descriptor.php b/src/Ilios/MeSH/Model/Descriptor.php index 0b299e1..28f1834 100644 --- a/src/Ilios/MeSH/Model/Descriptor.php +++ b/src/Ilios/MeSH/Model/Descriptor.php @@ -30,7 +30,7 @@ class Descriptor extends Reference protected ?string $onlineNote = null; - protected ?string $publicMeshNote; + protected ?string $publicMeshNote = null; protected array $previousIndexing = []; From d07af8837328a39d993eae24c695765112576203 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Tue, 13 Feb 2024 09:06:18 -0800 Subject: [PATCH 31/39] updates model tests to invoke getter/setters tests for nullable attributes. --- tests/Ilios/MeSH/Model/ConceptRelationTest.php | 2 +- tests/Ilios/MeSH/Model/ConceptTest.php | 10 +++++----- tests/Ilios/MeSH/Model/DescriptorSetTest.php | 2 +- tests/Ilios/MeSH/Model/DescriptorTest.php | 16 ++++++++-------- tests/Ilios/MeSH/Model/EntryCombinationTest.php | 2 +- tests/Ilios/MeSH/Model/TermTest.php | 10 +++++----- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/tests/Ilios/MeSH/Model/ConceptRelationTest.php b/tests/Ilios/MeSH/Model/ConceptRelationTest.php index 5e54f9f..37a6eb3 100644 --- a/tests/Ilios/MeSH/Model/ConceptRelationTest.php +++ b/tests/Ilios/MeSH/Model/ConceptRelationTest.php @@ -30,7 +30,7 @@ public function tearDown(): void public function testGetSetName(): void { - $this->basicSetTest($this->object, 'name', 'string'); + $this->basicSetTest($this->object, 'name', 'string', true); } public function testGetSetConcept1Ui(): void diff --git a/tests/Ilios/MeSH/Model/ConceptTest.php b/tests/Ilios/MeSH/Model/ConceptTest.php index 671d90b..c388106 100644 --- a/tests/Ilios/MeSH/Model/ConceptTest.php +++ b/tests/Ilios/MeSH/Model/ConceptTest.php @@ -41,27 +41,27 @@ public function testIsSetPreferred(): void public function testGetSetCasn1Name(): void { - $this->basicSetTest($this->object, 'casn1Name', 'string'); + $this->basicSetTest($this->object, 'casn1Name', 'string', true); } public function testGetSetRegistryNumber(): void { - $this->basicSetTest($this->object, 'registryNumber', 'string'); + $this->basicSetTest($this->object, 'registryNumber', 'string', true); } public function testGetSetScopeNote(): void { - $this->basicSetTest($this->object, 'scopeNote', 'string'); + $this->basicSetTest($this->object, 'scopeNote', 'string', true); } public function testGetSetTranslatorsEnglishScopeNote(): void { - $this->basicSetTest($this->object, 'translatorsEnglishScopeNote', 'string'); + $this->basicSetTest($this->object, 'translatorsEnglishScopeNote', 'string', true); } public function testGetSetTranslatorsScopeNote(): void { - $this->basicSetTest($this->object, 'translatorsScopeNote', 'string'); + $this->basicSetTest($this->object, 'translatorsScopeNote', 'string', true); } public function testAddGetRelatedRegistryNumbers(): void diff --git a/tests/Ilios/MeSH/Model/DescriptorSetTest.php b/tests/Ilios/MeSH/Model/DescriptorSetTest.php index 7f2c507..68e0ce8 100644 --- a/tests/Ilios/MeSH/Model/DescriptorSetTest.php +++ b/tests/Ilios/MeSH/Model/DescriptorSetTest.php @@ -30,7 +30,7 @@ public function testConstructor(): void public function testGetSetLanguageCode(): void { - $this->basicSetTest($this->object, 'languageCode', 'string'); + $this->basicSetTest($this->object, 'languageCode', 'string', true); } public function testAddGetDescriptors(): void diff --git a/tests/Ilios/MeSH/Model/DescriptorTest.php b/tests/Ilios/MeSH/Model/DescriptorTest.php index be2652e..6d9c8ed 100644 --- a/tests/Ilios/MeSH/Model/DescriptorTest.php +++ b/tests/Ilios/MeSH/Model/DescriptorTest.php @@ -41,12 +41,12 @@ public function testGetSetDateCreated(): void public function testGetSetDateRevised(): void { - $this->basicSetTest($this->object, 'dateRevised', 'datetime'); + $this->basicSetTest($this->object, 'dateRevised', 'datetime', true); } public function testGetSetDateEstablished(): void { - $this->basicSetTest($this->object, 'dateEstablished', 'datetime'); + $this->basicSetTest($this->object, 'dateEstablished', 'datetime', true); } public function testAddGetAllowableQualifiers(): void @@ -56,27 +56,27 @@ public function testAddGetAllowableQualifiers(): void public function testGetSetAnnotation(): void { - $this->basicSetTest($this->object, 'annotation', 'string'); + $this->basicSetTest($this->object, 'annotation', 'string', true); } public function testGetSetHistoryNote(): void { - $this->basicSetTest($this->object, 'historyNote', 'string'); + $this->basicSetTest($this->object, 'historyNote', 'string', true); } public function testNlmClassificationNumber(): void { - $this->basicSetTest($this->object, 'nlmClassificationNumber', 'string'); + $this->basicSetTest($this->object, 'nlmClassificationNumber', 'string', true); } public function testGetSetOnlineNote(): void { - $this->basicSetTest($this->object, 'onlineNote', 'string'); + $this->basicSetTest($this->object, 'onlineNote', 'string', true); } public function testGetSetPublicMeshNote(): void { - $this->basicSetTest($this->object, 'publicMeshNote', 'string'); + $this->basicSetTest($this->object, 'publicMeshNote', 'string', true); } public function testAddGetPreviousIndexing(): void @@ -96,7 +96,7 @@ public function testAddGetRelatedDescriptors(): void public function testGetSetConsiderAlso(): void { - $this->basicSetTest($this->object, 'considerAlso', 'string'); + $this->basicSetTest($this->object, 'considerAlso', 'string', true); } public function testAddGetPharmacologicalAction(): void diff --git a/tests/Ilios/MeSH/Model/EntryCombinationTest.php b/tests/Ilios/MeSH/Model/EntryCombinationTest.php index 4f66322..d53a901 100644 --- a/tests/Ilios/MeSH/Model/EntryCombinationTest.php +++ b/tests/Ilios/MeSH/Model/EntryCombinationTest.php @@ -45,6 +45,6 @@ public function testGetSetQualifierIn(): void public function testGetSetQualifierOut(): void { - $this->modelSetTest($this->object, 'qualifierOut', 'Reference'); + $this->modelSetTest($this->object, 'qualifierOut', 'Reference', true); } } diff --git a/tests/Ilios/MeSH/Model/TermTest.php b/tests/Ilios/MeSH/Model/TermTest.php index b91649c..cb201b3 100644 --- a/tests/Ilios/MeSH/Model/TermTest.php +++ b/tests/Ilios/MeSH/Model/TermTest.php @@ -49,17 +49,17 @@ public function testGetSetLexicalTag(): void public function testGetSetAbbreviation(): void { - $this->basicSetTest($this->object, 'abbreviation', 'string'); + $this->basicSetTest($this->object, 'abbreviation', 'string', true); } public function testGetSetSortVersion(): void { - $this->basicSetTest($this->object, 'sortVersion', 'string'); + $this->basicSetTest($this->object, 'sortVersion', 'string', true); } public function testGetSetEntryVersion(): void { - $this->basicSetTest($this->object, 'entryVersion', 'string'); + $this->basicSetTest($this->object, 'entryVersion', 'string', true); } public function testAddGetThesaurusIds(): void @@ -69,12 +69,12 @@ public function testAddGetThesaurusIds(): void public function testGetSetNote(): void { - $this->basicSetTest($this->object, 'note', 'string'); + $this->basicSetTest($this->object, 'note', 'string', true); } public function testGetDateCreated(): void { - $this->basicSetTest($this->object, 'dateCreated', 'datetime'); + $this->basicSetTest($this->object, 'dateCreated', 'datetime', true); } public function testGetSetUi(): void From f4f66aaeaf68745fec97d39d28eb8f13ee6f06fd Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Tue, 13 Feb 2024 09:21:43 -0800 Subject: [PATCH 32/39] configure PHPUnit for code coverage. --- .gitignore | 1 + phpunit.xml.dist | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/.gitignore b/.gitignore index 5aa5031..da1de6b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /vendor/ .phpunit.cache .phpcs-cache +html-coverage diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 15c3bed..b433c60 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -15,4 +15,19 @@ tests + + + + src + + + + + From 97885cec89a00a2488541e3f1ca7c65afb741c7f Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Tue, 13 Feb 2024 09:32:56 -0800 Subject: [PATCH 33/39] update setter/getter test helper for object attrs that can be nulled. --- tests/Ilios/MeSH/Model/BaseTestCase.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/Ilios/MeSH/Model/BaseTestCase.php b/tests/Ilios/MeSH/Model/BaseTestCase.php index 480460a..c67cb6f 100644 --- a/tests/Ilios/MeSH/Model/BaseTestCase.php +++ b/tests/Ilios/MeSH/Model/BaseTestCase.php @@ -136,8 +136,9 @@ protected function basicSetTest(object $model, string $property, string $type, b * @param object $model * @param string $property * @param string $modelName + * @param bool $nullable if TRUE then an additional getter/setter check for NULL is performed. */ - protected function modelSetTest(object $model, string $property, string $modelName): void + protected function modelSetTest(object $model, string $property, string $modelName, bool $nullable = false): void { $setMethod = $this->getSetMethodForProperty($property); $getMethod = $this->getGetMethodForProperty($property); @@ -146,6 +147,10 @@ protected function modelSetTest(object $model, string $property, string $modelNa $expected = m::mock('Ilios\\MeSH\\Model\\' . $modelName); $model->$setMethod($expected); $this->assertSame($expected, $model->$getMethod()); + if ($nullable) { + $model->$setMethod(null); + $this->assertNull($model->$getMethod()); + } } /** From d2f01a5854211f5847580afce76caccb8facb140 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Tue, 13 Feb 2024 09:50:31 -0800 Subject: [PATCH 34/39] adds dependabot configuration. copied and stripped down from ilios/ilios. --- .github/dependabot.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..cbbea24 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: + - package-ecosystem: composer + directory: "/" + schedule: + interval: daily + time: "02:30" + timezone: America/Los_Angeles + open-pull-requests-limit: 10 + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily + time: "02:30" + timezone: America/Los_Angeles + open-pull-requests-limit: 10 \ No newline at end of file From 6ce9da8d4a7dd479af50cbb20b3fffcaad11db05 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Tue, 13 Feb 2024 09:54:09 -0800 Subject: [PATCH 35/39] git ignore phpunit.xml file. --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index da1de6b..c100886 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ *~ *.patch /bin/* +/html-coverage/ /vendor/ .phpunit.cache .phpcs-cache -html-coverage +phpunit.xml + From 351eec9c7ca66cdc65b8f746311ba208ca166f60 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Tue, 13 Feb 2024 15:17:03 -0800 Subject: [PATCH 36/39] put all remaining model attrs under test coverage. --- tests/Ilios/MeSH/ParserTest.php | 5 +++++ tests/Ilios/MeSH/desc.xml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/Ilios/MeSH/ParserTest.php b/tests/Ilios/MeSH/ParserTest.php index 8fe35b9..cb12406 100644 --- a/tests/Ilios/MeSH/ParserTest.php +++ b/tests/Ilios/MeSH/ParserTest.php @@ -167,6 +167,8 @@ public function testParse(): void $this->assertEquals('a casn1 name', $concept->getCasn1Name()); $this->assertEquals('00000AAAAA', $concept->getRegistryNumber()); $this->assertEquals('a scope note', $concept->getScopeNote()); + $this->assertEquals('something in English.', $concept->getTranslatorsEnglishScopeNote()); + $this->assertEquals('i got nothing', $concept->getTranslatorsScopeNote()); $registryNumbers = $concept->getRelatedRegistryNumbers(); $this->assertEquals(1, count($registryNumbers)); @@ -187,6 +189,9 @@ public function testParse(): void $this->assertEquals('T000001', $terms[0]->getUi()); $this->assertEquals('a term', $terms[0]->getName()); $this->assertEquals('1999/01/01', $terms[0]->getDateCreated()->format('Y/m/d')); + $this->assertEquals('IDK', $terms[0]->getAbbreviation()); + $this->assertEquals('lorem ipsum', $terms[0]->getSortVersion()); + $this->assertEquals('foo bar', $terms[0]->getEntryVersion()); $thesaurusIds = $terms[0]->getThesaurusIds(); $this->assertEquals(2, count($thesaurusIds)); diff --git a/tests/Ilios/MeSH/desc.xml b/tests/Ilios/MeSH/desc.xml index f74e3ec..3d5c25a 100644 --- a/tests/Ilios/MeSH/desc.xml +++ b/tests/Ilios/MeSH/desc.xml @@ -135,6 +135,8 @@ It contains all possible elements defined by the schema. a casn1 name 00000AAAAA a scope note + something in English. + i got nothing a related registry number @@ -153,6 +155,9 @@ It contains all possible elements defined by the schema. 01 01 + IDK + lorem ipsum + foo bar a thesaurus id another thesaurus id From b33920c0fc002d36c71e583f1981f4f3f4503dca Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Tue, 13 Feb 2024 15:49:55 -0800 Subject: [PATCH 37/39] change dependabot interval from daily to weekly. --- .github/dependabot.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index cbbea24..94ffa3b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -3,14 +3,16 @@ updates: - package-ecosystem: composer directory: "/" schedule: - interval: daily + interval: weekly + day: "sunday" time: "02:30" timezone: America/Los_Angeles open-pull-requests-limit: 10 - package-ecosystem: github-actions directory: "/" schedule: - interval: daily + interval: weekly + day: "sunday" time: "02:30" timezone: America/Los_Angeles open-pull-requests-limit: 10 \ No newline at end of file From dbd97cdc2e4f202ad8b5cd5a37319670beee447e Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Tue, 13 Feb 2024 15:51:24 -0800 Subject: [PATCH 38/39] adds dependency update workflow. straight outta Ilios --- .github/workflows/update_dependencies.yml | 55 +++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/update_dependencies.yml diff --git a/.github/workflows/update_dependencies.yml b/.github/workflows/update_dependencies.yml new file mode 100644 index 0000000..a91db12 --- /dev/null +++ b/.github/workflows/update_dependencies.yml @@ -0,0 +1,55 @@ +name: Update Dependencies + +on: + workflow_dispatch: + schedule: + - cron: '15 14 * * 1' # weekly, on Monday morning (UTC) + +env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ILIOS_DEPLOYMENT_WEBHOOK_URL }} + +jobs: + update: + name: Tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Use PHP 8.2 + uses: shivammathur/setup-php@v2 + with: + coverage: none + php-version: 8.2 + extensions: apcu + - name: install composer-lock-diff + run: composer global require davidrjonas/composer-lock-diff + - name: update dependencies + run: composer update + - name: Prepare Messages + id: vars + run: | + lockDiff="$(composer-lock-diff --md)" + # We have to manually escape new lines + lockDiff="${lockDiff//$'\n'/'%0A'}" + echo ::set-output name=pr_title::"Update Dependencies" + echo ::set-output name=commit_message::"Update Dependencies \ + + + ${lockDiff}." + echo ::set-output name=pr_body::"${lockDiff}" + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.ZORGBORT_TOKEN }} + title: ${{ steps.vars.outputs.pr_title }} + body: ${{ steps.vars.outputs.pr_body }} + commit-message: ${{ steps.vars.outputs.commit_message }} + branch: auto-update-dependencies + committer: Zorgbort + author: Zorgbort + labels: dependencies + - uses: act10ns/slack@v2.0.0 + with: + status: ${{ job.status }} + message: Update Dependency Job Failed {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }} + if: failure() From 05b99a6007a637bde8038687ac126ba4363a4e41 Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Tue, 13 Feb 2024 16:01:04 -0800 Subject: [PATCH 39/39] rm pointless docblocks. --- tests/Ilios/MeSH/Model/BaseTestCase.php | 29 ------------------------- 1 file changed, 29 deletions(-) diff --git a/tests/Ilios/MeSH/Model/BaseTestCase.php b/tests/Ilios/MeSH/Model/BaseTestCase.php index c67cb6f..aa2063d 100644 --- a/tests/Ilios/MeSH/Model/BaseTestCase.php +++ b/tests/Ilios/MeSH/Model/BaseTestCase.php @@ -32,65 +32,36 @@ protected function getArrayOfMockObjects(string $className, int $count): array return $arr; } - /** - * @param string $property - * @return string - */ protected function getSetMethodForProperty(string $property): string { return 'set' . ucfirst($property); } - /** - * @param string $property - * @return string - */ protected function getGetMethodForProperty(string $property): string { return 'get' . ucfirst($property); } - /** - * @param string $property - * @return string - */ protected function getIsMethodForProperty(string $property): string { return 'is' . ucfirst($property); } - /** - * @param string $property - * @return string - */ protected function getHasMethodForProperty(string $property): string { return 'has' . ucfirst($property); } - /** - * @param string $property - * @return string - */ protected function getGetMethodForListProperty(string $property): string { return 'get' . ucfirst($property) . 's'; } - /** - * @param string $property - * @return string - */ protected function getAddMethodForProperty(string $property): string { return 'add' . ucfirst($property); } - /** - * @param string $type - * @return DateTime|float|int|bool|string - * @throws Exception - */ protected function getValueForType(string $type): mixed { $faker = faker::create();