Skip to content

Commit

Permalink
[console] Add autoload.local.php.dist file. (hechoendrupal#2966)
Browse files Browse the repository at this point in the history
* [console] Add autoload.local.php.dist file.

* [console] Add new end line.
  • Loading branch information
jmolivas authored and Bertrand PRESLES committed Dec 11, 2016
1 parent a23202f commit 36b17b5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
/bin/phpmd
PATCHES.txt

# Develop
autoload.local.php

# Binaries
/box.phar
/console.phar
Expand Down
3 changes: 3 additions & 0 deletions autoload.local.php.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

$autoloaders = [ getcwd() . '/vendor/autoload.php' ];
14 changes: 10 additions & 4 deletions bin/drupal.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@

set_time_limit(0);

$autoloaders = [
__DIR__ . '/../../../autoload.php',
__DIR__ . '/../vendor/autoload.php'
];
if(file_exists(__DIR__ . '/../autoload.local.php')) {
require_once __DIR__ . '/../autoload.local.php';
}
else {
$autoloaders = [
__DIR__ . '/../../../autoload.php',
__DIR__ . '/../vendor/autoload.php'
];
}

foreach ($autoloaders as $file) {
if (file_exists($file)) {
$autoloader = $file;
break;
}
}

if (isset($autoloader)) {
$autoload = require_once $autoloader;
}
Expand Down
12 changes: 0 additions & 12 deletions develop.patch

This file was deleted.

0 comments on commit 36b17b5

Please sign in to comment.