From 659c6797f67912ee1304db59c9ffc8fa09d3382f Mon Sep 17 00:00:00 2001 From: "Eric Richer eric.richer@vistoconsulting.com" Date: Sat, 23 Nov 2024 13:56:58 -0500 Subject: [PATCH 1/2] Added support for PHP 8.4. Fixed deprecation notices on implicity null in ServiceManagerFactory.php and CorsService.php Signed-off-by: Eric Richer eric.richer@vistoconsulting.com --- composer.json | 2 +- composer.lock | 196 ++++++++++++++------------- src/Service/CorsService.php | 4 +- tests/Util/ServiceManagerFactory.php | 2 +- 4 files changed, 103 insertions(+), 101 deletions(-) diff --git a/composer.json b/composer.json index c8f3bfe..4645e7b 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ } }, "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "laminas/laminas-eventmanager": "^2.6.4 || ^3.2.1", "laminas/laminas-http": "^2.10", "laminas/laminas-mvc": "^2.7.15 || ^3.1.1", diff --git a/composer.lock b/composer.lock index 36ccc95..61a1acc 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": "e42081b8862b8a0ca960bacf57635a0f", + "content-hash": "36e82c1a2b708c5675333aa1cd4bf99c", "packages": [ { "name": "brick/varexporter", @@ -57,22 +57,22 @@ }, { "name": "laminas/laminas-config", - "version": "3.9.0", + "version": "3.10.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-config.git", - "reference": "e53717277f6c22b1c697a46473b9a5ec9a438efa" + "reference": "b79e7dbd01889e4574526cf8d2b18f9d5b18384c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-config/zipball/e53717277f6c22b1c697a46473b9a5ec9a438efa", - "reference": "e53717277f6c22b1c697a46473b9a5ec9a438efa", + "url": "https://api.github.com/repos/laminas/laminas-config/zipball/b79e7dbd01889e4574526cf8d2b18f9d5b18384c", + "reference": "b79e7dbd01889e4574526cf8d2b18f9d5b18384c", "shasum": "" }, "require": { "ext-json": "*", "laminas/laminas-stdlib": "^3.6", - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "psr/container": "^1.0" }, "conflict": { @@ -80,11 +80,11 @@ "zendframework/zend-config": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.4.0", - "laminas/laminas-filter": "~2.23.0", - "laminas/laminas-i18n": "~2.19.0", - "laminas/laminas-servicemanager": "~3.19.0", - "phpunit/phpunit": "~9.5.25" + "laminas/laminas-coding-standard": "^3.0.1", + "laminas/laminas-filter": "^2.39.0", + "laminas/laminas-i18n": "^2.29.0", + "laminas/laminas-servicemanager": "^3.23.0", + "phpunit/phpunit": "^10.5.38" }, "suggest": { "laminas/laminas-filter": "^2.7.2; install if you want to use the Filter processor", @@ -121,7 +121,8 @@ "type": "community_bridge" } ], - "time": "2023-09-19T12:02:54+00:00" + "abandoned": true, + "time": "2024-11-17T22:10:53+00:00" }, { "name": "laminas/laminas-escaper", @@ -187,33 +188,33 @@ }, { "name": "laminas/laminas-eventmanager", - "version": "3.13.1", + "version": "3.14.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-eventmanager.git", - "reference": "933d1b5cf03fa4cf3016cebfd0555fa2ba3f2024" + "reference": "1837cafaaaee74437f6d8ec9ff7da03e6f81d809" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/933d1b5cf03fa4cf3016cebfd0555fa2ba3f2024", - "reference": "933d1b5cf03fa4cf3016cebfd0555fa2ba3f2024", + "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/1837cafaaaee74437f6d8ec9ff7da03e6f81d809", + "reference": "1837cafaaaee74437f6d8ec9ff7da03e6f81d809", "shasum": "" }, "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "conflict": { "container-interop/container-interop": "<1.2", "zendframework/zend-eventmanager": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.5.0", - "laminas/laminas-stdlib": "^3.18", - "phpbench/phpbench": "^1.2.15", - "phpunit/phpunit": "^10.5.5", - "psalm/plugin-phpunit": "^0.18.4", + "laminas/laminas-coding-standard": "~3.0.0", + "laminas/laminas-stdlib": "^3.20", + "phpbench/phpbench": "^1.3.1", + "phpunit/phpunit": "^10.5.38", + "psalm/plugin-phpunit": "^0.19.0", "psr/container": "^1.1.2 || ^2.0.2", - "vimeo/psalm": "^5.18" + "vimeo/psalm": "^5.26.1" }, "suggest": { "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature", @@ -251,7 +252,7 @@ "type": "community_bridge" } ], - "time": "2024-06-24T14:01:06+00:00" + "time": "2024-11-21T11:31:22+00:00" }, { "name": "laminas/laminas-http", @@ -377,6 +378,7 @@ "type": "community_bridge" } ], + "abandoned": true, "time": "2024-10-25T09:02:25+00:00" }, { @@ -433,20 +435,21 @@ "type": "community_bridge" } ], + "abandoned": true, "time": "2024-10-16T09:06:57+00:00" }, { "name": "laminas/laminas-modulemanager", - "version": "2.16.0", + "version": "2.17.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-modulemanager.git", - "reference": "8df7b237d75c04a1bc17b8f7d01eeb601cd7b7e3" + "reference": "3cd6e84ba767b43a47c6c4245a56b30ac3738c6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-modulemanager/zipball/8df7b237d75c04a1bc17b8f7d01eeb601cd7b7e3", - "reference": "8df7b237d75c04a1bc17b8f7d01eeb601cd7b7e3", + "url": "https://api.github.com/repos/laminas/laminas-modulemanager/zipball/3cd6e84ba767b43a47c6c4245a56b30ac3738c6a", + "reference": "3cd6e84ba767b43a47c6c4245a56b30ac3738c6a", "shasum": "" }, "require": { @@ -454,20 +457,21 @@ "laminas/laminas-config": "^3.7", "laminas/laminas-eventmanager": "^3.4", "laminas/laminas-stdlib": "^3.6", - "php": "~8.1.0 || ~8.2.0|| ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "webimpress/safe-writer": "^1.0.2 || ^2.1" }, "conflict": { + "amphp/amp": "<2.6.4", "zendframework/zend-modulemanager": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "^2.5", - "laminas/laminas-loader": "^2.10", - "laminas/laminas-mvc": "^3.6.1", - "laminas/laminas-servicemanager": "^3.22.1", - "phpunit/phpunit": "^10.4.2", + "laminas/laminas-coding-standard": "^3.0.1", + "laminas/laminas-loader": "^2.11", + "laminas/laminas-mvc": "^3.7.0", + "laminas/laminas-servicemanager": "^3.23.0", + "phpunit/phpunit": "^10.5.38", "psalm/plugin-phpunit": "^0.19.0", - "vimeo/psalm": "^5.15" + "vimeo/psalm": "^5.26.1" }, "suggest": { "laminas/laminas-console": "Laminas\\Console component", @@ -505,32 +509,32 @@ "type": "community_bridge" } ], - "time": "2024-06-14T14:44:50+00:00" + "time": "2024-11-17T22:29:29+00:00" }, { "name": "laminas/laminas-mvc", - "version": "3.7.0", + "version": "3.8.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-mvc.git", - "reference": "3f65447addf487189000e54dc1525cd952951da4" + "reference": "53ba28b7222d3a3b49747a26babef43d1b17fb6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-mvc/zipball/3f65447addf487189000e54dc1525cd952951da4", - "reference": "3f65447addf487189000e54dc1525cd952951da4", + "url": "https://api.github.com/repos/laminas/laminas-mvc/zipball/53ba28b7222d3a3b49747a26babef43d1b17fb6f", + "reference": "53ba28b7222d3a3b49747a26babef43d1b17fb6f", "shasum": "" }, "require": { "container-interop/container-interop": "^1.2", "laminas/laminas-eventmanager": "^3.4", "laminas/laminas-http": "^2.15", - "laminas/laminas-modulemanager": "^2.8", + "laminas/laminas-modulemanager": "^2.16", "laminas/laminas-router": "^3.11.1", "laminas/laminas-servicemanager": "^3.20.0", - "laminas/laminas-stdlib": "^3.6", - "laminas/laminas-view": "^2.14", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "laminas/laminas-stdlib": "^3.19", + "laminas/laminas-view": "^2.18.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "conflict": { "zendframework/zend-mvc": "*" @@ -538,9 +542,7 @@ "require-dev": { "laminas/laminas-coding-standard": "^2.5.0", "laminas/laminas-json": "^3.6", - "phpspec/prophecy": "^1.17.0", - "phpspec/prophecy-phpunit": "^2.0.2", - "phpunit/phpunit": "^9.6.13", + "phpunit/phpunit": "^10.5.38", "webmozart/assert": "^1.11" }, "suggest": { @@ -586,7 +588,7 @@ "type": "community_bridge" } ], - "time": "2023-11-14T09:44:53+00:00" + "time": "2024-11-18T00:14:29+00:00" }, { "name": "laminas/laminas-router", @@ -952,16 +954,16 @@ }, { "name": "laminas/laminas-view", - "version": "2.35.0", + "version": "2.36.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-view.git", - "reference": "f597148345dd406fb9d04d391a19c0c33bf71605" + "reference": "ddc9207725cb50508ea48fcf1210dc8480264196" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-view/zipball/f597148345dd406fb9d04d391a19c0c33bf71605", - "reference": "f597148345dd406fb9d04d391a19c0c33bf71605", + "url": "https://api.github.com/repos/laminas/laminas-view/zipball/ddc9207725cb50508ea48fcf1210dc8480264196", + "reference": "ddc9207725cb50508ea48fcf1210dc8480264196", "shasum": "" }, "require": { @@ -973,7 +975,7 @@ "laminas/laminas-json": "^3.3", "laminas/laminas-servicemanager": "^3.21.0", "laminas/laminas-stdlib": "^3.10.1", - "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", "psr/container": "^1 || ^2" }, "conflict": { @@ -983,24 +985,24 @@ "zendframework/zend-view": "*" }, "require-dev": { - "laminas/laminas-authentication": "^2.16", + "laminas/laminas-authentication": "^2.18", "laminas/laminas-coding-standard": "~2.5.0", - "laminas/laminas-feed": "^2.22", - "laminas/laminas-filter": "^2.34", - "laminas/laminas-http": "^2.19", - "laminas/laminas-i18n": "^2.26.0", - "laminas/laminas-modulemanager": "^2.15", - "laminas/laminas-mvc": "^3.7.0", - "laminas/laminas-mvc-i18n": "^1.8", + "laminas/laminas-feed": "^2.23", + "laminas/laminas-filter": "^2.39", + "laminas/laminas-http": "^2.20", + "laminas/laminas-i18n": "^2.29.0", + "laminas/laminas-modulemanager": "^2.17", + "laminas/laminas-mvc": "^3.8.0", + "laminas/laminas-mvc-i18n": "^1.9", "laminas/laminas-mvc-plugin-flashmessenger": "^1.10.1", - "laminas/laminas-navigation": "^2.19.1", - "laminas/laminas-paginator": "^2.18.1", + "laminas/laminas-navigation": "^2.20.0", + "laminas/laminas-paginator": "^2.19.0", "laminas/laminas-permissions-acl": "^2.16", - "laminas/laminas-router": "^3.13.0", - "laminas/laminas-uri": "^2.11", - "phpunit/phpunit": "^10.5.13", + "laminas/laminas-router": "^3.14.0", + "laminas/laminas-uri": "^2.12", + "phpunit/phpunit": "^10.5.38", "psalm/plugin-phpunit": "^0.19.0", - "vimeo/psalm": "^5.23.1" + "vimeo/psalm": "^5.26.1" }, "suggest": { "laminas/laminas-authentication": "Laminas\\Authentication component", @@ -1048,7 +1050,7 @@ "type": "community_bridge" } ], - "time": "2024-06-04T06:44:31+00:00" + "time": "2024-11-21T17:42:20+00:00" }, { "name": "nikic/php-parser", @@ -1503,16 +1505,16 @@ }, { "name": "composer/pcre", - "version": "3.3.1", + "version": "3.3.2", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4" + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/63aaeac21d7e775ff9bc9d45021e1745c97521c4", - "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4", + "url": "https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e", + "reference": "b2bed4734f0cc156ee1fe9c0da2550420d99a21e", "shasum": "" }, "require": { @@ -1522,8 +1524,8 @@ "phpstan/phpstan": "<1.11.10" }, "require-dev": { - "phpstan/phpstan": "^1.11.10", - "phpstan/phpstan-strict-rules": "^1.1", + "phpstan/phpstan": "^1.12 || ^2", + "phpstan/phpstan-strict-rules": "^1 || ^2", "phpunit/phpunit": "^8 || ^9" }, "type": "library", @@ -1562,7 +1564,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.3.1" + "source": "https://github.com/composer/pcre/tree/3.3.2" }, "funding": [ { @@ -1578,7 +1580,7 @@ "type": "tidelift" } ], - "time": "2024-08-27T18:44:43+00:00" + "time": "2024-11-12T16:29:46+00:00" }, { "name": "composer/semver", @@ -4301,16 +4303,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.10.3", + "version": "3.11.1", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" + "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", - "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", + "reference": "19473c30efe4f7b3cd42522d0b2e6e7f243c6f87", "shasum": "" }, "require": { @@ -4377,20 +4379,20 @@ "type": "open_collective" } ], - "time": "2024-09-18T10:38:58+00:00" + "time": "2024-11-16T12:02:36+00:00" }, { "name": "symfony/console", - "version": "v6.4.14", + "version": "v6.4.15", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "897c2441ed4eec8a8a2c37b943427d24dba3f26b" + "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/897c2441ed4eec8a8a2c37b943427d24dba3f26b", - "reference": "897c2441ed4eec8a8a2c37b943427d24dba3f26b", + "url": "https://api.github.com/repos/symfony/console/zipball/f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", + "reference": "f1fc6f47283e27336e7cebb9e8946c8de7bff9bd", "shasum": "" }, "require": { @@ -4455,7 +4457,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.14" + "source": "https://github.com/symfony/console/tree/v6.4.15" }, "funding": [ { @@ -4471,7 +4473,7 @@ "type": "tidelift" } ], - "time": "2024-11-05T15:34:40+00:00" + "time": "2024-11-06T14:19:14+00:00" }, { "name": "symfony/deprecation-contracts", @@ -5009,16 +5011,16 @@ }, { "name": "symfony/string", - "version": "v6.4.13", + "version": "v6.4.15", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "38371c60c71c72b3d64d8d76f6b1bb81a2cc3627" + "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/38371c60c71c72b3d64d8d76f6b1bb81a2cc3627", - "reference": "38371c60c71c72b3d64d8d76f6b1bb81a2cc3627", + "url": "https://api.github.com/repos/symfony/string/zipball/73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", + "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", "shasum": "" }, "require": { @@ -5075,7 +5077,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.13" + "source": "https://github.com/symfony/string/tree/v6.4.15" }, "funding": [ { @@ -5091,7 +5093,7 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:18:03+00:00" + "time": "2024-11-13T13:31:12+00:00" }, { "name": "theseer/tokenizer", @@ -5369,15 +5371,15 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, - "platform-dev": [], + "platform-dev": {}, "platform-overrides": { "php": "8.1.99" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/src/Service/CorsService.php b/src/Service/CorsService.php index 26f0ef3..b0cb36c 100644 --- a/src/Service/CorsService.php +++ b/src/Service/CorsService.php @@ -131,7 +131,7 @@ public function createPreflightCorsResponse(HttpRequest $request): HttpResponse * * @return HttpResponse */ - public function createPreflightCorsResponseWithRouteOptions(HttpRequest $request, RouteMatch $routeMatch = null): HttpResponse + public function createPreflightCorsResponseWithRouteOptions(HttpRequest $request, RouteMatch|null $routeMatch = null): HttpResponse { $options = $this->options; if ($routeMatch instanceof RouteMatch) { @@ -149,7 +149,7 @@ public function createPreflightCorsResponseWithRouteOptions(HttpRequest $request * @return HttpResponse * @throws DisallowedOriginException If the origin is not allowed */ - public function populateCorsResponse(HttpRequest $request, HttpResponse $response, RouteMatch $routeMatch = null): HttpResponse + public function populateCorsResponse(HttpRequest $request, HttpResponse $response, RouteMatch|null $routeMatch = null): HttpResponse { if ($routeMatch instanceof RouteMatch) { $this->options->setFromArray($routeMatch->getParam(CorsOptions::ROUTE_PARAM) ?: []); diff --git a/tests/Util/ServiceManagerFactory.php b/tests/Util/ServiceManagerFactory.php index a5f9146..2de167a 100644 --- a/tests/Util/ServiceManagerFactory.php +++ b/tests/Util/ServiceManagerFactory.php @@ -65,7 +65,7 @@ public static function getApplicationConfig(): array * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ - public static function getServiceManager(array $config = null): ServiceManager + public static function getServiceManager(array|null $config = null): ServiceManager { $config = $config ?: static::getApplicationConfig(); $serviceManager = new ServiceManager(); From dc5961e8c7b82841209cd370a7771ccc11499331 Mon Sep 17 00:00:00 2001 From: "Eric Richer eric.richer@vistoconsulting.com" Date: Sat, 23 Nov 2024 14:02:55 -0500 Subject: [PATCH 2/2] Added support for PHP 8.4 in build-test.yml Signed-off-by: Eric Richer eric.richer@vistoconsulting.com --- .github/workflows/build-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 6809b41..20dda7e 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -13,11 +13,11 @@ jobs: build: strategy: matrix: - php_version: ['8.1', '8.2', '8.3'] + php_version: ['8.1', '8.2', '8.3', '8.4'] deps: ['--prefer-lowest', '--prefer-dist'] include: - code-coverage: 'yes' - php_version: '8.2' + php_version: '8.3' deps: '' runs-on: ubuntu-latest