File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 6
6
use Illuminate \Console \Command ;
7
7
use Illuminate \Contracts \Config \Repository ;
8
8
use Illuminate \Foundation \Http \FormRequest ;
9
- use Illuminate \Routing \RouteAction ;
10
9
use Illuminate \Routing \Router ;
11
10
use Illuminate \Support \Facades \Storage ;
12
11
use Illuminate \Support \Str ;
@@ -142,7 +141,7 @@ public function handle(): void
142
141
protected function getReflectionMethod (array $ routeAction ): ?object
143
142
{
144
143
// Hydrates the closure if it is an instance of Opis\Closure\SerializableClosure
145
- if (RouteAction:: containsSerializedClosure ($ routeAction )) {
144
+ if ($ this -> containsSerializedClosure ($ routeAction )) {
146
145
$ routeAction ['uses ' ] = unserialize ($ routeAction ['uses ' ])->getClosure ();
147
146
}
148
147
@@ -160,6 +159,12 @@ protected function getReflectionMethod(array $routeAction): ?object
160
159
return $ reflection ->getMethod ($ routeData [1 ]);
161
160
}
162
161
162
+ public static function containsSerializedClosure (array $ action ): bool
163
+ {
164
+ return is_string ($ action ['uses ' ]) &&
165
+ Str::startsWith ($ action ['uses ' ], 'C:32:"Opis \\Closure \\SerializableClosure ' ) !== false ;
166
+ }
167
+
163
168
protected function buildTree (array &$ routes , array $ segments , array $ request ): void
164
169
{
165
170
$ parent = &$ routes ;
You can’t perform that action at this time.
0 commit comments