1<?php
2
3function includeIfExists($file) {
4    return file_exists($file) ? include $file : false;
5}
6
7if (
8    (!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php'))
9    && (!$loader = includeIfExists(__DIR__.'/../../../autoload.php'))
10) {
11    echo
12        'You must set up the project dependencies using `composer install`'.PHP_EOL.
13        'See https://getcomposer.org/download/ for instructions on installing Composer'.PHP_EOL
14    ;
15    exit(1);
16}
17
18return $loader;