From df875e4d081b74f10f46db9e138867a87fdb4257 Mon Sep 17 00:00:00 2001 From: NickSdot Date: Fri, 6 Jun 2025 14:56:50 +0800 Subject: [PATCH] revert: https://github.com/laravel/framework/pull/55939 --- src/Illuminate/Support/NamespacedItemResolver.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/Support/NamespacedItemResolver.php b/src/Illuminate/Support/NamespacedItemResolver.php index 26f0939a1071..10007be9e30e 100755 --- a/src/Illuminate/Support/NamespacedItemResolver.php +++ b/src/Illuminate/Support/NamespacedItemResolver.php @@ -30,7 +30,7 @@ public function parseKey($key) // namespace, and is just a regular configuration item. Namespaces are a // tool for organizing configuration items for things such as modules. if (! str_contains($key, '::')) { - $segments = explode('.', (string) $key); + $segments = explode('.', $key); $parsed = $this->parseBasicSegments($segments); } else { @@ -74,12 +74,12 @@ protected function parseBasicSegments(array $segments) */ protected function parseNamespacedSegments($key) { - [$namespace, $item] = explode('::', (string) $key); + [$namespace, $item] = explode('::', $key); // First we'll just explode the first segment to get the namespace and group // since the item should be in the remaining segments. Once we have these // two pieces of data we can proceed with parsing out the item's value. - $itemSegments = explode('.', (string) $item); + $itemSegments = explode('.', $item); $groupAndItem = array_slice( $this->parseBasicSegments($itemSegments), 1