Closed domthomas-dev closed 1 year ago
OS: darwin Invoker Version: 2.9.0 Laravel Version: 9.20.0 Local project: true PHP Binary: /opt/homebrew/bin/php Route: /project/placeholder?project=local-sjFdgfRankCQUy4zp4WHhL
Error:
AssertionError assert($returnType instanceof \ReflectionNamedType || $returnType === null) at phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/vendor/roave/better-reflection/src/SourceLocator/SourceStubber/ReflectionSourceStubber.php:265 261▕ $this->addMethodFlags($methodNode, $methodReflection); 262▕ $this->addDocComment($methodNode, $methodReflection); 263▕ $this->addParameters($methodNode, $methodReflection); 264▕ $returnType = $methodReflection->getReturnType(); ➜ 265▕ \assert($returnType instanceof \ReflectionNamedType || $returnType === null); 266▕ if ($methodReflection->getReturnType() !== null) { 267▕ $methodNode->setReturnType($this->formatType($returnType)); 268▕ } 269▕ $classNode->addStmt($methodNode); [2m+11 vendor frames [22m 12 [internal]:0 _HumbugBoxf4b902e0e9ad\Roave\BetterReflection\Reflection\ReflectionClass::_HumbugBoxf4b902e0e9ad\Roave\BetterReflection\Reflection\{closure}(Object(_HumbugBoxf4b902e0e9ad\PhpParser\Node\Name\FullyQualified)) [2m+2 vendor frames [22m 15 phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/src/ModelLookupService.php:159 _HumbugBoxf4b902e0e9ad\Roave\BetterReflection\Reflection\ReflectionClass::getTraitNames()
Which PHP version do you use?
I'm getting that exact same error in our project. php 8.1.8
Same error in 8.1.10 and 8.1.11
This error will be gone in the next Invoker version.
OS: darwin Invoker Version: 2.9.0 Laravel Version: 9.20.0 Local project: true PHP Binary: /opt/homebrew/bin/php Route: /project/placeholder?project=local-sjFdgfRankCQUy4zp4WHhL
Error: