beyondcode / invoker-community

74 stars 2 forks source link

Bug in Invoker (ReflectionNamedType) #310

Closed charlielangridge closed 1 year ago

charlielangridge commented 2 years ago

OS: win32 Invoker Version: 2.9.0 Laravel Version: 9.28.0 Local project: true PHP Binary: C:\laragon\bin\php\php-8.1.3-Win32-vs16-x64\php.exe Route: /dashboard?project=local-qjMGWY2PUqbgARZBUe2YQe

Error:

AssertionError 

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

  at phar://C:/Users/CharlieLangridge/AppData/Local/Programs/Invoker/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
      _HumbugBoxf4b902e0e9ad\Roave\BetterReflection\Reflection\ReflectionClass::_HumbugBoxf4b902e0e9ad\Roave\BetterReflection\Reflection\{closure}(Object(_HumbugBoxf4b902e0e9ad\PhpParser\Node\Name\FullyQualified))

      +2 vendor frames 
  17  phar://C:/Users/CharlieLangridge/AppData/Local/Programs/Invoker/resources/invoker.phar/src/ModelLookupService.php:159
      _HumbugBoxf4b902e0e9ad\Roave\BetterReflection\Reflection\ReflectionClass::getTraitNames()
mpociot commented 1 year ago

Duplicate of #317