From 32e20664a868991fc1e440a14c0ad378219363c5 Mon Sep 17 00:00:00 2001 From: Yoshitaka Jingu Date: Fri, 18 Oct 2024 16:54:29 +0900 Subject: [PATCH] Adjustments for changes to the Unbound exception message in CompileInjector --- src/AppAdapter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }