Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: fb4c8078ee
Fetching contributors…

Cannot retrieve contributors at this time

executable file 49 lines (39 sloc) 1.655 kb
#!/usr/bin/env php
<?php
$path = __DIR__ . '/../_source/doctrine2/';
set_include_path(get_include_path() . PATH_SEPARATOR . implode(PATH_SEPARATOR, array(
$path . 'lib'
)));
require_once $path . 'lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';
$configFile = __DIR__ . '/doctrine-cli-config.php';
$helperSet = null;
if (file_exists($configFile)) {
if ( ! is_readable($configFile)) {
trigger_error(
'Configuration file [' . $configFile . '] does not have read permission.', E_USER_ERROR
);
}
require $configFile;
foreach ($GLOBALS as $helperSetCandidate) {
if ($helperSetCandidate instanceof \Symfony\Component\Console\Helper\HelperSet) {
$helperSet = $helperSetCandidate;
break;
}
}
}
$helperSet = ($helperSet) ?: new \Symfony\Component\Console\Helper\HelperSet();
//\Doctrine\ORM\Tools\Console\ConsoleRunner::run($helperSet);
$cli = new \Symfony\Component\Console\Application('Doctrine Command Line Interface', \Doctrine\ORM\Version::VERSION);
$cli->setCatchExceptions(true);
$cli->setHelperSet($helperSet);
\Doctrine\ORM\Tools\Console\ConsoleRunner::addCommands($cli);
$cli->addCommands(array(
new \Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand(),
new \Doctrine\DBAL\Migrations\Tools\Console\Command\ExecuteCommand(),
new \Doctrine\DBAL\Migrations\Tools\Console\Command\GenerateCommand(),
new \Doctrine\DBAL\Migrations\Tools\Console\Command\MigrateCommand(),
new \Doctrine\DBAL\Migrations\Tools\Console\Command\StatusCommand(),
new \Doctrine\DBAL\Migrations\Tools\Console\Command\VersionCommand()
));
$cli->run();
?>
Jump to Line
Something went wrong with that request. Please try again.