for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Kaliop\eZMigrationBundle\Core\Executor;
use Kaliop\eZMigrationBundle\API\Value\MigrationStep;
use Kaliop\eZMigrationBundle\API\Exception\MigrationStepSkippedException;
trait IgnorableStepExecutorTrait
{
protected $referenceMatcher;
public function setReferenceMatcher($referenceMatcher)
$this->referenceMatcher = $referenceMatcher;
}
/**
* @param MigrationStep $step
* @return void
* @throws MigrationStepSkippedException
*/
protected function skipStepIfNeeded(MigrationStep $step)
if (isset($step->dsl['if'])) {
if (!$this->matchConditions($step->dsl['if'])) {
throw new MigrationStepSkippedException();
protected function matchConditions($conditions)
$match = $this->referenceMatcher->match($conditions);
return reset($match);