Skip to content

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

Merged
taylorotwell merged 2 commits into
laravel:11.xfrom
cosmastech:patch-4
Jan 15, 2025
Merged

[11.x] Fix deprecation warnings in optimize:clear and optimize#54197
taylorotwell merged 2 commits into
laravel:11.xfrom
cosmastech:patch-4

Conversation

@cosmastech

@cosmastech cosmastech commented Jan 15, 2025

Copy link
Copy Markdown
Contributor

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.

@github-actions

Copy link
Copy Markdown

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
$this->components->info('Clearing cached bootstrap files.');

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

Copy link
Copy Markdown
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

see #54214

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