Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In laravel telescope logs "list" console command every minute #130

Open
didoin opened this issue Oct 16, 2024 · 0 comments
Open

In laravel telescope logs "list" console command every minute #130

didoin opened this issue Oct 16, 2024 · 0 comments

Comments

@didoin
Copy link

didoin commented Oct 16, 2024

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]',
        ],
    ],
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant