Skip to content

Bring back postAutoloadDump script #6662

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

Merged
merged 1 commit into from
Aug 21, 2025
Merged

Conversation

jasonvarga
Copy link
Contributor

This PR reverts #6647 which unfortunately broke things.

If you do a composer update which results in a service provider being removed, the artisan config:clear fails with an error about the service provider not being found.

- Upgrading intervention/image (2.7.2 => 3.11.4): Extracting archive

...

Generating optimized autoload files
> @php artisan config:clear

In Application.php line 960:
                                                             
  Class "Intervention\Image\ImageServiceProvider" not found  
                                                             
Script @php artisan config:clear handling the post-autoload-dump event returned with error code 1

This is because artisan is now running before the package manifest is updated.

The postAutoloadDump would clear the cached files without booting Laravel. It being a composer script and not just an artisan command was probably exactly for this reason.

Obviously this doesn't fix @lmjhs 's original issue (sorry!) but I figure you'd rather have an existing thing continue working.

@taylorotwell taylorotwell merged commit 4aeb560 into laravel:12.x Aug 21, 2025
6 checks passed
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.

2 participants