Skip to content

Commit 7dd1c41

Browse files
Composer autoloader patch was added to app/Mage.php (#3216)
Co-authored-by: Colin Mollenhour <colin@mollenhour.com>
1 parent 2730ef7 commit 7dd1c41

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/Mage.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@
4242

4343
Varien_Autoload::register();
4444

45+
/** AUTOLOADER PATCH **/
46+
if (file_exists($autoloaderPath = (getenv('COMPOSER_VENDOR_PATH') ?: BP . DS . 'vendor') . DS . 'autoload.php')) {
47+
require $autoloaderPath;
48+
}
49+
/** AUTOLOADER PATCH **/
50+
4551
/* Support additional includes, such as composer's vendor/autoload.php files */
4652
foreach (glob(BP . DS . 'app' . DS . 'etc' . DS . 'includes' . DS . '*.php') as $path) {
4753
include_once $path;

0 commit comments

Comments
 (0)