diff --git a/src/AppAdapter.php b/src/AppAdapter.php index 277cd32d..929c0a25 100644 --- a/src/AppAdapter.php +++ b/src/AppAdapter.php @@ -11,6 +11,7 @@ use function assert; use function sprintf; +use function str_contains; use function str_ends_with; use function str_replace; use function ucwords; @@ -57,7 +58,7 @@ public function get(AbstractUri $uri): ResourceObject private function getNotFound(AbstractUri $uri, Unbound $e, string $class): Throwable { $unboundClass = $e->getMessage(); - if ($unboundClass === "{$class}-") { + if (str_contains($unboundClass, "{$class}-")) { return new ResourceNotFoundException((string) $uri, 404, $e); }