beyondcode / invoker-community

74 stars 2 forks source link

Error on load proyect #317

Closed wrtisans closed 1 year ago

wrtisans commented 1 year ago

OS: darwin Invoker Version: 2.10.0 Laravel Version: 9.36.4 Local project: true PHP Binary: /opt/homebrew/bin/php Route: /project/placeholder?project=local-1VLEi4Uu3zbnBXwZcLvPLC

Error:

AssertionError 

  assert($parameterType instanceof \ReflectionNamedType || $parameterType === null)

  at phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/vendor/roave/better-reflection/src/SourceLocator/SourceStubber/ReflectionSourceStubber.php:332
    328▕         if ($parameterReflection->isPassedByReference()) {
    329▕             $parameterNode->makeByRef();
    330▕         }
    331▕         $parameterType = $parameterReflection->getType();
  ➜ 332▕         \assert($parameterType instanceof \ReflectionNamedType || $parameterType === null);
    333▕         if ($parameterReflection->getType() !== null) {
    334▕             $parameterNode->setType($this->formatType($parameterType));
    335▕         }
    336▕         return $parameterNode;

      +13 vendor frames 
  14  [internal]:0
      _HumbugBox5bc770953b87\Roave\BetterReflection\Reflection\ReflectionClass::_HumbugBox5bc770953b87\Roave\BetterReflection\Reflection\{closure}(Object(_HumbugBox5bc770953b87\PhpParser\Node\Name\FullyQualified))

      +2 vendor frames 
  17  phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/src/ModelLookupService.php:159
      _HumbugBox5bc770953b87\Roave\BetterReflection\Reflection\ReflectionClass::getTraitNames()
juancruzmartino commented 1 year ago

Getting the same error

mpociot commented 1 year ago

Could you share the PHP version you're using?

mpociot commented 1 year ago

This error will be gone in the next Invoker version.