Skip to content

Commit

Permalink
Add the ability to programatically disable autoload
Browse files Browse the repository at this point in the history
  • Loading branch information
assertchris committed May 24, 2017
1 parent 45d964d commit 601efd9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
require_once __DIR__ . "/environment.php";

spl_autoload_register(function ($class) {
if (!empty(getenv("PRE_DISABLE_AUTOLOAD"))) {
return;
}

$base = getenv("PRE_BASE_DIR");

if (file_exists("{$base}/pre.lock")) {
Expand Down

0 comments on commit 601efd9

Please sign in to comment.