area17 / blast

Storybook for Laravel Blade 🚀
https://dev.to/area17/getting-started-with-blast-storybook-for-laravel-blade-c5c
Apache License 2.0
268 stars 39 forks source link

Default brandImage config entry causes deprecation notice in PHP 8.1 #52

Closed RVxLab closed 2 years ago

RVxLab commented 2 years ago

Relevant doc entry: https://www.php.net/manual/en/migration81.deprecated.php#migration81.deprecated.core.static-trait

The default config causes the following notice:

Deprecated: Calling static trait method A17\Blast\Traits\StorybookLogo::defaultLogo is deprecated, it should only be called on a class using the trait in /var/www/html/config/blast.php on line 80

Suggested fix:

Make A17\Blast\Traits\StorybookLogo a class instead of a trait. However this could count as a BC break.

An alternative suggestion is to mark that trait as deprecated to be in line with PHP 8.1's deprecations and create a new class that does the exact same.

I can provide a PR if you'd like.