Skip to content

Commit 83f12c9

Browse files
committed
fix(container): revert circular alias to plain RuntimeException
resolveAlias() is called from both get() and has(); throwing ContainerExceptionInterface from has() would violate PSR-11.
1 parent d88dfa2 commit 83f12c9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Container/SimpleContainer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ private function resolveAlias(string $id): string
149149

150150
while (isset($this->aliases[$id])) {
151151
if (isset($seen[$id])) {
152-
throw new class("Circular alias detected for '{$id}'.") extends RuntimeException implements ContainerExceptionInterface {};
152+
throw new RuntimeException("Circular alias detected for '{$id}'.");
153153
}
154154

155155
$seen[$id] = true;

0 commit comments

Comments
 (0)