diff --git a/composer.json b/composer.json index 73c57aa..adb97d5 100644 --- a/composer.json +++ b/composer.json @@ -43,10 +43,10 @@ }, "require-dev": { "laminas/laminas-coding-standard": "~2.5.0", - "laminas/laminas-servicemanager": "^3.20", - "phpunit/phpunit": "^10.1.0", + "laminas/laminas-servicemanager": "^4.0", + "phpunit/phpunit": "^10.5.11", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.9" + "vimeo/psalm": "^5.22.2" }, "conflict": { "container-interop/container-interop": "<1.2.0", diff --git a/composer.lock b/composer.lock index 0de36f3..ac80995 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": "634adc87e42cd050b588833a2717bb8f", + "content-hash": "ade198b99fc3a3f16358ef79fe4fe249", "packages": [ { "name": "fig/http-message-util", @@ -362,22 +362,27 @@ }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -404,9 +409,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/http-factory", @@ -855,6 +860,55 @@ ], "time": "2021-03-30T17:13:30+00:00" }, + { + "name": "brick/varexporter", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/brick/varexporter.git", + "reference": "2fd038f7c9d12d468130c6e1b3ce06e4160a7dbb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/brick/varexporter/zipball/2fd038f7c9d12d468130c6e1b3ce06e4160a7dbb", + "reference": "2fd038f7c9d12d468130c6e1b3ce06e4160a7dbb", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.0", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^8.5 || ^9.0", + "vimeo/psalm": "5.15.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Brick\\VarExporter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A powerful alternative to var_export(), which can export closures and objects without __set_state()", + "keywords": [ + "var_export" + ], + "support": { + "issues": "https://github.com/brick/varexporter/issues", + "source": "https://github.com/brick/varexporter/tree/0.4.0" + }, + "funding": [ + { + "url": "https://github.com/BenMorel", + "type": "github" + } + ], + "time": "2023-09-01T21:10:07+00:00" + }, { "name": "composer/package-versions-deprecated", "version": "1.11.99.5", @@ -1478,59 +1532,58 @@ }, { "name": "laminas/laminas-servicemanager", - "version": "3.22.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-servicemanager.git", - "reference": "de98d297d4743956a0558a6d71616979ff779328" + "reference": "aa4b0f55004c85ed8bf9883050b43a14c8335b5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/de98d297d4743956a0558a6d71616979ff779328", - "reference": "de98d297d4743956a0558a6d71616979ff779328", + "url": "https://api.github.com/repos/laminas/laminas-servicemanager/zipball/aa4b0f55004c85ed8bf9883050b43a14c8335b5c", + "reference": "aa4b0f55004c85ed8bf9883050b43a14c8335b5c", "shasum": "" }, "require": { + "brick/varexporter": "^0.3.8 || ^0.4.0", "laminas/laminas-stdlib": "^3.17", "php": "~8.1.0 || ~8.2.0 || ~8.3.0", - "psr/container": "^1.0" + "psr/container": "^1.1 || ^2.0" }, "conflict": { - "ext-psr": "*", "laminas/laminas-code": "<4.10.0", - "zendframework/zend-code": "<3.3.1", - "zendframework/zend-servicemanager": "*" + "zendframework/zend-code": "<3.3.1" }, "provide": { - "psr/container-implementation": "^1.0" - }, - "replace": { - "container-interop/container-interop": "^1.2.0" + "psr/container-implementation": "^1.0 || ^2.0" }, "require-dev": { + "boesing/psalm-plugin-stringf": "^1.4", "composer/package-versions-deprecated": "^1.11.99.5", - "friendsofphp/proxy-manager-lts": "^1.0.14", - "laminas/laminas-code": "^4.10.0", + "friendsofphp/proxy-manager-lts": "^1", + "laminas/laminas-cli": "^1.8", "laminas/laminas-coding-standard": "~2.5.0", - "laminas/laminas-container-config-test": "^0.8", - "mikey179/vfsstream": "^1.6.11", - "phpbench/phpbench": "^1.2.9", + "laminas/laminas-container-config-test": "^1.0", + "lctrs/psalm-psr-container-plugin": "^1.9", + "mikey179/vfsstream": "^1.6.11@alpha", + "phpbench/phpbench": "^1.2.7", "phpunit/phpunit": "^10.4", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.8.0" + "symfony/console": "^6.0", + "vimeo/psalm": "^5.22" }, "suggest": { - "friendsofphp/proxy-manager-lts": "ProxyManager ^2.1.1 to handle lazy initialization of services" + "friendsofphp/proxy-manager-lts": "To handle lazy initialization of services", + "laminas/laminas-cli": "To consume CLI commands provided by this component" }, - "bin": [ - "bin/generate-deps-for-config-factory", - "bin/generate-factory-for-class" - ], "type": "library", + "extra": { + "laminas": { + "config-provider": "Laminas\\ServiceManager\\ConfigProvider", + "module": "Laminas\\ServiceManager" + } + }, "autoload": { - "files": [ - "src/autoload.php" - ], "psr-4": { "Laminas\\ServiceManager\\": "src/" } @@ -1552,11 +1605,9 @@ ], "support": { "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-servicemanager/", "forum": "https://discourse.laminas.dev", "issues": "https://github.com/laminas/laminas-servicemanager/issues", - "rss": "https://github.com/laminas/laminas-servicemanager/releases.atom", - "source": "https://github.com/laminas/laminas-servicemanager" + "source": "https://github.com/laminas/laminas-servicemanager/tree/4.0.0" }, "funding": [ { @@ -1564,7 +1615,7 @@ "type": "community_bridge" } ], - "time": "2023-10-24T11:19:47+00:00" + "time": "2024-03-04T08:57:26+00:00" }, { "name": "laminas/laminas-stdlib", diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index 4431b07..0e3d1d8 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -4,12 +4,12 @@ namespace Mezzio\Authorization\Rbac; -use Laminas\ServiceManager\ConfigInterface; +use Laminas\ServiceManager\ServiceManager; -/** @psalm-import-type ServiceManagerConfigurationType from ConfigInterface */ +/** @psalm-import-type ServiceManagerConfiguration from ServiceManager */ class ConfigProvider { - /** @return array{dependencies: ServiceManagerConfigurationType} */ + /** @return array{dependencies: ServiceManagerConfiguration} */ public function __invoke(): array { return [ @@ -17,7 +17,7 @@ public function __invoke(): array ]; } - /** @return ServiceManagerConfigurationType */ + /** @return ServiceManagerConfiguration */ public function getDependencies(): array { return [ diff --git a/test/ConfigProviderTest.php b/test/ConfigProviderTest.php index e945da7..efc35cf 100644 --- a/test/ConfigProviderTest.php +++ b/test/ConfigProviderTest.php @@ -4,7 +4,6 @@ namespace MezzioTest\Authorization\Rbac; -use Laminas\ServiceManager\ConfigInterface; use Laminas\ServiceManager\ServiceManager; use Mezzio\Authorization\Rbac\ConfigProvider; use Mezzio\Authorization\Rbac\LaminasRbac; @@ -16,7 +15,7 @@ use function json_decode; use function sprintf; -/** @psalm-import-type ServiceManagerConfigurationType from ConfigInterface */ +/** @psalm-import-type ServiceManagerConfiguration from ServiceManager */ class ConfigProviderTest extends TestCase { /** @var ConfigProvider */ @@ -27,7 +26,7 @@ protected function setUp(): void $this->provider = new ConfigProvider(); } - /** @return array{dependencies: ServiceManagerConfigurationType} */ + /** @return array{dependencies: ServiceManagerConfiguration} */ public function testInvocationReturnsArray(): array { $config = ($this->provider)(); @@ -37,7 +36,7 @@ public function testInvocationReturnsArray(): array } /** - * @param array{dependencies: ServiceManagerConfigurationType} $config + * @param array{dependencies: ServiceManagerConfiguration} $config * @psalm-suppress RedundantConditionGivenDocblockType */ #[Depends('testInvocationReturnsArray')] @@ -89,7 +88,7 @@ public function testServicesDefinedInConfigProvider(): void } } - /** @param ServiceManagerConfigurationType $dependencies */ + /** @param ServiceManagerConfiguration $dependencies */ private function getContainer(array $dependencies): ServiceManager { return new ServiceManager($dependencies);