Skip to content

Commit 8e4e502

Browse files
authored
[console] Add autoload.local.php.dist file. (#2966)
* [console] Add autoload.local.php.dist file. * [console] Add new end line.
1 parent ba99535 commit 8e4e502

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
/bin/phpmd
1414
PATCHES.txt
1515

16+
# Develop
17+
autoload.local.php
18+
1619
# Binaries
1720
/box.phar
1821
/console.phar

autoload.local.php.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
$autoloaders = [ getcwd() . '/vendor/autoload.php' ];

bin/drupal.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,23 @@
77

88
set_time_limit(0);
99

10-
$autoloaders = [
11-
__DIR__ . '/../../../autoload.php',
12-
__DIR__ . '/../vendor/autoload.php'
13-
];
10+
if(file_exists(__DIR__ . '/../autoload.local.php')) {
11+
require_once __DIR__ . '/../autoload.local.php';
12+
}
13+
else {
14+
$autoloaders = [
15+
__DIR__ . '/../../../autoload.php',
16+
__DIR__ . '/../vendor/autoload.php'
17+
];
18+
}
1419

1520
foreach ($autoloaders as $file) {
1621
if (file_exists($file)) {
1722
$autoloader = $file;
1823
break;
1924
}
2025
}
26+
2127
if (isset($autoloader)) {
2228
$autoload = require_once $autoloader;
2329
}

develop.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)