Skip to content

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

Open
@MaxKorlaar

Description

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions