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
Autoload files - load vendors first #956
Comments
@Seldaek I guess the order here should respect the order found when resolving the dependencies, so that the autoloading file of a dependency is loaded before the file of a package depending on it. |
Yup that makes sense, not sure how easy it is to achieve though after the first run I think it's quite random. |
I'm not entirely sure I get this? All autoloaders will be required, and then the order should not matter? Edit: nevermind I get it :) |
The solver should already be returning these in the correct order in the transaction, including the case when packages are already installed, so not sure why the order would be incorrect. |
Here is my composer.json https://github.com/nella/framework/blob/composer/composer.json |
I've just experienced the same issue with {
"name":"kdyby/forms-replicator",
"require":{
"php":">=5.3.2",
"nette/nette":"*"
},
"autoload":{
"files":["Replicator.php"]
}
} The order of |
Merged @hosiplan's fix. |
How to mark that our lib should be loaded first? |
I have the same question as @onlyongunz - I have globally installed |
Would be nice to be able to define the order. Or even better: have an extra option to define files that need to be loaded first. Use case: Trying to override the helper functions of laravel as they are specifically defined with that in mind, but there is no way to tell composer that my definition has to come before laravel's native one. Workaround: https://github.com/funkjedi/composer-include-files |
Well i think i'll sugest |
I'm using autoloading with custom files loader. And I have a problem because my loader depends some classes from vendors. But composer require my loader before vendor loader.
Here is generated
autoloader.php
:I need load Nette before my libs (Nella) because my (Nella) loader require some classes from Nette.
The text was updated successfully, but these errors were encountered: