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

$path being null causes deprecation warnings in logs when using Telescope #444

Open
MaxKorlaar opened this issue Apr 28, 2024 · 0 comments

Comments

@MaxKorlaar
Copy link

When using Laravel Telescope's View Watcher deprecation warnings are emitted for every view that's being watched, thanks to the fact that Twigbridge sets the views' paths to null instead of the actual path:

str_starts_with(): Passing null to parameter #1 ($haystack) of type string is deprecated in /project/vendor/laravel/framework/src/Illuminate/Support/Str.php on line 1439

This is done in EventNode.php: https://github.com/rcrowe/TwigBridge/blob/master/src/Node/EventNode.php#L39C13-L39C17

In Telescope's ViewWatcher.php this path is used in a call to Str::startsWith which in turn uses str_starts_with, and as the warning already implies passing null as the string parameter is deprecated.

Is the path set to null on purpose or would it not be a problem to set it to the view's path?

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