Document files autoloading order, fixes #10509
parent
7cf3b01631
commit
e9b44b4499
|
@ -646,6 +646,17 @@ Example:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Files autoload rules are included whenever `vendor/autoload.php` is included, right after
|
||||||
|
the autoloader is registered. The order of inclusion depends on package dependencies so that
|
||||||
|
if package A depends on B, files in package B will be included first to ensure package B is fully
|
||||||
|
initialized and ready to be used when files from package A are included.
|
||||||
|
|
||||||
|
If two packages have the same amount of dependents or no dependencies, the order is alphabetical.
|
||||||
|
|
||||||
|
Files from the root package are always loaded last, and you cannot use files autoloading
|
||||||
|
yourself to override functions from your dependencies. If you want to achieve that we recommend
|
||||||
|
you include your own functions *before* including Composer's `vendor/autoload.php`.
|
||||||
|
|
||||||
#### Exclude files from classmaps
|
#### Exclude files from classmaps
|
||||||
|
|
||||||
If you want to exclude some files or folders from the classmap you can use the `exclude-from-classmap` property.
|
If you want to exclude some files or folders from the classmap you can use the `exclude-from-classmap` property.
|
||||||
|
|
Loading…
Reference in New Issue