Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DDC-684 - Fix flaw in build process, DBAL PEAR package now does not c…
…ontain Common code and just adds a dependency on the PEAR channel. Additional full package is generated into dist/
- Loading branch information
Showing
4 changed files
with
68 additions
and
21 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
include('doctrine-dbal.php'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
require_once 'Doctrine/Common/ClassLoader.php'; | ||
|
||
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine'); | ||
$classLoader->register(); | ||
|
||
$classLoader = new \Doctrine\Common\ClassLoader('Symfony', 'Doctrine'); | ||
$classLoader->register(); | ||
|
||
$configFile = getcwd() . DIRECTORY_SEPARATOR . 'cli-config.php'; | ||
|
||
$helperSet = null; | ||
if (file_exists($configFile)) { | ||
if ( ! is_readable($configFile)) { | ||
trigger_error( | ||
'Configuration file [' . $configFile . '] does not have read permission.', E_ERROR | ||
); | ||
} | ||
|
||
require $configFile; | ||
|
||
foreach ($GLOBALS as $helperSetCandidate) { | ||
if ($helperSetCandidate instanceof \Symfony\Components\Console\Helper\HelperSet) { | ||
$helperSet = $helperSetCandidate; | ||
break; | ||
} | ||
} | ||
} | ||
|
||
$helperSet = ($helperSet) ?: new \Symfony\Components\Console\Helper\HelperSet(); | ||
|
||
$cli = new \Symfony\Components\Console\Application('Doctrine Command Line Interface', Doctrine\DBAL\Version::VERSION); | ||
$cli->setCatchExceptions(true); | ||
$cli->setHelperSet($helperSet); | ||
$cli->addCommands(array( | ||
// DBAL Commands | ||
new \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand(), | ||
new \Doctrine\DBAL\Tools\Console\Command\ImportCommand(), | ||
|
||
)); | ||
$cli->run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters