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

PHP 8.4 deprecation in optimize:clear command #54232

Closed
rcerljenko opened this issue Jan 17, 2025 · 3 comments
Closed

PHP 8.4 deprecation in optimize:clear command #54232

rcerljenko opened this issue Jan 17, 2025 · 3 comments

Comments

@rcerljenko
Copy link

Laravel Version

11.38.2

PHP Version

8.3.15

Database Driver & Version

No response

Description

Calling php artisan optimize:clear without any arguments logs this to the logger:

explode(): Passing null to parameter #2 ($string) of type string is deprecated in /.../vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeClearCommand.php on line 37

I suspect this has something to do with the latest PR on that matter => #54070

Steps To Reproduce

Just run php artisan optimize:clear without any other arguments.

@rcerljenko
Copy link
Author

Hi @jonerickson ,

It's probably enough to just null-coalesce the option() method on line 37 in Optimize and OptimizeClear commands:

$this->option('except') ?? ''

@jonerickson
Copy link
Contributor

Hi @jonerickson ,

It's probably enough to just null-coalesce the option() method on line 37 in Optimize and OptimizeClear commands:

$this->option('except') ?? ''

Thanks @rcerljenko, I will push a PR to address that!

@cosmastech
Copy link
Contributor

This has already been resolved. #54197

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

4 participants