#!/usr/bin/env php
<?php

if (version_compare(PHP_VERSION, '5.5.9', '<')) {
    printf("This tool requires at least PHP 5.5.9. You currently have %s installed. Please upgrade your PHP version.\n", PHP_VERSION);
    exit(1);
}

if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
    require __DIR__ . '/../vendor/autoload.php';
} elseif (file_exists(__DIR__ . '/../../../autoload.php')) {
    // we are globally installed via Composer
    require __DIR__ . '/../../../autoload.php';
} else {
    echo "Composer autoload file not found.\n";
    echo "You need to run 'composer install'.\n";
    exit(1);
}

(new \Platformsh\Cli\Application())->run();
