for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace WebComplete\core\utils\migration;
class MigrationService
{
/**
* @var MigrationRegistryInterface
*/
protected $registry;
* MigrationService constructor.
*
* @param MigrationRegistryInterface $registry
public function __construct(MigrationRegistryInterface $registry)
$this->registry = $registry;
}
* @param array $classes
* @throws \Exception
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
public function upAll(array $classes)
foreach ($classes as $class) {
$this->up($class);
public function downAll()
$classes = $this->registry->getRegistered();
$this->down($class);
* @param $class
public function up($class)
$this->registry->register($class);
public function down($class)
$this->registry->unregister($class);