diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-05-21 06:41:52 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-05-21 06:41:52 +0200 |
commit | 859543e96faf9dea96cf72ef968d6f5149fb8724 (patch) | |
tree | 9a83cae193730f2b27afccde335260de16b5f515 /php-jeremeamia-superclosure-autoload.php | |
parent | b80da2a0c69f4baba5ebb680b5ca452e3f4f2d42 (diff) |
php-jeremeamia-superclosure: use nikic/php-parser v2 when available
Diffstat (limited to 'php-jeremeamia-superclosure-autoload.php')
-rw-r--r-- | php-jeremeamia-superclosure-autoload.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/php-jeremeamia-superclosure-autoload.php b/php-jeremeamia-superclosure-autoload.php index 2ccdb0a..13f5b27 100644 --- a/php-jeremeamia-superclosure-autoload.php +++ b/php-jeremeamia-superclosure-autoload.php @@ -15,5 +15,9 @@ if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Compo $fedoraClassLoader->addPrefix('SuperClosure\\', dirname(__DIR__)); // Dependencies -require_once $vendorDir . '/PhpParser/autoload.php'; +if (file_exists($vendorDir . '/PhpParser2/autoload.php')) { + require_once $vendorDir . '/PhpParser2/autoload.php'; +} else { + require_once $vendorDir . '/PhpParser/autoload.php'; +} require_once $vendorDir . '/Symfony/Polyfill/autoload.php'; |