Skip to content

Deprecation on optimize commands #54190

@K2ouMais

Description

@K2ouMais

Laravel Version

11.38.1

PHP Version

8.4.2

Database Driver & Version

No response

Description

The command php artisan optimize and php artisan optimize:clear trigger some deprecations on the php explode() function.

[2025-01-14 21:00:31] local.WARNING: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeClearCommand.php on line 37

[2025-01-14 21:00:31] local.WARNING: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php on line 37

Steps To Reproduce

Enable deprecations and use the following commands:
php artisan optimize
php artisan optimize:clear

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions