Skip to content

[Bug]: Error starting Laravel extension __VSCODE_LARAVEL_START_OUTPUT__ #506

@bretterer

Description

@bretterer

Extension Version

1.2.1

PHP Binary

Herd

Operating System

macOS

What happened?

Debug Info

{
  "os": "darwin",
  "arch": "x64",
  "php_version": "8.3.28",
  "laravel_version": "12.37.0",
  "php_command": "\"/Users/bretterer/Library/Application Support/Herd/bin/php83\""
}

Auth Data

Error: __VSCODE_LARAVEL_START_OUTPUT__
   TypeError 

  ReflectionFunction::__construct(): Argument #1 ($function) must be of type Closure|string, array given

  at vendor/_laravel_ide/discover-d65bb7343c1593c04a323211e6bd1f9a.php:134
    130▕     echo json_encode([
    131▕         'authenticatable' => vsCodeGetAuthenticatable(),
    132▕         'policies' => collect(\Illuminate\Support\Facades\Gate::abilities())
    133▕                         ->map(function ($policy, $key) {
  ➜ 134▕                             $reflection = new \ReflectionFunction($policy);
    135▕                             $policyClass = null;
    136▕                             $closureThis = $reflection->getClosureThis();
    137▕ 
    138▕                             if ($closureThis !== null) {

      �[2m+1 vendor frames �[22m
  2   [internal]:0

Mimimal Code Sample

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions