diff --git a/Command/AbstractCommand.php b/Command/AbstractCommand.php index 475b3c77..8eaba982 100755 --- a/Command/AbstractCommand.php +++ b/Command/AbstractCommand.php @@ -1,25 +1,25 @@ versionDirectory = $container->getParameter( 'kaliop_bundle_migration.version_directory' ); $configuration->versionTableName = $container->getParameter( 'kaliop_bundle_migration.table_name' ); $this->configuration = $configuration; - + } return $this->configuration; diff --git a/Command/GenerateCommand.php b/Command/GenerateCommand.php index c956f279..30abc5a1 100755 --- a/Command/GenerateCommand.php +++ b/Command/GenerateCommand.php @@ -1,8 +1,8 @@ ; -use Kaliop\Migration\Interfaces\VersionInterface; +use Kaliop\eZMigrationBundle\Interfaces\VersionInterface; use Symfony\Component\DependencyInjection\ContainerAwareInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -68,7 +68,7 @@ protected function configure() { ->setDescription('Generate a blank migration definition file.') ->addOption('type', null, InputOption::VALUE_OPTIONAL, 'The type of migration file to generate. (yml, php, sql)', 'yml') ->addOption('dbserver', null, InputOption::VALUE_OPTIONAL, 'The type of the database server the sql migration is for. (mysql, postgre)', 'mysql') - ->addArgument('bundle', InputOption::VALUE_REQUIRED, 'The bundle to generate the migration definition file in. eg.: KaliopBundleMigrationBundle' ) + ->addArgument('bundle', InputOption::VALUE_REQUIRED, 'The bundle to generate the migration definition file in. eg.: AcmeMigrationBundle' ) ->setHelp(<<kaliop:migration:generate command generates a skeleton migration definition file: @@ -190,4 +190,4 @@ protected function generateMigrationFile(Configuration $configuration, $version, return $path; } -} \ No newline at end of file +} \ No newline at end of file diff --git a/Command/StatusCommand.php b/Command/StatusCommand.php index d731da84..31ad5a07 100755 --- a/Command/StatusCommand.php +++ b/Command/StatusCommand.php @@ -1,7 +1,7 @@ registerVersionFromDirectories($paths); if ($bundleVersions = $configuration->getVersions()) { @@ -78,7 +78,7 @@ public function execute(InputInterface $input, OutputInterface $output) $output->writeln("{$bundle}:"); foreach ($versions as $versionNumber => $versionClass) { - /** @var $versionClass \Kaliop\Migration\Core\Version */ + /** @var $versionClass \Kaliop\eZMigrationBundle\Core\Version */ $isMigrated = array_key_exists($bundle, $migratedVersions) && in_array( $versionNumber, $migratedVersions[$bundle] diff --git a/Command/UpdateCommand.php b/Command/UpdateCommand.php index 764f6962..268f00f9 100755 --- a/Command/UpdateCommand.php +++ b/Command/UpdateCommand.php @@ -1,8 +1,8 @@ getOption('versions'); - /** @var $configuration \Kaliop\Migration\Core\Configuration */ + /** @var $configuration \Kaliop\eZMigrationBundle\Core\Configuration */ $configuration = $this->getConfiguration($input, $output); if ($versions) { @@ -94,7 +94,7 @@ protected function execute(InputInterface $input, OutputInterface $output) if ($versions) { foreach ($versions as $versionNumber => $versionClass) { - /** @var $versionClass \Kaliop\Migration\Core\Version */ + /** @var $versionClass \Kaliop\eZMigrationBundle\Core\Version */ $output->writeln( "> " . date( "Y-m-d H:i:s", diff --git a/Core/API/Managers/AbstractManager.php b/Core/API/Managers/AbstractManager.php index 440e51bf..0cee514c 100755 --- a/Core/API/Managers/AbstractManager.php +++ b/Core/API/Managers/AbstractManager.php @@ -1,10 +1,10 @@ versions as $bundle => $versions) { foreach ($versions as $version) { - /** @var $version \Kaliop\Migration\Core\Version */ + /** @var $version \Kaliop\eZMigrationBundle\Core\Version */ if ($version->migration instanceof ContainerAwareInterface) { $version->migration->setContainer($container); } @@ -484,7 +484,7 @@ public function injectBundleIntoMigration(KernelInterface $kernel) $bundleObject = $kernel->getBundle($bundle); foreach ($versions as $version) { - /** @var $version \Kaliop\Migration\Core\Version */ + /** @var $version \Kaliop\eZMigrationBundle\Core\Version */ if ($version->migration instanceof BundleAwareInterface) { $version->migration->setBundle($bundleObject); } diff --git a/Core/DefinitionHandlers/SQLDefinitionHandler.php b/Core/DefinitionHandlers/SQLDefinitionHandler.php index e618a281..37a72135 100755 --- a/Core/DefinitionHandlers/SQLDefinitionHandler.php +++ b/Core/DefinitionHandlers/SQLDefinitionHandler.php @@ -1,9 +1,9 @@ configuration->createVersionTable(); @@ -77,9 +77,9 @@ public function testGetMigratedVersionsByBundle() { } /** - * @covers \Kaliop\Migration\Core\Configuration::createVersionTable() - * @covers \Kaliop\Migration\Core\Configuration::getConnection() - * @covers \Kaliop\Migration\Core\Configuration::setVersions() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::createVersionTable() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::getConnection() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::setVersions() */ public function testGetCurrentVersionByBundle() { $this->configuration->createVersionTable(); @@ -106,10 +106,10 @@ public function testGetCurrentVersionByBundle() { } /** - * @covers \Kaliop\Migration\Core\Configuration::createVersionTable() - * @covers \Kaliop\Migration\Core\Configuration::getConnection() - * @covers \Kaliop\Migration\Core\Configuration::setVersions() - * @covers \Kaliop\Migration\Core\Configuration::getCurrentVersionByBundle() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::createVersionTable() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::getConnection() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::setVersions() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::getCurrentVersionByBundle() */ public function testGetCurrentBundleVersions() { $this->configuration->createVersionTable(); @@ -150,8 +150,8 @@ public function testGetCurrentBundleVersions() { } /** - * @covers \Kaliop\Migration\Core\Configuration::createVersionTable() - * @covers \Kaliop\Migration\Core\Configuration::getConnection() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::createVersionTable() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::getConnection() */ public function testGetMigratedVersions() { $this->configuration->createVersionTable(); @@ -201,8 +201,8 @@ public function testGetMigratedVersions() { } /** - * @covers \Kaliop\Migration\Core\Configuration::createVersionTable() - * @covers \Kaliop\Migration\Core\Configuration::getConnection() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::createVersionTable() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::getConnection() */ public function testMigrationsToExecute() { $this->configuration->createVersionTable(); @@ -261,8 +261,8 @@ public function testMigrationsToExecute() { } /** - * @covers \Kaliop\Migration\Core\Configuration::createVersionTable() - * @covers \Kaliop\Migration\Core\Configuration::getMigratedVersionsByBundle() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::createVersionTable() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::getMigratedVersionsByBundle() */ public function testMarkVersionMigrated() { $this->configuration->createVersionTable(); @@ -283,9 +283,9 @@ public function testMarkVersionMigrated() { } /** - * @covers \Kaliop\Migration\Core\Configuration::createVersionTable() - * @covers \Kaliop\Migration\Core\Configuration::markVersionMigrated() - * @covers \Kaliop\Migration\Core\Configuration::getMigratedVersionsByBundle() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::createVersionTable() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::markVersionMigrated() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::getMigratedVersionsByBundle() */ public function testMarkVersionNotMigrated() { $this->configuration->createVersionTable(); @@ -316,7 +316,7 @@ public function testMarkVersionNotMigrated() { } /** - * @covers \Kaliop\Migration\Core\Configuration::createVersionTable() + * @covers \Kaliop\eZMigrationBundle\Core\Configuration::createVersionTable() * @todo Work out how this could be tested. */ public function testRegisterVersionFromDirectories() { @@ -396,7 +396,7 @@ private function setupVfsStructure() { * * @var string */ - private $dummyVersionContent = 'use Kaliop\Migration\Interfaces\VersionInterface; + private $dummyVersionContent = 'use Kaliop\eZMigrationBundle\Interfaces\VersionInterface; use Symfony\Component\DependencyInjection\ContainerAwareInterface; class Version20131001144810 implements VersionInterface, ContainerAwareInterface diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php index 67785872..6c17b82a 100755 --- a/Tests/bootstrap.php +++ b/Tests/bootstrap.php @@ -1,4 +1,4 @@ add('Kaliop\Migration\Tests', __DIR__); \ No newline at end of file +$loader->add('Kaliop\eZMigrationBundle\Tests', __DIR__); \ No newline at end of file diff --git a/composer.json b/composer.json index fae42f3c..7cc551db 100755 --- a/composer.json +++ b/composer.json @@ -26,6 +26,6 @@ "phpunit/phpunit": "~4.0" }, "autoload": { - "psr-4": { "Kaliop\\Migration\\": "" } + "psr-4": { "Kaliop\\eZMigrationBundle\\": "" } } } diff --git a/features/Context/FeatureContext.php b/features/Context/FeatureContext.php index 4982a706..abec62c5 100755 --- a/features/Context/FeatureContext.php +++ b/features/Context/FeatureContext.php @@ -1,6 +1,6 @@