File tree Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ private static function scanExistingModelEndpointClasses(string $directory): arr
115115 continue ;
116116 }
117117
118- $ newInstance = $ reflectionClass ->newInstance ();
118+ $ newInstance = $ reflectionClass ->newInstanceWithoutConstructor ();
119119 $ path = OpenApiModelUtils::normalizePath ($ newInstance ->getPath ());
120120 $ method = $ newInstance ->getMethod ();
121121 if ($ method instanceof Method === false ) {
Original file line number Diff line number Diff line change 2424use ReflectionClass ;
2525use ReflectionException ;
2626use RuntimeException ;
27- use Throwable ;
2827use ToshY \BunnyNet \Attributes \BodyProperty ;
2928use ToshY \BunnyNet \Attributes \HeaderProperty ;
3029use ToshY \BunnyNet \Attributes \PathProperty ;
@@ -985,19 +984,15 @@ private function scanExistingEndpoints(): array
985984 continue ;
986985 }
987986
988- try {
989- $ reflectionClass = new ReflectionClass ($ endpointClass );
990- /** @var ModelInterface $instance */
991- $ instance = $ reflectionClass ->newInstance ();
992-
993- $ existingEndpoints [$ endpointClass ] = [
994- 'headers ' => $ instance ->getHeaders (),
995- 'path ' => $ instance ->getPath (),
996- 'method ' => $ instance ->getMethod (),
997- ];
998- } catch (Throwable ) {
999- continue ;
1000- }
987+ $ reflectionClass = new ReflectionClass ($ endpointClass );
988+ /** @var ModelInterface $instance */
989+ $ instance = $ reflectionClass ->newInstanceWithoutConstructor ();
990+
991+ $ existingEndpoints [$ endpointClass ] = [
992+ 'headers ' => $ instance ->getHeaders (),
993+ 'path ' => $ instance ->getPath (),
994+ 'method ' => $ instance ->getMethod (),
995+ ];
1001996 }
1002997 }
1003998
You can’t perform that action at this time.
0 commit comments