From ebbd97f849e9457152f8aa1bb1446f25f693e63a Mon Sep 17 00:00:00 2001 From: "Eric Richer eric.richer@vistoconsulting.com" Date: Fri, 16 Aug 2024 17:18:54 -0400 Subject: [PATCH 1/3] Beautify code --- src/Collector/RbacCollector.php | 17 +- src/ConfigProvider.php | 19 +- src/Module.php | 7 +- test/Asset/MockRoleWithPermissionMethod.php | 10 +- test/Asset/MockRoleWithPermissionProperty.php | 20 ++- .../MockRoleWithPermissionTraversable.php | 24 +-- test/Bootstrap.php | 7 +- test/Collector/RbacCollectorTest.php | 170 +++++++++--------- test/ConfigProviderTest.php | 24 ++- test/ModuleTest.php | 8 +- test/TestConfiguration.php | 10 +- test/Util/ServiceManagerFactory.php | 49 +++-- 12 files changed, 199 insertions(+), 166 deletions(-) diff --git a/src/Collector/RbacCollector.php b/src/Collector/RbacCollector.php index bdee314..6a08d2e 100644 --- a/src/Collector/RbacCollector.php +++ b/src/Collector/RbacCollector.php @@ -97,7 +97,10 @@ public function collect(MvcEvent $mvcEvent): void */ private function collectOptions(ModuleOptions $moduleOptions): void { - $this->collectedOptions = ['guest_role' => $moduleOptions->getGuestRole(), 'protection_policy' => $moduleOptions->getProtectionPolicy()]; + $this->collectedOptions = [ + 'guest_role' => $moduleOptions->getGuestRole(), + 'protection_policy' => $moduleOptions->getProtectionPolicy(), + ]; } /** @@ -126,7 +129,10 @@ private function collectIdentityRolesAndPermissions(RoleService $roleService): v if (empty($role->getChildren())) { $this->collectedRoles[] = $roleName; } else { - $iteratorIterator = new RecursiveIteratorIterator(new RecursiveRoleIterator($role->getChildren()), RecursiveIteratorIterator::SELF_FIRST); + $iteratorIterator = new RecursiveIteratorIterator( + new RecursiveRoleIterator($role->getChildren()), + RecursiveIteratorIterator::SELF_FIRST + ); foreach ($iteratorIterator as $childRole) { $this->collectedRoles[$roleName][] = $childRole->getName(); $this->collectPermissions($childRole); @@ -147,8 +153,8 @@ private function collectPermissions(RoleInterface $role): void if (method_exists($role, 'getPermissions')) { $permissions = $role->getPermissions(); } else { - $reflectionProperty = new ReflectionProperty($role, 'permissions'); - $permissions = $reflectionProperty->getValue($role); + $reflectionProperty = new ReflectionProperty($role, 'permissions'); + $permissions = $reflectionProperty->getValue($role); } if ($permissions instanceof Traversable) { @@ -166,13 +172,14 @@ private function collectPermissions(RoleInterface $role): void */ public function getCollection(): array { + // Start collect all the data we need! return [ 'guards' => $this->collectedGuards, 'roles' => $this->collectedRoles, 'permissions' => $this->collectedPermissions, 'options' => $this->collectedOptions, ]; - } // Start collect all the data we need! + } // Gather the permissions for the given role. We have to use reflection as // the RoleInterface does not have "getPermissions" method diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index aef7c12..0618332 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -1,14 +1,19 @@ $this->getDependencies(), - 'view_manager' => $this->getViewManagerConfig(), + 'dependencies' => $this->getDependencies(), + 'view_manager' => $this->getViewManagerConfig(), 'laminas-developer-tools' => $this->getLaminasDeveloperToolsConfig(), ]; } @@ -17,7 +22,7 @@ public function getDependencies(): array { return [ 'factories' => [ - \LmcRbac\Mvc\DevTools\Collector\RbacCollector::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, + RbacCollector::class => InvokableFactory::class, ], ]; } @@ -26,8 +31,8 @@ public function getViewManagerConfig(): array { return [ 'template_map' => [ - 'laminas-developer-tools/toolbar/lmc-rbac' => __DIR__ . '/../view/laminas-developer-tools/toolbar/lmc-rbac.phtml' - ] + 'laminas-developer-tools/toolbar/lmc-rbac' => __DIR__ . '/../view/laminas-developer-tools/toolbar/lmc-rbac.phtml', + ], ]; } @@ -36,10 +41,10 @@ public function getLaminasDeveloperToolsConfig(): array return [ 'profiler' => [ 'collectors' => [ - 'lmc_rbac' => \LmcRbac\Mvc\DevTools\Collector\RbacCollector::class, + 'lmc_rbac' => RbacCollector::class, ], ], - 'toolbar' => [ + 'toolbar' => [ 'entries' => [ 'lmc_rbac' => 'laminas-developer-tools/toolbar/lmc-rbac', ], diff --git a/src/Module.php b/src/Module.php index 5fc76a5..7bf4743 100644 --- a/src/Module.php +++ b/src/Module.php @@ -1,16 +1,17 @@ $configProvider->getDependencies(), - 'view_manager' => $configProvider->getViewManagerConfig(), + 'service_manager' => $configProvider->getDependencies(), + 'view_manager' => $configProvider->getViewManagerConfig(), 'laminas-developer-tools' => $configProvider->getLaminasDeveloperToolsConfig(), ]; } diff --git a/test/Asset/MockRoleWithPermissionMethod.php b/test/Asset/MockRoleWithPermissionMethod.php index cc2abc8..b0426b6 100644 --- a/test/Asset/MockRoleWithPermissionMethod.php +++ b/test/Asset/MockRoleWithPermissionMethod.php @@ -1,7 +1,10 @@ add('LmcRbac\\Mvc\\DevToolsTest\\', __DIR__); - $config = require __DIR__ . '/TestConfiguration.php'; ServiceManagerFactory::setApplicationConfig($config); -unset($files, $file, $loader, $configFiles, $configFile, $config); +unset($files, $file, $loader, $config); diff --git a/test/Collector/RbacCollectorTest.php b/test/Collector/RbacCollectorTest.php index d751a8f..a0629fc 100644 --- a/test/Collector/RbacCollectorTest.php +++ b/test/Collector/RbacCollectorTest.php @@ -1,4 +1,5 @@ assertSame(-100, $collector->getPriority()); $this->assertSame('lmc_rbac', $collector->getName()); } - public function testSerialize() + public function testSerialize(): void { $collector = new RbacCollector(); $serialized = $collector->serialize(); - $this->assertIsString($serialized); - $unserialized = unserialize($serialized); - $this->assertSame([], $unserialized['guards']); $this->assertSame([], $unserialized['roles']); $this->assertSame([], $unserialized['options']); } - public function testUnserialize() + public function testUnserialize(): vois { $collector = new RbacCollector(); $unserialized = [ - 'guards' => ['foo' => 'bar'], - 'roles' => ['foo' => 'bar'], - 'permissions' => ['foo' => 'bar'], - 'options' => ['foo' => 'bar'] + 'guards' => [ + 'foo' => 'bar', + ], + 'roles' => [ + 'foo' => 'bar', + ], + 'permissions' => [ + 'foo' => 'bar', + ], + 'options' => [ + 'foo' => 'bar', + ], ]; $serialized = serialize($unserialized); - $collector->unserialize($serialized); - $collection = $collector->getCollection(); - $this->assertIsArray($collection); $this->assertSame(['foo' => 'bar'], $collection['guards']); $this->assertSame(['foo' => 'bar'], $collection['roles']); @@ -82,58 +95,54 @@ public function testUnserialize() $this->assertSame(['foo' => 'bar'], $collection['permissions']); } - public function testUnserializeThrowsInvalidArgumentException() + public function testUnserializeThrowsInvalidArgumentException(): void { $this->expectException('InvalidArgumentException'); $collector = new RbacCollector(); $unserialized = 'not_an_array'; $serialized = serialize($unserialized); - $collector->unserialize($serialized); } - - public function testCollectNothingIfNoApplicationIsSet() + public function testCollectNothingIfNoApplicationIsSet(): void { $mvcEvent = new MvcEvent(); $collector = new RbacCollector(); - $this->assertNull($collector->collect($mvcEvent)); } - public function testCanCollect() + public function testCanCollect(): void { $dataToCollect = [ 'module_options' => [ 'guest_role' => 'guest', 'protection_policy' => GuardInterface::POLICY_ALLOW, 'guards' => [ - 'Lmc\Rbac\Mvc\Guard\RouteGuard' => [ - 'admin*' => ['*'] + RouteGuard::class => [ + 'admin*' => ['*'], ], - 'Lmc\Rbac\Mvc\Guard\ControllerGuard' => [ + ControllerGuard::class => [ [ 'controller' => 'Foo', - 'roles' => ['*'] - ] - ] - ] + 'roles' => ['*'], + ], + ], + ], ], - 'role_config' => [ + 'role_config' => [ 'member' => [ 'children' => ['guest'], - 'permissions' => ['write', 'delete'] + 'permissions' => ['write', 'delete'], + ], + 'guest' => [ + 'permissions' => ['read'], ], - 'guest' => [ - 'permissions' => ['read'] - ] ], - 'identity_role' => ['member'] + 'identity_role' => ['member'], ]; - //$serviceManager = $this->getMockBuilder('Laminas\ServiceManager\ServiceLocatorInterface')->getMock(); $serviceManager = new ServiceManager(); - $application = $this->getMockBuilder('Laminas\Mvc\Application') + $application = $this->getMockBuilder(Application::class) ->disableOriginalConstructor() ->getMock(); @@ -145,14 +154,14 @@ public function testCanCollect() $identity = $this->createMock(IdentityInterface::class); $identity->expects($this->once())->method('getRoles')->willReturn($dataToCollect['identity_role']); - $identityProvider = $this->createMock(\Lmc\Rbac\Mvc\Identity\IdentityProviderInterface::class); + $identityProvider = $this->createMock(IdentityProviderInterface::class); $identityProvider->expects($this->once())->method('getIdentity')->willReturn($identity); $baseRoleService = new BaseRoleService(new InMemoryRoleProvider($dataToCollect['role_config']), 'guest'); - $roleService = new RoleService($identityProvider, $baseRoleService, new RecursiveRoleIteratorStrategy()); + $roleService = new RoleService($identityProvider, $baseRoleService, new RecursiveRoleIteratorStrategy()); - $serviceManager->setService('Lmc\Rbac\Mvc\Service\RoleService', $roleService); - $serviceManager->setService('Lmc\Rbac\Mvc\Options\ModuleOptions', new ModuleOptions($dataToCollect['module_options'])); + $serviceManager->setService(RoleService::class, $roleService); + $serviceManager->setService(ModuleOptions::class, new ModuleOptions($dataToCollect['module_options'])); $collector = new RbacCollector(); $collector->collect($mvcEvent); @@ -160,27 +169,27 @@ public function testCanCollect() $collection = $collector->getCollection(); $expectedCollection = [ - 'guards' => [ - 'Lmc\Rbac\Mvc\Guard\RouteGuard' => [ - 'admin*' => ['*'] + 'guards' => [ + RouteGuard::class => [ + 'admin*' => ['*'], ], - 'Lmc\Rbac\Mvc\Guard\ControllerGuard' => [ + ControllerGuard::class => [ [ 'controller' => 'Foo', - 'roles' => ['*'] - ] - ] + 'roles' => ['*'], + ], + ], ], - 'roles' => [ - 'member' => ['guest'] + 'roles' => [ + 'member' => ['guest'], ], 'permissions' => [ 'member' => ['write', 'delete'], - 'guest' => ['read'] + 'guest' => ['read'], ], - 'options' => [ + 'options' => [ 'guest_role' => 'guest', - 'protection_policy' => 'allow' + 'protection_policy' => 'allow', ], ]; @@ -190,16 +199,16 @@ public function testCanCollect() /** * Tests the collectPermissions method when the role has a $permissions Property */ - public function testCollectPermissionsProperty() + public function testCollectPermissionsProperty(): void { $expectedCollection = [ - 'guards' => [], - 'roles' => ['role-with-permission-property'], + 'guards' => [], + 'roles' => ['role-with-permission-property'], 'permissions' => [ 'role-with-permission-property' => ['permission-property-a', 'permission-property-b'], ], - 'options' => [ - 'guest_role' => 'guest', + 'options' => [ + 'guest_role' => 'guest', 'protection_policy' => GuardInterface::POLICY_ALLOW, ], ]; @@ -211,16 +220,16 @@ public function testCollectPermissionsProperty() /** * Tests the collectPermissions method when the role has a getPermissions() method */ - public function testCollectPermissionsMethod() + public function testCollectPermissionsMethod(): void { $expectedCollection = [ - 'guards' => [], - 'roles' => ['role-with-permission-method'], + 'guards' => [], + 'roles' => ['role-with-permission-method'], 'permissions' => [ 'role-with-permission-method' => ['permission-method-a', 'permission-method-b'], ], - 'options' => [ - 'guest_role' => 'guest', + 'options' => [ + 'guest_role' => 'guest', 'protection_policy' => GuardInterface::POLICY_ALLOW, ], ]; @@ -232,16 +241,16 @@ public function testCollectPermissionsMethod() /** * Tests the collectPermissions method when the role implements Traversable */ - public function testCollectPermissionsTraversable() + public function testCollectPermissionsTraversable(): void { $expectedCollection = [ - 'guards' => [], - 'roles' => ['role-with-permission-traversable'], + 'guards' => [], + 'roles' => ['role-with-permission-traversable'], 'permissions' => [ 'role-with-permission-traversable' => ['permission-method-a', 'permission-method-b'], ], - 'options' => [ - 'guest_role' => 'guest', + 'options' => [ + 'guest_role' => 'guest', 'protection_policy' => GuardInterface::POLICY_ALLOW, ], ]; @@ -250,17 +259,16 @@ public function testCollectPermissionsTraversable() $this->assertEquals($expectedCollection, $collection); } - /** * Base method for the *collectPermissionProperty tests - * @param RoleInterface $role + * * @return array|string[] */ private function collectPermissionsPropertyTestBase(RoleInterface $role): array { $serviceManager = new ServiceManager(); - $application = $this->getMockBuilder(\Laminas\Mvc\Application::class) + $application = $this->getMockBuilder(Application::class) ->disableOriginalConstructor() ->getMock(); $application->expects($this->once())->method('getServiceManager')->willReturn($serviceManager); @@ -268,17 +276,17 @@ private function collectPermissionsPropertyTestBase(RoleInterface $role): array $mvcEvent = new MvcEvent(); $mvcEvent->setApplication($application); - $identity = $this->createMock(\Lmc\Rbac\Identity\IdentityInterface::class); + $identity = $this->createMock(IdentityInterface::class); $identity->expects($this->once()) ->method('getRoles') ->willReturn([$role]); - $identityProvider = $this->createMock(\Lmc\Rbac\Mvc\Identity\IdentityProviderInterface::class); + $identityProvider = $this->createMock(IdentityProviderInterface::class); $identityProvider->expects($this->once()) ->method('getIdentity') ->will($this->returnValue($identity)); - $roleProvider = $this->createMock(\Lmc\Rbac\Role\RoleProviderInterface::class); + $roleProvider = $this->createMock(RoleProviderInterface::class); $baseRoleService = new BaseRoleService($roleProvider, ''); @@ -287,8 +295,8 @@ private function collectPermissionsPropertyTestBase(RoleInterface $role): array $baseRoleService, new RecursiveRoleIteratorStrategy() ); - $serviceManager->setService('Lmc\Rbac\Mvc\Service\RoleService', $roleService); - $serviceManager->setService('Lmc\Rbac\Mvc\Options\ModuleOptions', new ModuleOptions()); + $serviceManager->setService(RoleService::class, $roleService); + $serviceManager->setService(ModuleOptions::class, new ModuleOptions()); $collector = new RbacCollector(); $collector->collect($mvcEvent); diff --git a/test/ConfigProviderTest.php b/test/ConfigProviderTest.php index fbc17b5..040616c 100644 --- a/test/ConfigProviderTest.php +++ b/test/ConfigProviderTest.php @@ -1,10 +1,16 @@ [ - \LmcRbac\Mvc\DevTools\Collector\RbacCollector::class => \Laminas\ServiceManager\Factory\InvokableFactory::class, + RbacCollector::class => InvokableFactory::class, ], ]; $expectedLaminasDevtoolsConfig = [ 'profiler' => [ 'collectors' => [ - 'lmc_rbac' => \LmcRbac\Mvc\DevTools\Collector\RbacCollector::class, + 'lmc_rbac' => RbacCollector::class, ], ], - 'toolbar' => [ + 'toolbar' => [ 'entries' => [ 'lmc_rbac' => 'laminas-developer-tools/toolbar/lmc-rbac', ], ], ]; - $expectedViewManagerConfig = [ + $expectedViewManagerConfig = [ 'template_map' => [ 'laminas-developer-tools/toolbar/lmc-rbac' => realpath(__DIR__ . '/../view/laminas-developer-tools/toolbar/lmc-rbac.phtml'), ], @@ -43,14 +49,14 @@ public function testProvidesExpectedConfig() 'laminas-developer-tools/toolbar/lmc-rbac' => realpath(__DIR__ . '/../view/laminas-developer-tools/toolbar/lmc-rbac.phtml'), ], ]; - $result = $provider->getViewManagerConfig(); + $result = $provider->getViewManagerConfig(); // substitute path $result['template_map']['laminas-developer-tools/toolbar/lmc-rbac'] = realpath($result['template_map']['laminas-developer-tools/toolbar/lmc-rbac']); $this->assertEquals($expectedViewManagerConfig, $result); $expectedConfig = [ - 'dependencies' => $expectedDependencyConfig, - 'view_manager' => $expectedViewManagerConfig, + 'dependencies' => $expectedDependencyConfig, + 'view_manager' => $expectedViewManagerConfig, 'laminas-developer-tools' => $expectedLaminasDevtoolsConfig, ]; diff --git a/test/ModuleTest.php b/test/ModuleTest.php index 0b13c1e..67cfd19 100644 --- a/test/ModuleTest.php +++ b/test/ModuleTest.php @@ -1,5 +1,7 @@ $provider->getDependencies(), - 'view_manager' => $provider->getViewManagerConfig(), + 'service_manager' => $provider->getDependencies(), + 'view_manager' => $provider->getViewManagerConfig(), 'laminas-developer-tools' => $provider->getLaminasDeveloperToolsConfig(), ]; $this->assertEquals($expected, $module->getConfig()); diff --git a/test/TestConfiguration.php b/test/TestConfiguration.php index 6cb5e6a..7d336fd 100644 --- a/test/TestConfiguration.php +++ b/test/TestConfiguration.php @@ -1,4 +1,7 @@ [ - 'LmcRbacMvc', + 'modules' => [ + 'Lmc\Rbac\Mvc', ], 'module_listener_options' => [ 'config_glob_paths' => [ __DIR__ . '/testing.config.php', ], - 'module_paths' => [ - ], + 'module_paths' => [], ], ]; diff --git a/test/Util/ServiceManagerFactory.php b/test/Util/ServiceManagerFactory.php index 17823f7..4a9b8df 100644 --- a/test/Util/ServiceManagerFactory.php +++ b/test/Util/ServiceManagerFactory.php @@ -1,20 +1,23 @@ */ abstract class ServiceManagerFactory { - /** - * @var array - */ + /** @var array */ private static array $config = []; /** @@ -55,20 +53,19 @@ public static function getApplicationConfig(): array /** * @param array|null $config - * @return ServiceManager */ - public static function getServiceManager(array $config = null): ServiceManager + public static function getServiceManager(?array $config = null): ServiceManager { - $config = $config ?: static::getApplicationConfig(); + $config = $config ?: static::getApplicationConfig(); $serviceManagerConfig = new ServiceManagerConfig( $config['service_manager'] ?? [] ); - $serviceManager = new ServiceManager(); + $serviceManager = new ServiceManager(); $serviceManagerConfig->configureServiceManager($serviceManager); $serviceManager->setService('ApplicationConfig', $config); $serviceManager->setAllowOverride(true); - /* @var $moduleManager ModuleManagerInterface */ + /** @var ModuleManagerInterface $moduleManager */ $moduleManager = $serviceManager->get('ModuleManager'); $moduleManager->loadModules(); From 65b524c7cc0b0838249491e5d7768b2a0e6fc29f Mon Sep 17 00:00:00 2001 From: "Eric Richer eric.richer@vistoconsulting.com" Date: Fri, 30 Aug 2024 12:21:44 -0400 Subject: [PATCH 2/3] Updated test suite --- composer.json | 20 +- composer.lock | 852 ++++++++---------- phpunit.xml.dist | 18 +- src/Collector/RbacCollector.php | 4 +- src/ConfigProvider.php | 4 +- src/Module.php | 2 +- test/Asset/MockRoleWithPermissionMethod.php | 21 +- test/Asset/MockRoleWithPermissionProperty.php | 21 +- .../MockRoleWithPermissionTraversable.php | 20 +- test/Bootstrap.php | 3 +- test/Collector/RbacCollectorTest.php | 36 +- test/ConfigProviderTest.php | 8 +- test/ModuleTest.php | 8 +- test/Util/ServiceManagerFactory.php | 2 +- 14 files changed, 491 insertions(+), 528 deletions(-) diff --git a/composer.json b/composer.json index f0ff872..4df4c88 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "lm-commons/lmc-rbac-mvc": "4.0.x-dev" }, "require-dev": { - "phpunit/phpunit": "~9.1", + "phpunit/phpunit": "^10.5.30 | ^11.3.1", "laminas/laminas-permissions-rbac": "~3.0", "laminas/laminas-coding-standard": "^2.5", "psalm/plugin-phpunit": "^0.19.0", @@ -35,17 +35,17 @@ }, "autoload": { "psr-4": { - "LmcRbac\\Mvc\\DevTools\\": "src/" + "Lmc\\Rbac\\Mvc\\DevTools\\": "src/" } }, "autoload-dev": { "psr-4": { - "LmcRbac\\Mvc\\DevToolsTest\\": "test/" + "LmcTest\\Rbac\\Mvc\\DevToolsTest\\": "test/" } }, "extra": { "laminas": { - "module": "LmcRbac\\Mvc\\DevTools" + "module": "Lmc\\Rbac\\Mvc\\DevTools" } }, "scripts": { @@ -64,5 +64,15 @@ "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true } - } + }, + "repositories": [ + { + "type": "path", + "url": "../LmcRbacMvc" + }, + { + "type": "path", + "url": "../LmcRbac" + } + ] } diff --git a/composer.lock b/composer.lock index 9934674..298659c 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": "87e55b1c11981a7d8929da66d9293ab3", + "content-hash": "0de005c60b33cdd77d7cff6294274b74", "packages": [ { "name": "brick/varexporter", @@ -857,6 +857,66 @@ ], "time": "2023-11-14T09:44:53+00:00" }, + { + "name": "laminas/laminas-permissions-rbac", + "version": "3.6.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-permissions-rbac.git", + "reference": "6699e9b95fb360b921b2e6d655977d4786da0443" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-permissions-rbac/zipball/6699e9b95fb360b921b2e6d655977d4786da0443", + "reference": "6699e9b95fb360b921b2e6d655977d4786da0443", + "shasum": "" + }, + "require": { + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + }, + "conflict": { + "zendframework/zend-permissions-rbac": "*" + }, + "require-dev": { + "laminas/laminas-coding-standard": "~2.5.0", + "phpunit/phpunit": "^10.1.2", + "psalm/plugin-phpunit": "^0.18.4", + "vimeo/psalm": "^5.10" + }, + "type": "library", + "autoload": { + "psr-4": { + "Laminas\\Permissions\\Rbac\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Provides a role-based access control management", + "homepage": "https://laminas.dev", + "keywords": [ + "authorization", + "laminas", + "laminas-permissions-rbac", + "rbac" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-permissions-rbac/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-permissions-rbac/issues", + "rss": "https://github.com/laminas/laminas-permissions-rbac/releases.atom", + "source": "https://github.com/laminas/laminas-permissions-rbac" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2023-11-27T21:55:58+00:00" + }, { "name": "laminas/laminas-router", "version": "3.13.0", @@ -1322,19 +1382,14 @@ { "name": "lm-commons/lmc-rbac", "version": "2.0.x-dev", - "source": { - "type": "git", - "url": "https://github.com/LM-Commons/LmcRbac.git", - "reference": "f5a3735281dea22ec30e834dfca2983b5235709a" - }, "dist": { - "type": "zip", - "url": "https://api.github.com/repos/LM-Commons/LmcRbac/zipball/f5a3735281dea22ec30e834dfca2983b5235709a", - "reference": "f5a3735281dea22ec30e834dfca2983b5235709a", - "shasum": "" + "type": "path", + "url": "../LmcRbac", + "reference": "ae7b1c67126d5c7a1c8da7fb17ec209b5ac70164" }, "require": { "doctrine/persistence": "^2.0 || ^3.0", + "laminas/laminas-permissions-rbac": "^3.0", "laminas/laminas-servicemanager": "^3.3", "laminas/laminas-stdlib": "^3.1", "php": "^8.1 || ^8.2 || ^8.3" @@ -1364,7 +1419,35 @@ "Lmc\\Rbac\\": "src/" } }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "psr-4": { + "LmcTest\\Rbac\\": "test/" + } + }, + "scripts": { + "check": [ + "@cs-check", + "@test" + ], + "cs-check": [ + "phpcs" + ], + "cs-fix": [ + "phpcbf" + ], + "test": [ + "phpunit --colors=always" + ], + "test-coverage": [ + "phpunit --coverage-clover ./build/logs/clover.xml" + ], + "test-coverage-html": [ + "phpunit --colors=always --coverage-html ./build/html" + ], + "static-analysis": [ + "psalm --shepherd --stats" + ] + }, "license": [ "MIT" ], @@ -1404,25 +1487,17 @@ "permissions", "rbac" ], - "support": { - "issues": "https://github.com/LM-Commons/LmcRbac/issues", - "source": "https://github.com/LM-Commons/LmcRbac/tree/2.0.x" - }, - "time": "2024-08-16T18:16:03+00:00" + "transport-options": { + "relative": true + } }, { "name": "lm-commons/lmc-rbac-mvc", "version": "4.0.x-dev", - "source": { - "type": "git", - "url": "https://github.com/LM-Commons/LmcRbacMvc.git", - "reference": "5e550b55f6ccb9fd980aa0c8ca6351d4c837d066" - }, "dist": { - "type": "zip", - "url": "https://api.github.com/repos/LM-Commons/LmcRbacMvc/zipball/5e550b55f6ccb9fd980aa0c8ca6351d4c837d066", - "reference": "5e550b55f6ccb9fd980aa0c8ca6351d4c837d066", - "shasum": "" + "type": "path", + "url": "../LmcRbacMvc", + "reference": "fe85a533bd7772d8098c5da1fb58e4d9483476ca" }, "require": { "laminas/laminas-config": "^3.1", @@ -1455,7 +1530,35 @@ "Lmc\\Rbac\\Mvc\\": "src" } }, - "notification-url": "https://packagist.org/downloads/", + "autoload-dev": { + "psr-4": { + "LmcTest\\Rbac\\Mvc\\": "tests" + } + }, + "scripts": { + "check": [ + "@cs-check", + "@test" + ], + "test": [ + "phpunit" + ], + "test-coverage": [ + "phpunit --coverage-clover ./build/logs/clover.xml" + ], + "cs-check": [ + "phpcs" + ], + "cs-fix": [ + "phpcbf" + ], + "test-coverage-html": [ + "phpunit --coverage-html ./build/html" + ], + "static-analysis": [ + "psalm --shepherd --stats" + ] + }, "license": [ "MIT" ], @@ -1487,11 +1590,9 @@ "permissions", "rbac" ], - "support": { - "issues": "https://github.com/LM-Commons/LmcRbacMvc/issues", - "source": "https://github.com/LM-Commons/LmcRbacMvc/tree/4.0.x" - }, - "time": "2024-08-16T20:37:07+00:00" + "transport-options": { + "relative": true + } }, { "name": "nikic/php-parser", @@ -2227,26 +2328,26 @@ }, { "name": "composer/pcre", - "version": "3.2.0", + "version": "3.3.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90" + "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/ea4ab6f9580a4fd221e0418f2c357cdd39102a90", - "reference": "ea4ab6f9580a4fd221e0418f2c357cdd39102a90", + "url": "https://api.github.com/repos/composer/pcre/zipball/63aaeac21d7e775ff9bc9d45021e1745c97521c4", + "reference": "63aaeac21d7e775ff9bc9d45021e1745c97521c4", "shasum": "" }, "require": { "php": "^7.4 || ^8.0" }, "conflict": { - "phpstan/phpstan": "<1.11.8" + "phpstan/phpstan": "<1.11.10" }, "require-dev": { - "phpstan/phpstan": "^1.11.8", + "phpstan/phpstan": "^1.11.10", "phpstan/phpstan-strict-rules": "^1.1", "phpunit/phpunit": "^8 || ^9" }, @@ -2286,7 +2387,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.2.0" + "source": "https://github.com/composer/pcre/tree/3.3.1" }, "funding": [ { @@ -2302,7 +2403,7 @@ "type": "tidelift" } ], - "time": "2024-07-25T09:36:02+00:00" + "time": "2024-08-27T18:44:43+00:00" }, { "name": "composer/semver", @@ -2563,76 +2664,6 @@ }, "time": "2019-12-04T15:06:13+00:00" }, - { - "name": "doctrine/instantiator", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "doctrine/coding-standard": "^11", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^1.2", - "phpstan/phpstan": "^1.9.4", - "phpstan/phpstan-phpunit": "^1.3", - "phpunit/phpunit": "^9.5.27", - "vimeo/psalm": "^5.4" - }, - "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/2.0.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": "2022-12-30T00:23:10+00:00" - }, { "name": "felixfbecker/advanced-json-rpc", "version": "v3.2.1", @@ -2736,16 +2767,16 @@ }, { "name": "fidry/cpu-core-counter", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42" + "reference": "8520451a140d3f46ac33042715115e290cf5785f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/f92996c4d5c1a696a6a970e20f7c4216200fcc42", - "reference": "f92996c4d5c1a696a6a970e20f7c4216200fcc42", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/8520451a140d3f46ac33042715115e290cf5785f", + "reference": "8520451a140d3f46ac33042715115e290cf5785f", "shasum": "" }, "require": { @@ -2785,7 +2816,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/1.1.0" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.2.0" }, "funding": [ { @@ -2793,7 +2824,7 @@ "type": "github" } ], - "time": "2024-02-07T09:43:46+00:00" + "time": "2024-08-06T10:04:20+00:00" }, { "name": "laminas/laminas-coding-standard", @@ -2851,66 +2882,6 @@ ], "time": "2023-01-05T15:53:40+00:00" }, - { - "name": "laminas/laminas-permissions-rbac", - "version": "3.6.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-permissions-rbac.git", - "reference": "6699e9b95fb360b921b2e6d655977d4786da0443" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-permissions-rbac/zipball/6699e9b95fb360b921b2e6d655977d4786da0443", - "reference": "6699e9b95fb360b921b2e6d655977d4786da0443", - "shasum": "" - }, - "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" - }, - "conflict": { - "zendframework/zend-permissions-rbac": "*" - }, - "require-dev": { - "laminas/laminas-coding-standard": "~2.5.0", - "phpunit/phpunit": "^10.1.2", - "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.10" - }, - "type": "library", - "autoload": { - "psr-4": { - "Laminas\\Permissions\\Rbac\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Provides a role-based access control management", - "homepage": "https://laminas.dev", - "keywords": [ - "authorization", - "laminas", - "laminas-permissions-rbac", - "rbac" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-permissions-rbac/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-permissions-rbac/issues", - "rss": "https://github.com/laminas/laminas-permissions-rbac/releases.atom", - "source": "https://github.com/laminas/laminas-permissions-rbac" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2023-11-27T21:55:58+00:00" - }, { "name": "myclabs/deep-copy", "version": "1.12.0", @@ -3351,35 +3322,35 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.31", + "version": "10.1.16", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965" + "reference": "7e308268858ed6baedc8704a304727d20bc07c77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965", - "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77", + "reference": "7e308268858ed6baedc8704a304727d20bc07c77", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.18 || ^5.0", - "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", - "theseer/tokenizer": "^1.2.0" + "nikic/php-parser": "^4.19.1 || ^5.1.0", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-text-template": "^3.0.1", + "sebastian/code-unit-reverse-lookup": "^3.0.0", + "sebastian/complexity": "^3.2.0", + "sebastian/environment": "^6.1.0", + "sebastian/lines-of-code": "^2.0.2", + "sebastian/version": "^4.0.1", + "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -3388,7 +3359,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.2-dev" + "dev-main": "10.1.x-dev" } }, "autoload": { @@ -3417,7 +3388,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.16" }, "funding": [ { @@ -3425,32 +3396,32 @@ "type": "github" } ], - "time": "2024-03-02T06:37:42+00:00" + "time": "2024-08-22T04:31:57+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -3477,7 +3448,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" }, "funding": [ { @@ -3485,28 +3457,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2023-08-31T06:24:48+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" }, "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/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-pcntl": "*" @@ -3514,7 +3486,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -3540,7 +3512,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" }, "funding": [ { @@ -3548,32 +3520,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2023-02-03T06:56:09+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" }, "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/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -3599,7 +3571,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/3.0.1" }, "funding": [ { @@ -3607,32 +3580,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2023-08-31T14:07:24+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" }, "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/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -3658,7 +3631,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" }, "funding": [ { @@ -3666,24 +3639,23 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2023-02-03T06:57:52+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.20", + "version": "10.5.30", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "49d7820565836236411f5dc002d16dd689cde42f" + "reference": "b15524febac0153876b4ba9aab3326c2ee94c897" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/49d7820565836236411f5dc002d16dd689cde42f", - "reference": "49d7820565836236411f5dc002d16dd689cde42f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b15524febac0153876b4ba9aab3326c2ee94c897", + "reference": "b15524febac0153876b4ba9aab3326c2ee94c897", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.5.0 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", @@ -3693,27 +3665,26 @@ "myclabs/deep-copy": "^1.12.0", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.31", - "phpunit/php-file-iterator": "^3.0.6", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.4", - "phpunit/php-timer": "^5.0.3", - "sebastian/cli-parser": "^1.0.2", - "sebastian/code-unit": "^1.0.8", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.6", - "sebastian/environment": "^5.1.5", - "sebastian/exporter": "^4.0.6", - "sebastian/global-state": "^5.0.7", - "sebastian/object-enumerator": "^4.0.4", - "sebastian/resource-operations": "^3.0.4", - "sebastian/type": "^3.2.1", - "sebastian/version": "^3.0.2" + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.15", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-invoker": "^4.0.0", + "phpunit/php-text-template": "^3.0.1", + "phpunit/php-timer": "^6.0.0", + "sebastian/cli-parser": "^2.0.1", + "sebastian/code-unit": "^2.0.0", + "sebastian/comparator": "^5.0.2", + "sebastian/diff": "^5.1.1", + "sebastian/environment": "^6.1.0", + "sebastian/exporter": "^5.1.2", + "sebastian/global-state": "^6.0.2", + "sebastian/object-enumerator": "^5.0.0", + "sebastian/recursion-context": "^5.0.0", + "sebastian/type": "^4.0.0", + "sebastian/version": "^4.0.1" }, "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "ext-soap": "To be able to generate mocks based on WSDL files" }, "bin": [ "phpunit" @@ -3721,7 +3692,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "10.5-dev" } }, "autoload": { @@ -3753,7 +3724,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.20" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.30" }, "funding": [ { @@ -3769,7 +3740,7 @@ "type": "tidelift" } ], - "time": "2024-07-10T11:45:39+00:00" + "time": "2024-08-13T06:09:37+00:00" }, { "name": "psalm/plugin-phpunit", @@ -3833,16 +3804,16 @@ }, { "name": "psr/log", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + "reference": "79dff0b268932c640297f5208d6298f71855c03e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", - "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "url": "https://api.github.com/repos/php-fig/log/zipball/79dff0b268932c640297f5208d6298f71855c03e", + "reference": "79dff0b268932c640297f5208d6298f71855c03e", "shasum": "" }, "require": { @@ -3877,34 +3848,34 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.0" + "source": "https://github.com/php-fig/log/tree/3.0.1" }, - "time": "2021-07-14T16:46:02+00:00" + "time": "2024-08-21T13:31:24+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.2", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -3927,7 +3898,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.2" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" }, "funding": [ { @@ -3935,32 +3907,32 @@ "type": "github" } ], - "time": "2024-03-02T06:27:43+00:00" + "time": "2024-03-02T07:12:49+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.8", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" }, "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/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -3983,7 +3955,7 @@ "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" + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" }, "funding": [ { @@ -3991,32 +3963,32 @@ "type": "github" } ], - "time": "2020-10-26T13:08:54+00:00" + "time": "2023-02-03T06:58:43+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" }, "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/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -4038,7 +4010,7 @@ "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" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" }, "funding": [ { @@ -4046,34 +4018,36 @@ "type": "github" } ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2023-02-03T06:59:15+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53", + "reference": "2d3e04c3b4c1e84a5e7382221ad8883c8fbc4f53", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -4112,7 +4086,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.2" }, "funding": [ { @@ -4120,33 +4095,33 @@ "type": "github" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2024-08-12T06:03:08+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.3", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + "reference": "68ff824baeae169ec9f2137158ee529584553799" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", + "reference": "68ff824baeae169ec9f2137158ee529584553799", "shasum": "" }, "require": { "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.2-dev" } }, "autoload": { @@ -4169,7 +4144,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" }, "funding": [ { @@ -4177,33 +4153,33 @@ "type": "github" } ], - "time": "2023-12-22T06:19:30+00:00" + "time": "2023-12-21T08:37:17+00:00" }, { "name": "sebastian/diff", - "version": "4.0.6", + "version": "5.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" + "phpunit/phpunit": "^10.0", + "symfony/process": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -4235,7 +4211,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" }, "funding": [ { @@ -4243,27 +4220,27 @@ "type": "github" } ], - "time": "2024-03-02T06:30:58+00:00" + "time": "2024-03-02T07:15:17+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "6.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "suggest": { "ext-posix": "*" @@ -4271,7 +4248,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "6.1-dev" } }, "autoload": { @@ -4290,7 +4267,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", @@ -4298,7 +4275,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" }, "funding": [ { @@ -4306,34 +4284,34 @@ "type": "github" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2024-03-23T08:47:14+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.6", + "version": "5.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" + "reference": "955288482d97c19a372d3f31006ab3f37da47adf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf", + "reference": "955288482d97c19a372d3f31006ab3f37da47adf", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.1-dev" } }, "autoload": { @@ -4375,7 +4353,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2" }, "funding": [ { @@ -4383,38 +4362,35 @@ "type": "github" } ], - "time": "2024-03-02T06:33:00+00:00" + "time": "2024-03-02T07:17:12+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.7", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -4433,13 +4409,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.7" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" }, "funding": [ { @@ -4447,33 +4424,33 @@ "type": "github" } ], - "time": "2024-03-02T06:35:11+00:00" + "time": "2024-03-02T07:19:19+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.4", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", "shasum": "" }, "require": { "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "2.0-dev" } }, "autoload": { @@ -4496,7 +4473,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.4" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" }, "funding": [ { @@ -4504,34 +4482,34 @@ "type": "github" } ], - "time": "2023-12-22T06:20:34+00:00" + "time": "2023-12-21T08:38:20+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" }, "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/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -4553,7 +4531,7 @@ "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" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" }, "funding": [ { @@ -4561,32 +4539,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2023-02-03T07:08:32+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" }, "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/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "3.0-dev" } }, "autoload": { @@ -4608,7 +4586,7 @@ "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" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" }, "funding": [ { @@ -4616,32 +4594,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2023-02-03T07:06:18+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "05909fb5bc7df4c52992396d0116aed689f93712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712", + "reference": "05909fb5bc7df4c52992396d0116aed689f93712", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -4671,61 +4649,7 @@ "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.5" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2023-02-03T06:07:39+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "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": { - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0" }, "funding": [ { @@ -4733,32 +4657,32 @@ "type": "github" } ], - "time": "2024-03-14T16:00:52+00:00" + "time": "2023-02-03T07:05:40+00:00" }, { "name": "sebastian/type", - "version": "3.2.1", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^10.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -4781,7 +4705,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" }, "funding": [ { @@ -4789,29 +4713,29 @@ "type": "github" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2023-02-03T07:10:45+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -4834,7 +4758,7 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" }, "funding": [ { @@ -4842,7 +4766,7 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2023-02-07T11:34:05+00:00" }, { "name": "slevomat/coding-standard", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 900af57..c6774dd 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -2,19 +2,17 @@ - - - ./src - - + processIsolation="false" backupGlobals="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" + cacheDirectory=".phpunit.cache" +> ./test + + + ./src + + diff --git a/src/Collector/RbacCollector.php b/src/Collector/RbacCollector.php index 6a08d2e..02dd2d4 100644 --- a/src/Collector/RbacCollector.php +++ b/src/Collector/RbacCollector.php @@ -19,7 +19,7 @@ * and is licensed under the MIT license. */ -namespace LmcRbac\Mvc\DevTools\Collector; +namespace Lmc\Rbac\Mvc\DevTools\Collector; use InvalidArgumentException; use Laminas\DeveloperTools\Collector\CollectorInterface; @@ -27,7 +27,7 @@ use Lmc\Rbac\Mvc\Options\ModuleOptions; use Lmc\Rbac\Mvc\Role\RecursiveRoleIterator; use Lmc\Rbac\Mvc\Service\RoleService; -use Lmc\Rbac\Role\RoleInterface; +use Laminas\Permissions\Rbac\RoleInterface; use RecursiveIteratorIterator; use ReflectionException; use ReflectionProperty; diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index 0618332..5e81ea4 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -2,10 +2,10 @@ declare(strict_types=1); -namespace LmcRbac\Mvc\DevTools; +namespace Lmc\Rbac\Mvc\DevTools; use Laminas\ServiceManager\Factory\InvokableFactory; -use LmcRbac\Mvc\DevTools\Collector\RbacCollector; +use Lmc\Rbac\Mvc\DevTools\Collector\RbacCollector; class ConfigProvider { diff --git a/src/Module.php b/src/Module.php index 7bf4743..31d9936 100644 --- a/src/Module.php +++ b/src/Module.php @@ -2,7 +2,7 @@ declare(strict_types=1); -namespace LmcRbac\Mvc\DevTools; +namespace Lmc\Rbac\Mvc\DevTools; class Module { diff --git a/test/Asset/MockRoleWithPermissionMethod.php b/test/Asset/MockRoleWithPermissionMethod.php index b0426b6..c29f928 100644 --- a/test/Asset/MockRoleWithPermissionMethod.php +++ b/test/Asset/MockRoleWithPermissionMethod.php @@ -2,10 +2,9 @@ declare(strict_types=1); -namespace LmcRbac\Mvc\DevToolsTest\Asset; +namespace LmcTest\Rbac\Mvc\DevToolsTest\Asset; -use Lmc\Rbac\Permission\PermissionInterface; -use Lmc\Rbac\Role\RoleInterface; +use Laminas\Permissions\Rbac\RoleInterface; class MockRoleWithPermissionMethod implements RoleInterface { @@ -19,7 +18,7 @@ public function getName(): string return 'role-with-permission-method'; } - public function hasPermission($permission): bool + public function hasPermission($name): bool { return false; } @@ -27,14 +26,14 @@ public function hasPermission($permission): bool /** * Add permission to the role. */ - public function addPermission(string|PermissionInterface $permission): void + public function addPermission(string $name): void { } /** * Add a child. */ - public function addChild(RoleInterface $role): void + public function addChild(RoleInterface $child): void { } @@ -52,4 +51,14 @@ public function hasChildren(): bool { return false; } + + public function addParent(RoleInterface $parent): void + { + // TODO: Implement addParent() method. + } + + public function getParents(): iterable + { + return []; + } } diff --git a/test/Asset/MockRoleWithPermissionProperty.php b/test/Asset/MockRoleWithPermissionProperty.php index 3bc5612..32a86ad 100644 --- a/test/Asset/MockRoleWithPermissionProperty.php +++ b/test/Asset/MockRoleWithPermissionProperty.php @@ -2,10 +2,9 @@ declare(strict_types=1); -namespace LmcRbac\Mvc\DevToolsTest\Asset; +namespace LmcTest\Rbac\Mvc\DevToolsTest\Asset; -use Lmc\Rbac\Permission\PermissionInterface; -use Lmc\Rbac\Role\RoleInterface; +use Laminas\Permissions\Rbac\RoleInterface; class MockRoleWithPermissionProperty implements RoleInterface { @@ -16,19 +15,19 @@ public function getName(): string return 'role-with-permission-property'; } - public function hasPermission(string|PermissionInterface $permission): bool + public function hasPermission(string $permission): bool { return false; } - public function addPermission(string|PermissionInterface $permission): void + public function addPermission(string $permission): void { } /** * Add a child. */ - public function addChild(RoleInterface $role): void + public function addChild(RoleInterface $child): void { } @@ -49,4 +48,14 @@ public function hasChildren(): bool { return false; } + + public function addParent(RoleInterface $parent): void + { + + } + + public function getParents(): iterable + { + return []; + } } diff --git a/test/Asset/MockRoleWithPermissionTraversable.php b/test/Asset/MockRoleWithPermissionTraversable.php index c7c7890..156d5a0 100644 --- a/test/Asset/MockRoleWithPermissionTraversable.php +++ b/test/Asset/MockRoleWithPermissionTraversable.php @@ -2,11 +2,10 @@ declare(strict_types=1); -namespace LmcRbac\Mvc\DevToolsTest\Asset; +namespace LmcTest\Rbac\Mvc\DevToolsTest\Asset; use ArrayObject; -use Lmc\Rbac\Permission\PermissionInterface; -use Lmc\Rbac\Role\RoleInterface; +use Laminas\Permissions\Rbac\RoleInterface; class MockRoleWithPermissionTraversable implements RoleInterface { @@ -20,19 +19,19 @@ public function getName(): string return 'role-with-permission-traversable'; } - public function hasPermission(string|PermissionInterface $permission): bool + public function hasPermission(string $name): bool { return false; } - public function addPermission(string|PermissionInterface $permission): void + public function addPermission(string $name): void { } /** * Add a child. */ - public function addChild(RoleInterface $role): void + public function addChild(RoleInterface $child): void { } @@ -53,4 +52,13 @@ public function hasChildren(): bool { return false; } + + public function addParent(RoleInterface $parent): void + { + } + + public function getParents(): iterable + { + return []; + } } diff --git a/test/Bootstrap.php b/test/Bootstrap.php index bdf0e97..b60d186 100644 --- a/test/Bootstrap.php +++ b/test/Bootstrap.php @@ -16,13 +16,12 @@ * and is licensed under the MIT license. */ -use LmcRbac\Mvc\DevToolsTest\Util\ServiceManagerFactory; +use LmcTest\Rbac\Mvc\DevToolsTest\Util\ServiceManagerFactory; ini_set('error_reporting', E_ALL); $files = [ __DIR__ . '/../vendor/autoload.php', - __DIR__ . '/../../../autoload.php', ]; foreach ($files as $file) { diff --git a/test/Collector/RbacCollectorTest.php b/test/Collector/RbacCollectorTest.php index a0629fc..5c6e6db 100644 --- a/test/Collector/RbacCollectorTest.php +++ b/test/Collector/RbacCollectorTest.php @@ -19,9 +19,10 @@ declare(strict_types=1); -namespace LmcRbac\Mvc\DevToolsTest\Collector; +namespace LmcTest\Rbac\Mvc\DevToolsTest\Collector; use Laminas\Mvc\Application; +use Laminas\Mvc\ApplicationInterface; use Laminas\Mvc\MvcEvent; use Laminas\ServiceManager\ServiceManager; use Lmc\Rbac\Identity\IdentityInterface; @@ -33,20 +34,20 @@ use Lmc\Rbac\Mvc\Role\RecursiveRoleIteratorStrategy; use Lmc\Rbac\Mvc\Service\RoleService; use Lmc\Rbac\Role\InMemoryRoleProvider; -use Lmc\Rbac\Role\RoleInterface; +use Laminas\Permissions\Rbac\RoleInterface; use Lmc\Rbac\Role\RoleProviderInterface; use Lmc\Rbac\Service\RoleService as BaseRoleService; -use LmcRbac\Mvc\DevTools\Collector\RbacCollector; -use LmcRbac\Mvc\DevToolsTest\Asset\MockRoleWithPermissionMethod; -use LmcRbac\Mvc\DevToolsTest\Asset\MockRoleWithPermissionProperty; -use LmcRbac\Mvc\DevToolsTest\Asset\MockRoleWithPermissionTraversable; +use Lmc\Rbac\Mvc\DevTools\Collector\RbacCollector; +use LmcTest\Rbac\Mvc\DevToolsTest\Asset\MockRoleWithPermissionMethod; +use LmcTest\Rbac\Mvc\DevToolsTest\Asset\MockRoleWithPermissionProperty; +use LmcTest\Rbac\Mvc\DevToolsTest\Asset\MockRoleWithPermissionTraversable; use PHPUnit\Framework\TestCase; use function serialize; use function unserialize; /** - * @covers \LmcRbac\Mvc\DevTools\Collector\RbacCollector + * @covers \Lmc\Rbac\Mvc\DevTools\Collector\RbacCollector */ class RbacCollectorTest extends TestCase { @@ -68,7 +69,7 @@ public function testSerialize(): void $this->assertSame([], $unserialized['options']); } - public function testUnserialize(): vois + public function testUnserialize(): void { $collector = new RbacCollector(); $unserialized = [ @@ -108,7 +109,15 @@ public function testCollectNothingIfNoApplicationIsSet(): void { $mvcEvent = new MvcEvent(); $collector = new RbacCollector(); - $this->assertNull($collector->collect($mvcEvent)); + $collector->collect($mvcEvent); + $expectedCollection = [ + 'guards' => [], + 'roles' => [], + 'permissions' => [], + 'options' => [], + ]; + $test = $collector->getCollection(); + $this->assertEquals($expectedCollection, $collector->getCollection()); } public function testCanCollect(): void @@ -142,10 +151,7 @@ public function testCanCollect(): void ]; $serviceManager = new ServiceManager(); - $application = $this->getMockBuilder(Application::class) - ->disableOriginalConstructor() - ->getMock(); - + $application = $this->createMock('Laminas\Mvc\ApplicationInterface'); $application->expects($this->once())->method('getServiceManager')->willReturn($serviceManager); $mvcEvent = new MvcEvent(); @@ -184,7 +190,7 @@ public function testCanCollect(): void 'member' => ['guest'], ], 'permissions' => [ - 'member' => ['write', 'delete'], + 'member' => ['write', 'delete', 'read'], 'guest' => ['read'], ], 'options' => [ @@ -284,7 +290,7 @@ private function collectPermissionsPropertyTestBase(RoleInterface $role): array $identityProvider = $this->createMock(IdentityProviderInterface::class); $identityProvider->expects($this->once()) ->method('getIdentity') - ->will($this->returnValue($identity)); + ->willReturn($identity); $roleProvider = $this->createMock(RoleProviderInterface::class); diff --git a/test/ConfigProviderTest.php b/test/ConfigProviderTest.php index 040616c..3d6f446 100644 --- a/test/ConfigProviderTest.php +++ b/test/ConfigProviderTest.php @@ -2,17 +2,17 @@ declare(strict_types=1); -namespace LmcRbac\Mvc\DevToolsTest; +namespace LmcTest\Rbac\Mvc\DevToolsTest; use Laminas\ServiceManager\Factory\InvokableFactory; -use LmcRbac\Mvc\DevTools\Collector\RbacCollector; -use LmcRbac\Mvc\DevTools\ConfigProvider; +use Lmc\Rbac\Mvc\DevTools\Collector\RbacCollector; +use Lmc\Rbac\Mvc\DevTools\ConfigProvider; use PHPUnit\Framework\TestCase; use function realpath; /** - * @covers \LmcRbac\Mvc\DevTools\ConfigProvider + * @covers \Lmc\Rbac\Mvc\DevTools\ConfigProvider */ class ConfigProviderTest extends TestCase { diff --git a/test/ModuleTest.php b/test/ModuleTest.php index 67cfd19..ae8503e 100644 --- a/test/ModuleTest.php +++ b/test/ModuleTest.php @@ -2,14 +2,14 @@ declare(strict_types=1); -namespace LmcRbac\Mvc\DevToolsTest; +namespace LmcTest\Rbac\Mvc\DevToolsTest; -use LmcRbac\Mvc\DevTools\ConfigProvider; -use LmcRbac\Mvc\DevTools\Module; +use Lmc\Rbac\Mvc\DevTools\ConfigProvider; +use Lmc\Rbac\Mvc\DevTools\Module; use PHPUnit\Framework\TestCase; /** - * @covers \LmcRbac\Mvc\DevTools\Module + * @covers \Lmc\Rbac\Mvc\DevTools\Module */ class ModuleTest extends TestCase { diff --git a/test/Util/ServiceManagerFactory.php b/test/Util/ServiceManagerFactory.php index 4a9b8df..2e356fc 100644 --- a/test/Util/ServiceManagerFactory.php +++ b/test/Util/ServiceManagerFactory.php @@ -19,7 +19,7 @@ declare(strict_types=1); -namespace LmcRbac\Mvc\DevToolsTest\Util; +namespace LmcTest\Rbac\Mvc\DevToolsTest\Util; use Laminas\ModuleManager\ModuleManagerInterface; use Laminas\Mvc\Service\ServiceManagerConfig; From 57b5cd752bd92b62aa31992f61cce236f1554040 Mon Sep 17 00:00:00 2001 From: "Eric Richer eric.richer@vistoconsulting.com" Date: Fri, 30 Aug 2024 13:40:42 -0400 Subject: [PATCH 3/3] Updated test suite. Fixed use of RoleInterface --- composer.json | 12 +-- composer.lock | 138 ++++++++++----------------- src/Collector/RbacCollector.php | 10 +- test/Collector/RbacCollectorTest.php | 3 +- 4 files changed, 61 insertions(+), 102 deletions(-) diff --git a/composer.json b/composer.json index 4df4c88..13714f8 100644 --- a/composer.json +++ b/composer.json @@ -64,15 +64,5 @@ "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true } - }, - "repositories": [ - { - "type": "path", - "url": "../LmcRbacMvc" - }, - { - "type": "path", - "url": "../LmcRbac" - } - ] + } } diff --git a/composer.lock b/composer.lock index 298659c..03e6c37 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": "0de005c60b33cdd77d7cff6294274b74", + "content-hash": "8f13f8ed726b6a726171190491a88a73", "packages": [ { "name": "brick/varexporter", @@ -1382,11 +1382,17 @@ { "name": "lm-commons/lmc-rbac", "version": "2.0.x-dev", - "dist": { - "type": "path", - "url": "../LmcRbac", + "source": { + "type": "git", + "url": "https://github.com/LM-Commons/LmcRbac.git", "reference": "ae7b1c67126d5c7a1c8da7fb17ec209b5ac70164" }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/LM-Commons/LmcRbac/zipball/ae7b1c67126d5c7a1c8da7fb17ec209b5ac70164", + "reference": "ae7b1c67126d5c7a1c8da7fb17ec209b5ac70164", + "shasum": "" + }, "require": { "doctrine/persistence": "^2.0 || ^3.0", "laminas/laminas-permissions-rbac": "^3.0", @@ -1419,35 +1425,7 @@ "Lmc\\Rbac\\": "src/" } }, - "autoload-dev": { - "psr-4": { - "LmcTest\\Rbac\\": "test/" - } - }, - "scripts": { - "check": [ - "@cs-check", - "@test" - ], - "cs-check": [ - "phpcs" - ], - "cs-fix": [ - "phpcbf" - ], - "test": [ - "phpunit --colors=always" - ], - "test-coverage": [ - "phpunit --coverage-clover ./build/logs/clover.xml" - ], - "test-coverage-html": [ - "phpunit --colors=always --coverage-html ./build/html" - ], - "static-analysis": [ - "psalm --shepherd --stats" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -1487,17 +1465,25 @@ "permissions", "rbac" ], - "transport-options": { - "relative": true - } + "support": { + "issues": "https://github.com/LM-Commons/LmcRbac/issues", + "source": "https://github.com/LM-Commons/LmcRbac/tree/2.0.x" + }, + "time": "2024-08-27T20:02:07+00:00" }, { "name": "lm-commons/lmc-rbac-mvc", "version": "4.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/LM-Commons/LmcRbacMvc.git", + "reference": "a6c787322d5201c71941740e387ed0ba8d2bd98e" + }, "dist": { - "type": "path", - "url": "../LmcRbacMvc", - "reference": "fe85a533bd7772d8098c5da1fb58e4d9483476ca" + "type": "zip", + "url": "https://api.github.com/repos/LM-Commons/LmcRbacMvc/zipball/a6c787322d5201c71941740e387ed0ba8d2bd98e", + "reference": "a6c787322d5201c71941740e387ed0ba8d2bd98e", + "shasum": "" }, "require": { "laminas/laminas-config": "^3.1", @@ -1530,35 +1516,7 @@ "Lmc\\Rbac\\Mvc\\": "src" } }, - "autoload-dev": { - "psr-4": { - "LmcTest\\Rbac\\Mvc\\": "tests" - } - }, - "scripts": { - "check": [ - "@cs-check", - "@test" - ], - "test": [ - "phpunit" - ], - "test-coverage": [ - "phpunit --coverage-clover ./build/logs/clover.xml" - ], - "cs-check": [ - "phpcs" - ], - "cs-fix": [ - "phpcbf" - ], - "test-coverage-html": [ - "phpunit --coverage-html ./build/html" - ], - "static-analysis": [ - "psalm --shepherd --stats" - ] - }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -1590,9 +1548,11 @@ "permissions", "rbac" ], - "transport-options": { - "relative": true - } + "support": { + "issues": "https://github.com/LM-Commons/LmcRbacMvc/issues", + "source": "https://github.com/LM-Commons/LmcRbacMvc/tree/4.0.x" + }, + "time": "2024-08-30T17:29:54+00:00" }, { "name": "nikic/php-parser", @@ -1949,16 +1909,16 @@ }, { "name": "symfony/var-dumper", - "version": "v6.4.10", + "version": "v6.4.11", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "a71cc3374f5fb9759da1961d28c452373b343dd4" + "reference": "ee14c8254a480913268b1e3b1cba8045ed122694" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/a71cc3374f5fb9759da1961d28c452373b343dd4", - "reference": "a71cc3374f5fb9759da1961d28c452373b343dd4", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ee14c8254a480913268b1e3b1cba8045ed122694", + "reference": "ee14c8254a480913268b1e3b1cba8045ed122694", "shasum": "" }, "require": { @@ -2014,7 +1974,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.10" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.11" }, "funding": [ { @@ -2030,7 +1990,7 @@ "type": "tidelift" } ], - "time": "2024-07-26T12:30:32+00:00" + "time": "2024-08-30T16:03:21+00:00" }, { "name": "webimpress/safe-writer", @@ -4979,16 +4939,16 @@ }, { "name": "symfony/console", - "version": "v6.4.10", + "version": "v6.4.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "504974cbe43d05f83b201d6498c206f16fc0cdbc" + "reference": "42686880adaacdad1835ee8fc2a9ec5b7bd63998" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/504974cbe43d05f83b201d6498c206f16fc0cdbc", - "reference": "504974cbe43d05f83b201d6498c206f16fc0cdbc", + "url": "https://api.github.com/repos/symfony/console/zipball/42686880adaacdad1835ee8fc2a9ec5b7bd63998", + "reference": "42686880adaacdad1835ee8fc2a9ec5b7bd63998", "shasum": "" }, "require": { @@ -5053,7 +5013,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.10" + "source": "https://github.com/symfony/console/tree/v6.4.11" }, "funding": [ { @@ -5069,7 +5029,7 @@ "type": "tidelift" } ], - "time": "2024-07-26T12:30:32+00:00" + "time": "2024-08-15T22:48:29+00:00" }, { "name": "symfony/filesystem", @@ -5460,16 +5420,16 @@ }, { "name": "symfony/string", - "version": "v6.4.10", + "version": "v6.4.11", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "ccf9b30251719567bfd46494138327522b9a9446" + "reference": "5bc3eb632cf9c8dbfd6529d89be9950d1518883b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/ccf9b30251719567bfd46494138327522b9a9446", - "reference": "ccf9b30251719567bfd46494138327522b9a9446", + "url": "https://api.github.com/repos/symfony/string/zipball/5bc3eb632cf9c8dbfd6529d89be9950d1518883b", + "reference": "5bc3eb632cf9c8dbfd6529d89be9950d1518883b", "shasum": "" }, "require": { @@ -5526,7 +5486,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.10" + "source": "https://github.com/symfony/string/tree/v6.4.11" }, "funding": [ { @@ -5542,7 +5502,7 @@ "type": "tidelift" } ], - "time": "2024-07-22T10:21:14+00:00" + "time": "2024-08-12T09:55:28+00:00" }, { "name": "theseer/tokenizer", diff --git a/src/Collector/RbacCollector.php b/src/Collector/RbacCollector.php index 02dd2d4..5dd3506 100644 --- a/src/Collector/RbacCollector.php +++ b/src/Collector/RbacCollector.php @@ -124,8 +124,15 @@ private function collectGuards(array $guards): void private function collectIdentityRolesAndPermissions(RoleService $roleService): void { $identityRoles = $roleService->getIdentityRoles(); - foreach ($identityRoles as $role) { + $iterator = new RecursiveIteratorIterator( + new RecursiveRoleIterator($identityRoles), + RecursiveIteratorIterator::SELF_FIRST + ); + foreach ($iterator as $role) { $roleName = $role->getName(); + $this->collectedRoles[] = $roleName; + $this->collectPermissions($role); + /* if (empty($role->getChildren())) { $this->collectedRoles[] = $roleName; } else { @@ -140,6 +147,7 @@ private function collectIdentityRolesAndPermissions(RoleService $roleService): v } $this->collectPermissions($role); + */ } } diff --git a/test/Collector/RbacCollectorTest.php b/test/Collector/RbacCollectorTest.php index 5c6e6db..44eff3f 100644 --- a/test/Collector/RbacCollectorTest.php +++ b/test/Collector/RbacCollectorTest.php @@ -187,7 +187,8 @@ public function testCanCollect(): void ], ], 'roles' => [ - 'member' => ['guest'], + 'member', 'guest', +// 'member' => ['guest'], ], 'permissions' => [ 'member' => ['write', 'delete', 'read'],