✏️ Describe the bug
Optimize command data:cache-structures fails if app/Data directory doesn't exist.
This issue surfaced as a result of the recent registration of optimize commands introduced in #880, while running php artisan optimize in production. The app in question does not store data objects inside app/Data and therefore the folder didn't exist.
↪️ To Reproduce
Remove app/Data folder, or temporarily rename it.
run php artisan data:cache-structures or php artisan optimize if on Laravel 11.27+.
Symfony\Component\Finder\Exception\DirectoryNotFoundException will be thrown expecting app/Data to exist.
✅ Expected behavior
Gracefully continue if app/Data doesn't exist.
Wanted to report this issue for now and get eyes on it. I will try to work on a PR later when I have some time. If anyone else can get to it sooner, that's great too.
✏️ Describe the bug Optimize command
data:cache-structures
fails if app/Data directory doesn't exist.This issue surfaced as a result of the recent registration of optimize commands introduced in #880, while running
php artisan optimize
in production. The app in question does not store data objects inside app/Data and therefore the folder didn't exist.↪️ To Reproduce
php artisan data:cache-structures
orphp artisan optimize
if on Laravel 11.27+.Symfony\Component\Finder\Exception\DirectoryNotFoundException
will be thrown expecting app/Data to exist.✅ Expected behavior Gracefully continue if app/Data doesn't exist.
🖥️ Versions
Laravel: 11.29.0 Laravel Data: 4.11.0 PHP: 8.3.12