/** * Run behat original command * * @param array $args */ private function runBehatCommand(array $args = array()) { define('BEHAT_BIN_PATH', $this->getContainer()->getParameter('kernel.root_dir') . '/../bin/behat'); function includeIfExists($file) { if (file_exists($file)) { return include $file; } } if (!($loader = includeIfExists($this->getContainer()->getParameter('kernel.root_dir') . '/../vendor/autoload.php')) && !($loader = includeIfExists($container->getParameter('kernel.root_dir') . '/../../../../autoload.php'))) { fwrite(STDERR, 'You must set up the project dependencies, run the following commands:' . PHP_EOL . 'curl -s http://getcomposer.org/installer | php' . PHP_EOL . 'php composer.phar install' . PHP_EOL); exit(1); } $factory = new ApplicationFactory(); $factory->createApplication()->run(new ArrayInput($args)); }
<?php /* * This file is part of composer/statis. * * (c) Composer <https://github.com/composer> * * For the full copyright and license information, please view * the LICENSE file that was distributed with this source code. */ function includeIfExists($file) { if (file_exists($file)) { return include $file; } } if (!($loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && !($loader = includeIfExists(__DIR__ . '/../../../autoload.php'))) { print 'You must set up the project dependencies, run the following commands:' . PHP_EOL . 'curl -s http://getcomposer.org/installer | php' . PHP_EOL . 'php composer.phar install' . PHP_EOL; die(1); } return $loader;
<?php /** * This file is part of the "cosma/testing-bundle" project * * (c) Cosmin Voicu<*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * Date: 11/07/14 * Time: 23:33 */ function includeIfExists($file) { if (file_exists($file)) { return include $file; } } if (!($loader = includeIfExists(__DIR__ . '/../vendor/autoload.php')) && !($loader = includeIfExists(__DIR__ . '/../../../../../autoload.php'))) { die('You must set up the project dependencies, run the following commands:' . PHP_EOL . 'curl -s http://getcomposer.org/installer | php' . PHP_EOL . 'php composer.phar install' . PHP_EOL); } includeIfExists(__DIR__ . '/Entities.php'); $loader->add('Cosma\\Bundle\\TestingBundle\\', __DIR__);
<?php /** * Inclur file php if exists * @param $file * @return bool|mixed */ function includeIfExists($file) { return file_exists($file) ? include $file : false; } // Try loading the file vendor/autoload.php $loader = includeIfExists(__DIR__ . '/../vendor/autoload.php'); if ($loader !== false) { return $loader; } // Try loading the file autoload.php $loader = includeIfExists(__DIR__ . '/../../vendor/autoload.php'); if ($loader !== false) { return $loader; } // Shor message echo 'You must set up the project dependencies, run the following commands:' . PHP_EOL . 'php consolle.phar install' . PHP_EOL; exit(1);
<?php error_reporting(E_ALL); ini_set('display_errors', 1); function includeIfExists($file) { return file_exists($file) ? include $file : false; } if (!includeIfExists(__DIR__ . '/../vendor/autoload.php')) { echo 'You must set up the project dependencies, run the following commands:' . PHP_EOL . 'curl -sS https://getcomposer.org/installer | php' . PHP_EOL . 'php composer.phar install' . PHP_EOL; exit(1); }
<?php /* * This file is part of Satis. * * (c) Nils Adermann <*****@*****.**> * Jordi Boggiano <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Drupal\ParseComposer; function includeIfExists($file) { if (file_exists($file)) { return include $file; } } if (!includeIfExists(__DIR__ . '/vendor/drupal/drupal/includes/common.inc') && !includeIfExists(__DIR__ . '/../../drupal/drupal/includes/common.inc')) { die('You must set up the project dependencies, run the following commands:' . PHP_EOL . 'curl -s http://getcomposer.org/installer | php' . PHP_EOL . 'php composer.phar install' . PHP_EOL); }
<?php function includeIfExists($file) { if (file_exists($file)) { return include $file; } } $vendor = realpath(__DIR__ . '/../vendor'); if (!($loader = includeIfExists($vendor . '/autoload.php'))) { die('You must set up the project dependencies, run the following commands:' . PHP_EOL . 'curl -s http://getcomposer.org/installer | php' . PHP_EOL . 'php composer.phar install' . PHP_EOL); } $loader->add('Ali', __DIR__);