From 02caa2c8e7ccfdf87c441bc088c2e14ae2a2d0cf Mon Sep 17 00:00:00 2001 From: gggeek Date: Mon, 26 Oct 2015 11:32:17 +0000 Subject: [PATCH] Change namespace --- Command/AbstractCommand.php | 10 ++-- Command/GenerateCommand.php | 10 ++-- Command/StatusCommand.php | 10 ++-- Command/UpdateCommand.php | 12 ++--- Core/API/Managers/AbstractManager.php | 10 ++-- Core/API/Managers/ContentManager.php | 8 ++-- Core/API/Managers/ContentTypeManager.php | 6 +-- Core/API/Managers/LocationManager.php | 6 +-- Core/API/Managers/RoleManager.php | 6 +-- Core/API/Managers/UserGroupManager.php | 6 +-- Core/API/Managers/UserManager.php | 6 +-- Core/API/ReferenceHandler.php | 4 +- Core/Configuration.php | 14 +++--- .../SQLDefinitionHandler.php | 6 +-- .../YamlDefinitionHandler.php | 20 ++++---- Core/Version.php | 4 +- DependencyInjection/Configuration.php | 2 +- .../EzMigrationBundleExtension.php | 2 +- EzMigrationBundle.php | 2 +- Interfaces/API/ManagerInterface.php | 4 +- Interfaces/BundleAwareInterface.php | 4 +- Interfaces/VersionInterface.php | 4 +- README.md | 4 +- Resources/config/services.yml | 6 +-- Tests/BundleMigrationDBTestCase.php | 2 +- Tests/BundleMigrationTestCase.php | 2 +- Tests/Core/ConfigurationTest.php | 48 +++++++++---------- Tests/bootstrap.php | 2 +- composer.json | 2 +- features/Context/FeatureContext.php | 2 +- 30 files changed, 112 insertions(+), 112 deletions(-) diff --git a/Command/AbstractCommand.php b/Command/AbstractCommand.php index 475b3c7..8eaba98 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 c956f27..30abc5a 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 @@ class _place_holder implements VersionInterface, ContainerAwareInterfac ->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 @@ EOT 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 d731da8..31ad5a0 100755 --- a/Command/StatusCommand.php +++ b/Command/StatusCommand.php @@ -1,7 +1,7 @@ registerVersionFromDirectories($paths); if ($bundleVersions = $configuration->getVersions()) { @@ -78,7 +78,7 @@ EOT $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 764f696..268f00f 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 @@ EOT 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 440e51b..0cee514 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 @@ class Configuration $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 e618a28..37a7213 100755 --- a/Core/DefinitionHandlers/SQLDefinitionHandler.php +++ b/Core/DefinitionHandlers/SQLDefinitionHandler.php @@ -1,9 +1,9 @@ configuration->createVersionTable(); @@ -77,9 +77,9 @@ class ConfigurationTest extends BundleMigrationDBTestCase { } /** - * @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 @@ class ConfigurationTest extends BundleMigrationDBTestCase { } /** - * @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 @@ class ConfigurationTest extends BundleMigrationDBTestCase { } /** - * @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 @@ class ConfigurationTest extends BundleMigrationDBTestCase { } /** - * @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 @@ class ConfigurationTest extends BundleMigrationDBTestCase { } /** - * @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 @@ class ConfigurationTest extends BundleMigrationDBTestCase { } /** - * @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 @@ class ConfigurationTest extends BundleMigrationDBTestCase { } /** - * @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 @@ class ConfigurationTest extends BundleMigrationDBTestCase { * * @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 6778587..6c17b82 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 fae42f3..7cc551d 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 4982a70..abec62c 100755 --- a/features/Context/FeatureContext.php +++ b/features/Context/FeatureContext.php @@ -1,6 +1,6 @@