vscode-laravel-extra-intellisense icon indicating copy to clipboard operation
vscode-laravel-extra-intellisense copied to clipboard

In laravel telescope logs "list" console command every minute

Open didoin opened this issue 1 year ago • 0 comments

The problem is caused by the Helpers.runLaravel function, which runs every minute and simulates the execution of a console command without arguments (default list).

// helpers.ts
...
"$app->register(new VscodeLaravelExtraIntellisenseProvider($app));" +
"$kernel = $app->make(Illuminate\\Contracts\\Console\\Kernel::class);" +

"$status = $kernel->handle(" +
	"$input = new Symfony\\Component\\Console\\Input\\ArgvInput," +
	"new Symfony\\Component\\Console\\Output\\ConsoleOutput" +
");" +
"if ($status == 0) {" +
"	echo '___VSCODE_LARAVEL_EXTRA_INSTELLISENSE_OUTPUT___';" +
        code +
	"	echo '___VSCODE_LARAVEL_EXTRA_INSTELLISENSE_END_OUTPUT___';" +
"}" +
...

Is it possible to modify the code to avoid the console call or if not, give an argument to the command so that it can be filtered by telescope?

Example:

// config/telescope.php
'watchers' => [
    Watchers\CommandWatcher::class => [
        'enabled' => env('TELESCOPE_COMMAND_WATCHER', true),
        'ignore' => [
            '[CUSTOM_ARGV]',
        ],
    ],
]

didoin avatar Oct 16 '24 18:10 didoin