Change Version to non-static

This commit is contained in:
Benoît Burnichon
2015-03-19 11:28:06 +01:00
parent 36a8d555e8
commit 775552f613
10 changed files with 28 additions and 23 deletions

View File

@@ -49,6 +49,7 @@ use Alchemy\Phrasea\SearchEngine\SearchEngineInterface;
require_once __DIR__ . '/../lib/autoload.php';
$version = new Version();
$cli = new CLI("
_____ _ _ _____ _____ ______ _ _ ______ _______
| __ \| | | | __ \ /\ / ____| ____| /\ | \ | | ____|__ __|
@@ -65,7 +66,7 @@ $cli = new CLI("
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type `about:license' for details.\n\n"
. ' KONSOLE KOMMANDER', Version::getName() . ' ' . Version::getNumber());
. ' KONSOLE KOMMANDER', $version->getName() . ' ' . $version->getNumber());
if (!$cli['phraseanet.configuration-tester']->isInstalled()) {
throw new \RuntimeException('Phraseanet is not installed, use setup command instead');

View File

@@ -55,6 +55,7 @@ use Doctrine\DBAL\Migrations\Tools\Console\Command\VersionCommand;
require_once __DIR__ . '/../lib/autoload.php';
$version = new Version();
$cli = new CLI("
___ ___ _ _ ___ __ __ ___ ___ ___ ____ __ __ __ ___
( \( _)( )( )( _)( ) / \( ,\( _)( ,) (_ _)/ \ / \( ) / __)
@@ -65,7 +66,7 @@ $cli = new CLI("
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type `about:license' for details.\n\n"
. ' Phraseanet Developer Tools ', Version::getName() . ' ' . Version::getNumber());
. ' Phraseanet Developer Tools ', $version->getName() . ' ' . $version->getNumber());
if ($cli['configuration.store']->isSetup()) {
$helpers = [

View File

@@ -27,6 +27,7 @@ use Alchemy\Phrasea\Core\CLIProvider\DoctrineMigrationServiceProvider;
require_once __DIR__ . '/../vendor/autoload.php';
$version = new Version();
$app = new CLI("
_____ _ _ _____ _____ ______ _ _ ______ _______
| __ \| | | | __ \ /\ / ____| ____| /\ | \ | | ____|__ __|
@@ -45,7 +46,7 @@ $app = new CLI("
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type `about:license' for details.\n\n"
. ' SETUP', Version::getName() . ' ' . Version::getNumber());
. ' SETUP', $version->getName() . ' ' . $version->getNumber());
$app->register(new DoctrineMigrationServiceProvider());