dump-autoload -o is not optional in production

PSR-4 resolves a class by converting the namespace to a path and checking the filesystem. That is one or more stat calls per class, on every request, for every class the request touches — a few hundred on a framework page.

composer dump-autoload --optimize --classmap-authoritative

--optimize scans the tree once and writes a flat class-to-file map, turning every lookup into an array read. --classmap-authoritative goes further and skips the filesystem entirely when a class is missing from the map — faster still, and fatal if anything generates classes at runtime. Neither belongs in development, where the point is that a new file works without a rebuild.