From 03a5408fca7ae64d10a97590e00cffc6f3c0c15c Mon Sep 17 00:00:00 2001 From: George Steel Date: Tue, 11 Oct 2022 10:20:12 +0100 Subject: [PATCH 1/5] Add support for PHP 8.2, remove support for PHP 7.4 Signed-off-by: George Steel --- composer.json | 10 +-- composer.lock | 238 ++++++++++++++++---------------------------------- 2 files changed, 81 insertions(+), 167 deletions(-) diff --git a/composer.json b/composer.json index 9d350d56..dae05428 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "composer/package-versions-deprecated": true }, "platform": { - "php": "7.4.99" + "php": "8.0.99" } }, "extra": { @@ -32,21 +32,21 @@ } }, "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "ext-mbstring": "*", "laminas/laminas-servicemanager": "^3.14.0", "laminas/laminas-stdlib": "^3.13.0" }, "require-dev": { "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-crypt": "^3.5.1", + "laminas/laminas-crypt": "^3.8", "laminas/laminas-uri": "^2.9.1", "pear/archive_tar": "^1.4.14", "phpspec/prophecy-phpunit": "^2.0.1", - "phpunit/phpunit": "^9.5.24", + "phpunit/phpunit": "^9.5.25", "psalm/plugin-phpunit": "^0.17.0", "psr/http-factory": "^1.0.1", - "vimeo/psalm": "^4.27.0" + "vimeo/psalm": "^4.28" }, "conflict": { "laminas/laminas-validator": "<2.10.1", diff --git a/composer.lock b/composer.lock index 4528e92d..0181eeb7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,25 +4,25 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a577014a6fa99d81c024471a53595042", + "content-hash": "b717356c4bc6b4ecb7d83a9558f9f63c", "packages": [ { "name": "laminas/laminas-servicemanager", - "version": "3.17.0", + "version": "3.19.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "360be5f16955dd1edbcce1cfaa98ed82a17f02ec" + "reference": "ed160729bb8721127efdaac799f9a298963345b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/360be5f16955dd1edbcce1cfaa98ed82a17f02ec", - "reference": "360be5f16955dd1edbcce1cfaa98ed82a17f02ec", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/ed160729bb8721127efdaac799f9a298963345b1", + "reference": "ed160729bb8721127efdaac799f9a298963345b1", "shasum": "" }, "require": { "laminas/laminas-stdlib": "^3.2.1", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/container": "^1.0" }, "conflict": { @@ -38,17 +38,16 @@ "container-interop/container-interop": "^1.2.0" }, "require-dev": { - "composer/package-versions-deprecated": "^1.0", + "composer/package-versions-deprecated": "^1.11.99.5", "laminas/laminas-coding-standard": "~2.4.0", "laminas/laminas-container-config-test": "^0.7", - "laminas/laminas-dependency-plugin": "^2.1.2", - "mikey179/vfsstream": "^1.6.10@alpha", - "ocramius/proxy-manager": "^2.11", - "phpbench/phpbench": "^1.1", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5.5", + "laminas/laminas-dependency-plugin": "^2.2", + "mikey179/vfsstream": "^1.6.11@alpha", + "ocramius/proxy-manager": "^2.14.1", + "phpbench/phpbench": "^1.2.6", + "phpunit/phpunit": "^9.5.25", "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.8" + "vimeo/psalm": "^4.28" }, "suggest": { "ocramius/proxy-manager": "ProxyManager ^2.1.1 to handle lazy initialization of services" @@ -95,35 +94,34 @@ "type": "community_bridge" } ], - "time": "2022-09-22T11:33:46+00:00" + "time": "2022-10-10T20:59:22+00:00" }, { "name": "laminas/laminas-stdlib", - "version": "3.13.0", + "version": "3.15.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "66a6d03c381f6c9f1dd988bf8244f9afb9380d76" + "reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/66a6d03c381f6c9f1dd988bf8244f9afb9380d76", - "reference": "66a6d03c381f6c9f1dd988bf8244f9afb9380d76", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/63b66bd4b696f024f42616b9d95cdb10e5109c27", + "reference": "63b66bd4b696f024f42616b9d95cdb10e5109c27", "shasum": "" }, "require": { - "php": "^7.4 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-stdlib": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", + "laminas/laminas-coding-standard": "^2.4.0", "phpbench/phpbench": "^1.2.6", - "phpstan/phpdoc-parser": "^0.5.4", - "phpunit/phpunit": "^9.5.23", + "phpunit/phpunit": "^9.5.25", "psalm/plugin-phpunit": "^0.17.0", - "vimeo/psalm": "^4.26" + "vimeo/psalm": "^4.28" }, "type": "library", "autoload": { @@ -155,7 +153,7 @@ "type": "community_bridge" } ], - "time": "2022-08-24T13:56:50+00:00" + "time": "2022-10-10T19:10:24+00:00" }, { "name": "psr/container", @@ -2821,30 +2819,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2865,9 +2863,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:46:02+00:00" }, { "name": "sebastian/cli-parser", @@ -3952,46 +3950,42 @@ }, { "name": "symfony/console", - "version": "v5.4.13", + "version": "v6.0.13", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be" + "reference": "8f14753b865651c2aad107ef97475740a9b0730f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be", - "reference": "3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be", + "url": "https://api.github.com/repos/symfony/console/zipball/8f14753b865651c2aad107ef97475740a9b0730f", + "reference": "8f14753b865651c2aad107ef97475740a9b0730f", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" + "symfony/string": "^5.4|^6.0" }, "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -4031,7 +4025,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.13" + "source": "https://github.com/symfony/console/tree/v6.0.13" }, "funding": [ { @@ -4047,29 +4041,29 @@ "type": "tidelift" } ], - "time": "2022-08-26T13:50:20+00:00" + "time": "2022-09-03T14:23:25+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -4098,7 +4092,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" }, "funding": [ { @@ -4114,7 +4108,7 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4446,85 +4440,6 @@ ], "time": "2022-05-24T11:49:31+00:00" }, - { - "name": "symfony/polyfill-php73", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" - }, { "name": "symfony/polyfill-php80", "version": "v1.26.0", @@ -4693,34 +4608,33 @@ }, { "name": "symfony/string", - "version": "v5.4.13", + "version": "v6.0.13", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "2900c668a32138a34118740de3e4d5a701801f53" + "reference": "65e99fb179e7241606377e4042cd2161f3dd1c05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/2900c668a32138a34118740de3e4d5a701801f53", - "reference": "2900c668a32138a34118740de3e4d5a701801f53", + "url": "https://api.github.com/repos/symfony/string/zipball/65e99fb179e7241606377e4042cd2161f3dd1c05", + "reference": "65e99fb179e7241606377e4042cd2161f3dd1c05", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.0" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -4759,7 +4673,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.13" + "source": "https://github.com/symfony/string/tree/v6.0.13" }, "funding": [ { @@ -4775,7 +4689,7 @@ "type": "tidelift" } ], - "time": "2022-09-01T01:52:16+00:00" + "time": "2022-09-02T08:05:03+00:00" }, { "name": "theseer/tokenizer", @@ -5106,12 +5020,12 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "ext-mbstring": "*" }, "platform-dev": [], "platform-overrides": { - "php": "7.4.99" + "php": "8.0.99" }, "plugin-api-version": "2.3.0" } From 748b1418f547579082709bbdcafe9cd788223136 Mon Sep 17 00:00:00 2001 From: George Steel Date: Tue, 11 Oct 2022 10:53:28 +0100 Subject: [PATCH 2/5] Remove `prophecy` in favour of native PHPUnit mocks Signed-off-by: George Steel --- composer.json | 1 - composer.lock | 121 +------------ psalm-baseline.xml | 46 +---- test/File/RenameUploadTest.php | 223 ++++++++++++------------ test/FilterPluginManagerFactoryTest.php | 124 ++++++------- 5 files changed, 177 insertions(+), 338 deletions(-) diff --git a/composer.json b/composer.json index dae05428..b9caf9da 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,6 @@ "laminas/laminas-crypt": "^3.8", "laminas/laminas-uri": "^2.9.1", "pear/archive_tar": "^1.4.14", - "phpspec/prophecy-phpunit": "^2.0.1", "phpunit/phpunit": "^9.5.25", "psalm/plugin-phpunit": "^0.17.0", "psr/http-factory": "^1.0.1", diff --git a/composer.lock b/composer.lock index 0181eeb7..8e2b2175 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": "b717356c4bc6b4ecb7d83a9558f9f63c", + "content-hash": "def98596547f3326fab4cd598b475413", "packages": [ { "name": "laminas/laminas-servicemanager", @@ -2066,125 +2066,6 @@ }, "time": "2022-03-15T21:29:03+00:00" }, - { - "name": "phpspec/prophecy", - "version": "v1.15.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" - }, - "time": "2021-12-08T12:19:24+00:00" - }, - { - "name": "phpspec/prophecy-phpunit", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy-phpunit.git", - "reference": "2d7a9df55f257d2cba9b1d0c0963a54960657177" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/2d7a9df55f257d2cba9b1d0c0963a54960657177", - "reference": "2d7a9df55f257d2cba9b1d0c0963a54960657177", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8", - "phpspec/prophecy": "^1.3", - "phpunit/phpunit": "^9.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\PhpUnit\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christophe Coevoet", - "email": "stof@notk.org" - } - ], - "description": "Integrating the Prophecy mocking library in PHPUnit test cases", - "homepage": "http://phpspec.net", - "keywords": [ - "phpunit", - "prophecy" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy-phpunit/issues", - "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.0.1" - }, - "time": "2020-07-09T08:33:42+00:00" - }, { "name": "phpstan/phpdoc-parser", "version": "1.5.1", diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 2dc6deab..7e54f52c 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -2323,54 +2323,23 @@ 1234 - - $args - $args - $mock - - - $dir - $input - - + removeDir - returnUnfilteredDataProvider - - $args - $dir - $dir + $filter($this->sourceFile) $filter($this->sourceFile) $filter($this->sourceFile) $filter($this->sourceFile) $firstResult - $targetFile - - [$renamedStream, 'reveal'] - - + $firstResult - $targetFile - - getStream - willThrow - - - $dir - $oldFilePathInfo['extension'] $oldFilePathInfo['extension'] - - $args - - - $filter - @@ -2398,23 +2367,20 @@ getServiceLocator - + $container $container $value $value - + testFactoryConfiguresPluginManagerUnderServiceManagerV2 - + $container $container - - $config - diff --git a/test/File/RenameUploadTest.php b/test/File/RenameUploadTest.php index 8fc2b745..b2bc64a5 100644 --- a/test/File/RenameUploadTest.php +++ b/test/File/RenameUploadTest.php @@ -7,16 +7,12 @@ use Laminas\Filter\Exception; use Laminas\Filter\File\RenameUpload as FileRenameUpload; use PHPUnit\Framework\TestCase; -use Prophecy\Argument; -use Prophecy\PhpUnit\ProphecyTrait; use Psr\Http\Message\StreamFactoryInterface; use Psr\Http\Message\StreamInterface; use Psr\Http\Message\UploadedFileFactoryInterface; use Psr\Http\Message\UploadedFileInterface; -use RuntimeException; use stdClass; -use function array_shift; use function basename; use function copy; use function glob; @@ -37,42 +33,30 @@ class RenameUploadTest extends TestCase { - use ProphecyTrait; - /** * Path to test files - * - * @var string */ - protected $filesPath; + private string $filesPath; /** - * Testfile - * - * @var string + * Test file */ - protected $sourceFile; + private string $sourceFile; /** - * Testfile - * - * @var string + * Test file */ - protected $targetFile; + private string $targetFile; /** - * Testdirectory - * - * @var string + * Test directory */ - protected $targetPath; + private string $targetPath; /** - * Testfile in Testdirectory - * - * @var string + * Test file in Test directory */ - protected $targetPathFile; + private string $targetPathFile; /** * Sets the path to test files @@ -99,7 +83,7 @@ public function tearDown(): void $this->removeDir($this->filesPath); } - protected function removeDir($dir) + private function removeDir(string $dir) { if (! is_dir($dir)) { return; @@ -112,7 +96,6 @@ protected function removeDir($dir) } if (is_dir($file)) { $this->removeDir($file); - continue; } } @@ -125,20 +108,20 @@ protected function removeDir($dir) public function testThrowsExceptionWithNonUploadedFile(): void { $filter = new FileRenameUpload($this->targetFile); - $this->assertSame($this->targetFile, $filter->getTarget()); - $this->assertSame('falsefile', $filter('falsefile')); + self::assertSame($this->targetFile, $filter->getTarget()); + self::assertSame('falsefile', $filter('falsefile')); $this->expectException(Exception\RuntimeException::class); $this->expectExceptionMessage('could not be renamed'); - $this->assertSame($this->targetFile, $filter($this->sourceFile)); + self::assertSame($this->targetFile, $filter($this->sourceFile)); } public function testOptions(): void { $filter = new FileRenameUpload($this->targetFile); - $this->assertSame($this->targetFile, $filter->getTarget()); - $this->assertFalse($filter->getUseUploadName()); - $this->assertFalse($filter->getOverwrite()); - $this->assertFalse($filter->getRandomize()); + self::assertSame($this->targetFile, $filter->getTarget()); + self::assertFalse($filter->getUseUploadName()); + self::assertFalse($filter->getOverwrite()); + self::assertFalse($filter->getRandomize()); $filter = new FileRenameUpload([ 'target' => $this->sourceFile, @@ -146,25 +129,25 @@ public function testOptions(): void 'overwrite' => true, 'randomize' => true, ]); - $this->assertSame($this->sourceFile, $filter->getTarget()); - $this->assertTrue($filter->getUseUploadName()); - $this->assertTrue($filter->getOverwrite()); - $this->assertTrue($filter->getRandomize()); + self::assertSame($this->sourceFile, $filter->getTarget()); + self::assertTrue($filter->getUseUploadName()); + self::assertTrue($filter->getOverwrite()); + self::assertTrue($filter->getRandomize()); } public function testStringConstructorParam(): void { $filter = new RenameUploadMock($this->targetFile); - $this->assertSame($this->targetFile, $filter->getTarget()); - $this->assertSame($this->targetFile, $filter($this->sourceFile)); - $this->assertSame('falsefile', $filter('falsefile')); + self::assertSame($this->targetFile, $filter->getTarget()); + self::assertSame($this->targetFile, $filter($this->sourceFile)); + self::assertSame('falsefile', $filter('falsefile')); } public function testStringConstructorWithFilesArray(): void { $filter = new RenameUploadMock($this->targetFile); - $this->assertSame($this->targetFile, $filter->getTarget()); - $this->assertSame( + self::assertSame($this->targetFile, $filter->getTarget()); + self::assertSame( [ 'tmp_name' => $this->targetFile, 'name' => $this->targetFile, @@ -174,7 +157,7 @@ public function testStringConstructorWithFilesArray(): void 'name' => $this->targetFile, ]) ); - $this->assertSame('falsefile', $filter('falsefile')); + self::assertSame('falsefile', $filter('falsefile')); } /** @@ -182,59 +165,68 @@ public function testStringConstructorWithFilesArray(): void */ public function testStringConstructorWithPsrFile(): void { - $sourceFile = $this->sourceFile; - $targetFile = $this->targetFile; - - $originalStream = $this->prophesize(StreamInterface::class); - $originalStream->getMetadata('uri')->willReturn($this->sourceFile); - - $originalFile = $this->prophesize(UploadedFileInterface::class); - $originalFile->getStream()->will(function ($args, $mock) use ($originalStream): object { - $mock->getStream()->willThrow(new RuntimeException('Cannot call getStream() more than once')); - return $originalStream->reveal(); - }); - $originalFile->getClientFilename()->willReturn($targetFile); - $originalFile - ->moveTo($targetFile) - ->will(function ($args) use ($sourceFile): void { - $targetFile = array_shift($args); - copy($sourceFile, $targetFile); - }) - ->shouldBeCalled(); - $originalFile->getClientMediaType()->willReturn(null); - - $renamedStream = $this->prophesize(StreamInterface::class); - $streamFactory = $this->prophesize(StreamFactoryInterface::class); - $streamFactory - ->createStreamFromFile($targetFile) - ->will([$renamedStream, 'reveal']); - - $renamedFile = $this->prophesize(UploadedFileInterface::class); - - $fileFactory = $this->prophesize(UploadedFileFactoryInterface::class); - $fileFactory - ->createUploadedFile( - Argument::that([$renamedStream, 'reveal']), + $originalStream = $this->createMock(StreamInterface::class); + $originalStream->expects(self::once()) + ->method('getMetadata') + ->with('uri') + ->willReturn($this->sourceFile); + + $originalFile = $this->createMock(UploadedFileInterface::class); + $originalFile->expects(self::once()) + ->method('getStream') + ->willReturn($originalStream); + + $originalFile->expects(self::atLeast(1)) + ->method('getClientFilename') + ->willReturn($this->targetFile); + + $originalFile->expects(self::once()) + ->method('moveTo') + ->with(self::callback(function ($argument) { + self::assertSame($this->targetFile, $argument); + copy($this->sourceFile, $this->targetFile); + + return true; + })); + + $originalFile->expects(self::once()) + ->method('getClientMediaType') + ->willReturn(null); + + $renamedStream = $this->createMock(StreamInterface::class); + $streamFactory = $this->createMock(StreamFactoryInterface::class); + $streamFactory->expects(self::once()) + ->method('createStreamFromFile') + ->with($this->targetFile) + ->willReturn($renamedStream); + + $renamedFile = $this->createMock(UploadedFileInterface::class); + + $fileFactory = $this->createMock(UploadedFileFactoryInterface::class); + $fileFactory->expects(self::once()) + ->method('createUploadedFile') + ->with( + $renamedStream, 0, // we can hardcode this, as we know the file is empty UPLOAD_ERR_OK, - $targetFile, + $this->targetFile, null ) - ->will([$renamedFile, 'reveal']); + ->willReturn($renamedFile); - $filter = new RenameUploadMock($targetFile); - $this->assertSame($targetFile, $filter->getTarget()); + $filter = new RenameUploadMock($this->targetFile); + self::assertSame($this->targetFile, $filter->getTarget()); - $filter->setStreamFactory($streamFactory->reveal()); - $filter->setUploadFileFactory($fileFactory->reveal()); + $filter->setStreamFactory($streamFactory); + $filter->setUploadFileFactory($fileFactory); - $moved = $filter($originalFile->reveal()); + $moved = $filter($originalFile); - $this->assertSame($renamedFile->reveal(), $moved); + self::assertSame($renamedFile, $moved); - $secondResult = $filter($originalFile->reveal()); + $secondResult = $filter($originalFile); - $this->assertSame($moved, $secondResult); + self::assertSame($moved, $secondResult); } public function testArrayConstructorParam(): void @@ -242,25 +234,25 @@ public function testArrayConstructorParam(): void $filter = new RenameUploadMock([ 'target' => $this->targetFile, ]); - $this->assertSame($this->targetFile, $filter->getTarget()); - $this->assertSame($this->targetFile, $filter($this->sourceFile)); - $this->assertSame('falsefile', $filter('falsefile')); + self::assertSame($this->targetFile, $filter->getTarget()); + self::assertSame($this->targetFile, $filter($this->sourceFile)); + self::assertSame('falsefile', $filter('falsefile')); } public function testConstructTruncatedTarget(): void { $filter = new FileRenameUpload('*'); - $this->assertSame('*', $filter->getTarget()); - $this->assertSame($this->sourceFile, $filter($this->sourceFile)); - $this->assertSame('falsefile', $filter('falsefile')); + self::assertSame('*', $filter->getTarget()); + self::assertSame($this->sourceFile, $filter($this->sourceFile)); + self::assertSame('falsefile', $filter('falsefile')); } public function testTargetDirectory(): void { $filter = new RenameUploadMock($this->targetPath); - $this->assertSame($this->targetPath, $filter->getTarget()); - $this->assertSame($this->targetPathFile, $filter($this->sourceFile)); - $this->assertSame('falsefile', $filter('falsefile')); + self::assertSame($this->targetPath, $filter->getTarget()); + self::assertSame($this->targetPathFile, $filter($this->sourceFile)); + self::assertSame('falsefile', $filter('falsefile')); } public function testOverwriteWithExistingFile(): void @@ -272,8 +264,8 @@ public function testOverwriteWithExistingFile(): void copy($this->sourceFile, $this->targetFile); - $this->assertSame($this->targetFile, $filter->getTarget()); - $this->assertSame($this->targetFile, $filter($this->sourceFile)); + self::assertSame($this->targetFile, $filter->getTarget()); + self::assertSame($this->targetFile, $filter($this->sourceFile)); } public function testCannotOverwriteExistingFile(): void @@ -285,11 +277,11 @@ public function testCannotOverwriteExistingFile(): void copy($this->sourceFile, $this->targetFile); - $this->assertSame($this->targetFile, $filter->getTarget()); - $this->assertFalse($filter->getOverwrite()); + self::assertSame($this->targetFile, $filter->getTarget()); + self::assertFalse($filter->getOverwrite()); $this->expectException(Exception\InvalidArgumentException::class); $this->expectExceptionMessage('already exists'); - $this->assertSame($this->targetFile, $filter($this->sourceFile)); + self::assertSame($this->targetFile, $filter($this->sourceFile)); } public function testGetRandomizedFile(): void @@ -300,7 +292,7 @@ public function testGetRandomizedFile(): void 'randomize' => true, ]); - $this->assertMatchesRegularExpression( + self::assertMatchesRegularExpression( '#' . str_replace('\\', '\\\\', $fileNoExt) . '_.{23}\.xml#', $filter($this->sourceFile) ); @@ -317,7 +309,7 @@ public function testGetFileWithOriginalExtension(): void $oldFilePathInfo = pathinfo($this->sourceFile); - $this->assertMatchesRegularExpression( + self::assertMatchesRegularExpression( '#' . str_replace('\\', '\\\\', $fileNoExt) . '.' . $oldFilePathInfo['extension'] . '#', $filter($this->sourceFile) ); @@ -334,7 +326,7 @@ public function testGetRandomizedFileWithOriginalExtension(): void $oldFilePathInfo = pathinfo($this->sourceFile); - $this->assertMatchesRegularExpression( + self::assertMatchesRegularExpression( '#' . str_replace('\\', '\\\\', $fileNoExt) . '_.{23}\.' . $oldFilePathInfo['extension'] . '#', $filter($this->sourceFile) ); @@ -348,7 +340,7 @@ public function testGetRandomizedFileWithoutExtension(): void 'randomize' => true, ]); - $this->assertMatchesRegularExpression( + self::assertMatchesRegularExpression( '#' . str_replace('\\', '\\\\', $fileNoExt) . '_.{13}#', $filter($this->sourceFile) ); @@ -358,7 +350,7 @@ public function testInvalidConstruction(): void { $this->expectException(Exception\InvalidArgumentException::class); $this->expectExceptionMessage('Invalid target'); - $filter = new FileRenameUpload(1234); + new FileRenameUpload(1234); } public function testCanFilterMultipleTimesWithSameResult(): void @@ -370,21 +362,22 @@ public function testCanFilterMultipleTimesWithSameResult(): void $firstResult = $filter($this->sourceFile); - $this->assertStringContainsString('newfile', $firstResult); + self::assertStringContainsString('newfile', $firstResult); $secondResult = $filter($this->sourceFile); - $this->assertSame($firstResult, $secondResult); + self::assertSame($firstResult, $secondResult); } - public function returnUnfilteredDataProvider() + /** @return list */ + public function returnUnfilteredDataProvider(): array { return [ [null], [new stdClass()], [ [ - $this->sourceFile, + '/some-file', 'something invalid', ], ], @@ -394,14 +387,14 @@ public function returnUnfilteredDataProvider() /** * @dataProvider returnUnfilteredDataProvider */ - public function testReturnUnfiltered($input): void + public function testReturnUnfiltered(mixed $input): void { $filter = new RenameUploadMock([ 'target' => $this->targetFile, 'randomize' => true, ]); - $this->assertSame($input, $filter($input)); + self::assertSame($input, $filter($input)); } /** @@ -429,8 +422,8 @@ public function testFilterDoesNotAlterUnknownFileDataAndCachesResultsOfFiltering ]; // Check the result twice for the `alreadyFiltered` cache path - $this->assertSame($sapiTarget, $filter($sapiSource)); - $this->assertSame($sapiTarget, $filter($sapiSource)); + self::assertSame($sapiTarget, $filter($sapiSource)); + self::assertSame($sapiTarget, $filter($sapiSource)); } /** @@ -445,6 +438,6 @@ public function testFilterReturnsFileDataVerbatimUnderSAPIWhenTargetPathIsUnspec 'name' => basename($this->targetFile), ]; - $this->assertSame($source, $filter($source)); + self::assertSame($source, $filter($source)); } } diff --git a/test/FilterPluginManagerFactoryTest.php b/test/FilterPluginManagerFactoryTest.php index 56f52b1d..f3301a58 100644 --- a/test/FilterPluginManagerFactoryTest.php +++ b/test/FilterPluginManagerFactoryTest.php @@ -10,7 +10,6 @@ use Laminas\Filter\FilterPluginManagerFactory; use Laminas\ServiceManager\ServiceLocatorInterface; use PHPUnit\Framework\TestCase; -use Prophecy\PhpUnit\ProphecyTrait; use Psr\Container\ContainerInterface; use ReflectionObject; @@ -18,25 +17,23 @@ class FilterPluginManagerFactoryTest extends TestCase { - use ProphecyTrait; - public function testFactoryReturnsPluginManager(): void { - $container = $this->prophesize(ContainerInterface::class)->reveal(); + $container = $this->createMock(ContainerInterface::class); $factory = new FilterPluginManagerFactory(); $filters = $factory($container, FilterPluginManagerFactory::class); - $this->assertInstanceOf(FilterPluginManager::class, $filters); + self::assertInstanceOf(FilterPluginManager::class, $filters); if (method_exists($filters, 'configure')) { // laminas-servicemanager v3 $r = new ReflectionObject($filters); $p = $r->getProperty('creationContext'); $p->setAccessible(true); - $this->assertSame($container, $p->getValue($filters)); + self::assertSame($container, $p->getValue($filters)); } else { // laminas-servicemanager v2 - $this->assertSame($container, $filters->getServiceLocator()); + self::assertSame($container, $filters->getServiceLocator()); } } @@ -45,7 +42,7 @@ public function testFactoryReturnsPluginManager(): void */ public function testFactoryConfiguresPluginManagerUnderContainerInterop(): void { - $container = $this->prophesize(ContainerInterface::class)->reveal(); + $container = $this->createMock(ContainerInterface::class); $filter = static fn($value) => $value; $factory = new FilterPluginManagerFactory(); @@ -54,7 +51,7 @@ public function testFactoryConfiguresPluginManagerUnderContainerInterop(): void 'test' => $filter, ], ]); - $this->assertSame($filter, $filters->get('test')); + self::assertSame($filter, $filters->get('test')); } /** @@ -62,8 +59,7 @@ public function testFactoryConfiguresPluginManagerUnderContainerInterop(): void */ public function testFactoryConfiguresPluginManagerUnderServiceManagerV2() { - $container = $this->prophesize(ServiceLocatorInterface::class); - $container->willImplement(ContainerInterface::class); + $container = $this->createMock(ServiceLocatorInterface::class); $filter = static fn($value) => $value; @@ -74,13 +70,13 @@ public function testFactoryConfiguresPluginManagerUnderServiceManagerV2() ], ]); - $filters = $factory->createService($container->reveal()); - $this->assertSame($filter, $filters->get('test')); + $filters = $factory->createService($container); + self::assertSame($filter, $filters->get('test')); } public function testConfiguresFilterServicesWhenFound(): void { - $filter = $this->prophesize(FilterInterface::class)->reveal(); + $filter = $this->createMock(FilterInterface::class); $config = [ 'filters' => [ 'aliases' => [ @@ -92,80 +88,84 @@ public function testConfiguresFilterServicesWhenFound(): void ], ]; - $container = $this->prophesize(ServiceLocatorInterface::class); - $container->willImplement(ContainerInterface::class); - - $container->has('ServiceListener')->willReturn(false); - $container->has('config')->willReturn(true); - $container->get('config')->willReturn($config); + $container = $this->createMock(ServiceLocatorInterface::class); + $container->expects(self::atLeast(2)) + ->method('has') + ->willReturnMap([ + ['ServiceListener', false], + ['config', true], + ]); + $container->expects(self::once()) + ->method('get') + ->with('config') + ->willReturn($config); $factory = new FilterPluginManagerFactory(); - $filters = $factory($container->reveal(), 'FilterManager'); + $filters = $factory($container, 'FilterManager'); - $this->assertInstanceOf(FilterPluginManager::class, $filters); - $this->assertTrue($filters->has('test')); - $this->assertInstanceOf(Boolean::class, $filters->get('test')); - $this->assertTrue($filters->has('test-too')); - $this->assertSame($filter, $filters->get('test-too')); + self::assertInstanceOf(FilterPluginManager::class, $filters); + self::assertTrue($filters->has('test')); + self::assertInstanceOf(Boolean::class, $filters->get('test')); + self::assertTrue($filters->has('test-too')); + self::assertSame($filter, $filters->get('test-too')); } public function testDoesNotConfigureFilterServicesWhenServiceListenerPresent(): void { - $filter = $this->prophesize(FilterInterface::class)->reveal(); - $config = [ - 'filters' => [ - 'aliases' => [ - 'test' => Boolean::class, - ], - 'factories' => [ - 'test-too' => static fn($container) => $filter, - ], - ], - ]; + $container = $this->createMock(ServiceLocatorInterface::class); - $container = $this->prophesize(ServiceLocatorInterface::class); - $container->willImplement(ContainerInterface::class); - - $container->has('ServiceListener')->willReturn(true); - $container->has('config')->shouldNotBeCalled(); - $container->get('config')->shouldNotBeCalled(); + $container->expects(self::once()) + ->method('has') + ->with('ServiceListener') + ->willReturn(true); $factory = new FilterPluginManagerFactory(); - $filters = $factory($container->reveal(), 'FilterManager'); + $filters = $factory($container, 'FilterManager'); - $this->assertInstanceOf(FilterPluginManager::class, $filters); - $this->assertFalse($filters->has('test')); - $this->assertFalse($filters->has('test-too')); + self::assertInstanceOf(FilterPluginManager::class, $filters); + self::assertFalse($filters->has('test')); + self::assertFalse($filters->has('test-too')); } public function testDoesNotConfigureFilterServicesWhenConfigServiceNotPresent(): void { - $container = $this->prophesize(ServiceLocatorInterface::class); - $container->willImplement(ContainerInterface::class); + $container = $this->createMock(ServiceLocatorInterface::class); + + $container->expects(self::exactly(2)) + ->method('has') + ->willReturnMap([ + ['ServiceListener', false], + ['config', false], + ]); - $container->has('ServiceListener')->willReturn(false); - $container->has('config')->willReturn(false); - $container->get('config')->shouldNotBeCalled(); + $container->expects(self::never())->method('get'); $factory = new FilterPluginManagerFactory(); - $filters = $factory($container->reveal(), 'FilterManager'); + $filters = $factory($container, 'FilterManager'); - $this->assertInstanceOf(FilterPluginManager::class, $filters); + self::assertInstanceOf(FilterPluginManager::class, $filters); } public function testDoesNotConfigureFilterServicesWhenConfigServiceDoesNotContainFiltersConfig(): void { - $container = $this->prophesize(ServiceLocatorInterface::class); - $container->willImplement(ContainerInterface::class); + $container = $this->createMock(ServiceLocatorInterface::class); + + $container->expects(self::exactly(2)) + ->method('has') + ->willReturnMap([ + ['ServiceListener', false], + ['config', true], + ]); - $container->has('ServiceListener')->willReturn(false); - $container->has('config')->willReturn(true); - $container->get('config')->willReturn(['foo' => 'bar']); + $container->expects(self::once()) + ->method('get') + ->with('config') + ->willReturn(['foo' => 'bar']); $factory = new FilterPluginManagerFactory(); - $filters = $factory($container->reveal(), 'FilterManager'); + $filters = $factory($container, 'FilterManager'); - $this->assertInstanceOf(FilterPluginManager::class, $filters); - $this->assertFalse($filters->has('foo')); + self::assertInstanceOf(FilterPluginManager::class, $filters); + self::assertFalse($filters->has('foo')); } } From 99f99c599a352111602eef717f3b90a545a93c2e Mon Sep 17 00:00:00 2001 From: George Steel Date: Tue, 11 Oct 2022 10:54:00 +0100 Subject: [PATCH 3/5] Add new psalm issues to the baseline Signed-off-by: George Steel --- psalm-baseline.xml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 7e54f52c..c38acbf8 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -668,6 +668,12 @@ is_string($this->compression) + + $key + $keys + [$test] + [$test] + $keys $this->keys @@ -1111,6 +1117,9 @@ ToInt::class => InvokableFactory::class ToNull::class => InvokableFactory::class + + $plugin + ($name is class-string ? InstanceType : callable(mixed): mixed) @@ -1446,7 +1455,8 @@ $temp - + + (string) $value (string) $value @@ -1549,7 +1559,14 @@ $matches $matches - + + static fn($matches) => mb_strtoupper($matches[1], 'UTF-8') + static fn($matches) => mb_strtoupper($matches[2], 'UTF-8') + static fn($matches) => strtoupper($matches[1]) + static fn($matches) => strtoupper($matches[1]) + static fn($matches) => strtoupper($matches[2]) + static fn($matches) => strtoupper($matches[2]) + $matches[1] $matches[1] @@ -2368,18 +2385,20 @@ getServiceLocator - $container $container $value $value - + + static fn($container) => $filter + static fn($value) => $value + static fn($value) => $value + testFactoryConfiguresPluginManagerUnderServiceManagerV2 $container - $container From 91e460aec852656ac0e2f95bfc89e29126c77435 Mon Sep 17 00:00:00 2001 From: George Steel Date: Tue, 11 Oct 2022 10:56:45 +0100 Subject: [PATCH 4/5] Update dot files, tool config and export ignores Signed-off-by: George Steel --- .coveralls.yml | 2 -- .gitattributes | 6 ++++-- .gitignore | 2 -- psalm.xml.dist => psalm.xml | 0 4 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 .coveralls.yml rename psalm.xml.dist => psalm.xml (100%) diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index bc71b62f..00000000 --- a/.coveralls.yml +++ /dev/null @@ -1,2 +0,0 @@ -coverage_clover: clover.xml -json_path: coveralls-upload.json diff --git a/.gitattributes b/.gitattributes index 70b009d9..64d7556b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,10 +1,12 @@ -/.coveralls.yml export-ignore /.gitattributes export-ignore /.github/ export-ignore /.gitignore export-ignore -/.travis.yml export-ignore /docs/ export-ignore /mkdocs.yml export-ignore /phpcs.xml export-ignore /phpunit.xml.dist export-ignore +/composer.lock export-ignore +/renovate.json export-ignore +/psalm.xml export-ignore +/psalm-baseline.xml export-ignore /test/ export-ignore diff --git a/.gitignore b/.gitignore index 03e91160..79ece404 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,6 @@ /.phpunit.result.cache /.phpcs-cache /.psalm-cache -/clover.xml -/coveralls-upload.json /docs/html/ /laminas-mkdoc-theme.tgz /laminas-mkdoc-theme/ diff --git a/psalm.xml.dist b/psalm.xml similarity index 100% rename from psalm.xml.dist rename to psalm.xml From 55fcd620d18cc0876db942bd411d1b92469c8555 Mon Sep 17 00:00:00 2001 From: George Steel Date: Tue, 11 Oct 2022 11:00:05 +0100 Subject: [PATCH 5/5] Ignore platform reqs on 8.2 - `laminas-uri` - `laminas-crypt` Signed-off-by: George Steel --- .gitattributes | 2 ++ .laminas-ci.json | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 .laminas-ci.json diff --git a/.gitattributes b/.gitattributes index 64d7556b..a275a08f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10,3 +10,5 @@ /psalm.xml export-ignore /psalm-baseline.xml export-ignore /test/ export-ignore +/.laminas-ci.json export-ignore +/.laminas-ci/ diff --git a/.laminas-ci.json b/.laminas-ci.json new file mode 100644 index 00000000..6d7c4b7b --- /dev/null +++ b/.laminas-ci.json @@ -0,0 +1,5 @@ +{ + "ignore_php_platform_requirements": { + "8.2": true + } +}