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

[11.x] Fix deprecation warnings in optimize:clear and optimize #54197

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

cosmastech
Copy link
Contributor

@cosmastech cosmastech commented Jan 15, 2025

To resolve #54190

Passing null to explode() produces a deprecation warning. I coalesced the option to a blank string, and modified the tests so the tests will fail if there's a deprecation warning.

Copy link

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@cosmastech cosmastech marked this pull request as ready for review January 15, 2025 01:57
@@ -34,7 +34,7 @@ public function handle()
{
$this->components->info('Clearing cached bootstrap files.');

$exceptions = Collection::wrap(explode(',', $this->option('except')))
$exceptions = Collection::wrap(explode(',', $this->option('except') ?? ''))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there the need, to call all these at all if $this->option('except') is null? Maybe let's just wrap that in an if statement

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see #54214

@taylorotwell taylorotwell merged commit 5107066 into laravel:11.x Jan 15, 2025
38 checks passed
@cosmastech cosmastech deleted the patch-4 branch January 15, 2025 22:05
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

Successfully merging this pull request may close these issues.

Deprecation on optimize commands
3 participants