Last active
May 16, 2019 09:46
-
-
Save tburry/90ae5ba5bfa9140cfb53 to your computer and use it in GitHub Desktop.
A snippet for including your composer autoloader in your /bin files.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$paths = [ | |
__DIR__.'/../vendor/autoload.php', // locally | |
__DIR__.'/../../../autoload.php' // dependency | |
]; | |
foreach ($paths as $path) { | |
if (file_exists($path)) { | |
require_once $path; | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment