-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'future-4.x' of github.com:kaliop-uk/ezmigrationbundle
# Conflicts: # Command/MigrateCommand.php # WHATSNEW.md
- Loading branch information
Showing
103 changed files
with
3,868 additions
and
1,573 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
/composer | ||
/composer.phar | ||
/composer.lock | ||
/Tests/dsl/good/references/test_refs_generated.yml |
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
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,24 @@ | ||
<?php | ||
|
||
namespace Kaliop\eZMigrationBundle\API; | ||
|
||
use Kaliop\eZMigrationBundle\API\Value\MigrationDefinition; | ||
use Kaliop\eZMigrationBundle\API\Value\Migration; | ||
|
||
/** | ||
* Implemented by classes which have 'context' data that should be stored/restored when migrations are suspended | ||
*/ | ||
interface ContextProviderInterface | ||
{ | ||
/** | ||
* @param string $migrationName | ||
* @return array|null | ||
*/ | ||
public function getCurrentContext($migrationName); | ||
|
||
/** | ||
* @param string $migrationName | ||
* @param array $context | ||
*/ | ||
public function restoreContext($migrationName, array $context); | ||
} |
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,34 @@ | ||
<?php | ||
|
||
namespace Kaliop\eZMigrationBundle\API; | ||
|
||
/** | ||
* Implemented by classes which store details of the executing migrations contexts | ||
*/ | ||
interface ContextStorageHandlerInterface | ||
{ | ||
/** | ||
* @param string $migrationName | ||
* @return array|null | ||
*/ | ||
public function loadMigrationContext($migrationName); | ||
|
||
/** | ||
* Stores a migration context | ||
* @param string $migrationName | ||
* @param array $context | ||
*/ | ||
public function storeMigrationContext($migrationName, array $context); | ||
|
||
/** | ||
* Removes a migration context from storage (regardless of the migration status) | ||
* | ||
* @param string $migrationName | ||
*/ | ||
public function deleteMigrationContext($migrationName); | ||
|
||
/** | ||
* Removes all migration contexts from storage (regardless of the migration status) | ||
*/ | ||
public function deleteMigrationContexts(); | ||
} |
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,16 @@ | ||
<?php | ||
|
||
namespace Kaliop\eZMigrationBundle\API; | ||
|
||
/** | ||
* Used to identify those reference resolvers which can enumerate their references injected. | ||
*/ | ||
interface EnumerableReferenceResolverInterface | ||
{ | ||
/** | ||
* Lists all existing references | ||
* | ||
* @return array key: ref identifier, value: reference value | ||
*/ | ||
public function listReferences(); | ||
} |
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,35 @@ | ||
<?php | ||
|
||
namespace Kaliop\eZMigrationBundle\API\Event; | ||
|
||
use Symfony\Component\EventDispatcher\Event; | ||
use Kaliop\eZMigrationBundle\API\Value\MigrationStep; | ||
use Kaliop\eZMigrationBundle\API\Exception\MigrationSuspendedException; | ||
|
||
class MigrationSuspendedEvent extends Event | ||
{ | ||
protected $step; | ||
protected $exception; | ||
|
||
public function __construct(MigrationStep $step, MigrationSuspendedException $exception) | ||
{ | ||
$this->step = $step; | ||
$this->exception = $exception; | ||
} | ||
|
||
/** | ||
* @return MigrationStep | ||
*/ | ||
public function getStep() | ||
{ | ||
return $this->step; | ||
} | ||
|
||
/** | ||
* @return MigrationSuspendedException | ||
*/ | ||
public function getException() | ||
{ | ||
return $this->exception; | ||
} | ||
} |
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,14 @@ | ||
<?php | ||
|
||
namespace Kaliop\eZMigrationBundle\API\Exception; | ||
|
||
/** | ||
* Throw this exception in any step to suspend the migration | ||
*/ | ||
class MigrationSuspendedException extends \Exception | ||
{ | ||
public function __construct($message = "", $code = 0, \Exception $previous = null) | ||
{ | ||
parent::__construct($message, $code, $previous); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -2,6 +2,9 @@ | |
|
||
namespace Kaliop\eZMigrationBundle\API; | ||
|
||
/** | ||
* @deprecated | ||
*/ | ||
interface LanguageAwareInterface | ||
{ | ||
/** | ||
|
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
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
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,10 @@ | ||
<?php | ||
|
||
namespace Kaliop\eZMigrationBundle\API; | ||
|
||
/** | ||
* A Reference Resolver that allows references to be added to it | ||
*/ | ||
interface ReferenceResolverBagInterface extends ReferenceResolverInterface, ReferenceBagInterface | ||
{ | ||
} |
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
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
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
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
Oops, something went wrong.