Skip to content

Commit

Permalink
Merge pull request #35 from mezzio/renovate/major-laminas
Browse files Browse the repository at this point in the history
Update dependency laminas/laminas-servicemanager to v4
  • Loading branch information
gsteel authored Mar 4, 2024
2 parents abc1d23 + 35545f7 commit de4a485
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 49 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
125 changes: 88 additions & 37 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/ConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@

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 [
'dependencies' => $this->getDependencies(),
];
}

/** @return ServiceManagerConfigurationType */
/** @return ServiceManagerConfiguration */
public function getDependencies(): array
{
return [
Expand Down
9 changes: 4 additions & 5 deletions test/ConfigProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 */
Expand All @@ -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)();
Expand All @@ -37,7 +36,7 @@ public function testInvocationReturnsArray(): array
}

/**
* @param array{dependencies: ServiceManagerConfigurationType} $config
* @param array{dependencies: ServiceManagerConfiguration} $config
* @psalm-suppress RedundantConditionGivenDocblockType
*/
#[Depends('testInvocationReturnsArray')]
Expand Down Expand Up @@ -89,7 +88,7 @@ public function testServicesDefinedInConfigProvider(): void
}
}

/** @param ServiceManagerConfigurationType $dependencies */
/** @param ServiceManagerConfiguration $dependencies */
private function getContainer(array $dependencies): ServiceManager
{
return new ServiceManager($dependencies);
Expand Down

0 comments on commit de4a485

Please sign in to comment.