Skip to content

Commit

Permalink
fix: dto-interface services must be non-shared
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Jun 15, 2024
1 parent faa900c commit 533ad8d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: "8.2"
php-version: "8.3"
tools: cs2pr

- name: Cache dependencies installed with composer
Expand Down
1 change: 0 additions & 1 deletion src/DTO/Routing/AnnotationRoutingLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public function load(mixed $class, string|null $type = null): RouteCollection
return $routeCollection;
}

// @phpstan-ignore-next-line
$interfaces = $this->locator->getInterfaces();
sort($interfaces);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public function process(ContainerBuilder $container): void
assert($factory instanceof AccessInterceptorFactory);

$this->proxyFactory = $factory;
// @phpstan-ignore-next-line
if (function_exists(AnnotationRegistry::class . '::registerUniqueLoader')) {
// @phpstan-ignore-next-line
AnnotationRegistry::registerUniqueLoader('class_exists');
Expand Down Expand Up @@ -108,6 +109,7 @@ public function process(ContainerBuilder $container): void
$container->register($interface, $interface)
->setFactory([new Reference(ResolverInterface::class), 'resolve'])
->addArgument($interface)
->setShared(false)
->setPublic(true);
}

Expand Down

0 comments on commit 533ad8d

Please sign in to comment.