mirror of
https://github.com/symfony/ai-mate.git
synced 2026-03-24 00:02:10 +01:00
minor #1296 [Mate] Add support for _composer_autoload_path super global (Nyholm)
This PR was merged into the main branch. Discussion ---------- [Mate] Add support for _composer_autoload_path super global | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Docs? | no | Issues | no | License | MIT If `$_GLOBALS['_composer_autoload_path']` is defined, then use it. It is defined my composer on each "bin" script. (See your `vendor/bin/*`) Commits ------- da436902 add support for _composer_autoload_path super global
This commit is contained in:
@@ -15,6 +15,10 @@ $autoloadPaths = [
|
||||
__DIR__.'/../vendor/autoload.php', // Package autoloader (fallback)
|
||||
];
|
||||
|
||||
if (isset($GLOBALS['_composer_autoload_path'])) {
|
||||
array_unshift($autoloadPaths, $GLOBALS['_composer_autoload_path']);
|
||||
}
|
||||
|
||||
$root = null;
|
||||
foreach ($autoloadPaths as $autoloadPath) {
|
||||
if (file_exists($autoloadPath)) {
|
||||
|
||||
Reference in New Issue
Block a user