-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Skip autoloader generation during install and update #3453
Conversation
Thanks and sorry for the delay. |
awesome, thanks Jordi 👍 |
Is there any way this could be integrated on a per library basis, in eg.
|
@Jany-M this does not make sense, as there is a single generated autoloader, not one per library |
Is there any equivalent of the CLI (I would have thought it should be the package maintainer who determines whether their package uses autoloading, rather than the deployment.) |
@mvl22 that flag's point is that you can run the dump-autoload at a later step because $reasons, but the point is not to have no autoloader at all, because IMO not using the Composer autoloader for the dependencies is kinda nonsensical overhead. So no there is no config to persist that.. |
I'm thinking of the scenario where you have a CMS that has its own autoloader definition, but there are embedded applications within the site that use Composer. In this scenario, you don't want the CMS to have an autoload.php file generated because that will take precedence if an include_path has been set in the VirtualHost. Maybe this too specific a scenario for generic support ;) I suppose the nearest achievable is to use this hook:
|
rm -rf vendor/composer is a bad idea™️. This contains installed.json which will make any further composer install go poorly if you wipe it. It may also contain packages from the composer vendor which would go even worse if they're needed. If you really must delete files then delete And include_path shenanigans yeahhh I wish that was not used anymore.. but I guess it still is :) |
Added no-autoloader option for install and update which skips the autoloder generation. This has been requested by multiple users and is useful for deployment situations where one might be running composer in two stages.
See: #1663