You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It happens everytime and that's the code from extension that's giving the error.
(it's not my code but i clicked on "copy error to clipboard" from error popup)
error_reporting(E_ERROR | E_PARSE);
define('LARAVEL_START', microtime(true));
require_once DIR . '/../autoload.php';
$app = require_once DIR . '/../../bootstrap/app.php';
class VsCodeLaravel extends \Illuminate\Support\ServiceProvider
{
public function register()
{
}
public function boot()
{
if (method_exists($this->app['log'], 'setHandlers')) {
$this->app['log']->setHandlers([new \Monolog\Handler\ProcessHandler()]);
}
}
Extension Version
0.1.14
PHP Binary
Local PHP
Operating System
Windows
What happened?
It happens everytime and that's the code from extension that's giving the error.
(it's not my code but i clicked on "copy error to clipboard" from error popup)
error_reporting(E_ERROR | E_PARSE);
define('LARAVEL_START', microtime(true));
require_once DIR . '/../autoload.php';
$app = require_once DIR . '/../../bootstrap/app.php';
class VsCodeLaravel extends \Illuminate\Support\ServiceProvider
{
public function register()
{
}
}
$app->register(new VsCodeLaravel($app));
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$kernel->bootstrap();
echo 'VSCODE_LARAVEL_START_OUTPUT';
collect(glob(base_path('**/Models/*.php')))->each(fn ($file) => include_once($file));
if (class_exists('\phpDocumentor\Reflection\DocBlockFactory')) {
$factory = \phpDocumentor\Reflection\DocBlockFactory::createInstance();
} else {
$factory = null;
}
$reflection = new \ReflectionClass(\Illuminate\Database\Query\Builder::class);
$builderMethods = collect($reflection->getMethods(\ReflectionMethod::IS_PUBLIC))
->filter(function (ReflectionMethod $method) {
return !str_starts_with($method->getName(), "__");
})
->map(function (\ReflectionMethod $method) use ($factory) {
if ($factory === null) {
$params = collect($method->getParameters())
->map(function (\ReflectionParameter $param) {
$types = match ($param?->getType()) {
null => [],
default => method_exists($param->getType(), "getTypes")
? $param->getType()->getTypes()
: [$param->getType()]
};
})
->filter()
->values();
echo collect([
'builderMethods' => $builderMethods,
'models' => collect(get_declared_classes())
->filter(function ($class) {
return is_subclass_of($class, \Illuminate\Database\Eloquent\Model::class);
})
->filter(function ($class) {
return !in_array($class, [\Illuminate\Database\Eloquent\Relations\Pivot::class, \Illuminate\Foundation\Auth\User::class]);
})
->values()
->flatMap(function (string $className) {
$output = new \Symfony\Component\Console\Output\BufferedOutput();
])->toJson();
;
echo 'VSCODE_LARAVEL_END_OUTPUT';
exit(0);
Mimimal Code Sample
No response
The text was updated successfully, but these errors were encountered: