PHP Fatal error: Uncaught TypeError: Argument 1 passed to BetterReflection\Reflection\ReflectionClass::BetterReflection\Reflection\{closure}() must be an instance of BetterReflection\Reflection\ReflectionClass, null given in /home/github/GithubArtaxService/GithubArtaxService/vendor/roave/better-reflection/src/Reflection/ReflectionClass.php:299
Stack trace:
#0 [internal function]: BetterReflection\Reflection\ReflectionClass->BetterReflection\Reflection\{closure}(NULL)
#1 /home/github/GithubArtaxService/GithubArtaxService/vendor/roave/better-reflection/src/Reflection/ReflectionClass.php(305): array_map(Object(Closure), Array)
#2 /home/github/GithubArtaxService/GithubArtaxService/vendor/roave/better-reflection/src/Reflection/ReflectionClass.php(332): BetterReflection\Reflection\ReflectionClass->scanMethods()
#3 /home/github/GithubArtaxService/GithubArtaxService/vendor/roave/better-reflection/src/Reflection/ReflectionClass.php(345): BetterReflection\Reflection\ReflectionClass->getMethodsIndexedByName()
#4 /home/github/GithubArtax in /home/github/GithubArtaxService/GithubArtaxService/vendor/roave/better-reflection/src/Reflection/ReflectionClass.php on line 299
Code to reproduce error:
<?php
use BetterReflection\Reflector\ClassReflector;
use BetterReflection\SourceLocator\Type\SingleFileSourceLocator;
$autoloader = require __DIR__.'/../vendor/autoload.php';
exec('wget --no-check-certificate https://raw.githubusercontent.com/slimphp/Slim/e08856b997891e9303c72120d766434b13874b71/Slim/App.php');
$sourceLocator = new SingleFileSourceLocator("./App.php");
$reflector = new ClassReflector($sourceLocator);
$reflClass = $reflector->reflect('Slim\App');
$properties = $reflClass->getProperties();
$methods = $reflClass->getMethods();
Seems to be an internal error:
Output:
Code to reproduce error: