Skip to content

Instantly share code, notes, and snippets.

@dbjpanda
Last active September 13, 2024 13:31
Show Gist options
  • Save dbjpanda/da1db4d9ab12f394aee655d2ff61edf3 to your computer and use it in GitHub Desktop.
Save dbjpanda/da1db4d9ab12f394aee655d2ff61edf3 to your computer and use it in GitHub Desktop.
What is composer dump-autoload?
composer dump-autoload
@dbjpanda
Copy link
Author

composer dump-autoload is an optional step. Often executed for production ready projects. It creates an array of Namespaces and their respective location in autolaod_classmap.php file. So that it can quickly find the file inside the array and load it. Without dump-autoload, composer uses a complex logic to find the respective classes using filesystem scan. That is comparatively slow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment