-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(reset database): enable migration mode
- Loading branch information
Showing
14 changed files
with
213 additions
and
208 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
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,49 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Zenstruck\Foundry\ORM\ResetDatabase; | ||
|
||
use Doctrine\Bundle\DoctrineBundle\Registry; | ||
use Zenstruck\Foundry\Persistence\SymfonyCommandRunner; | ||
|
||
/** | ||
* @author Nicolas PHILIPPE <nikophil@gmail.com> | ||
*/ | ||
abstract class AbstractOrmResetter | ||
{ | ||
use OrmDatabaseResetterTrait; | ||
use SymfonyCommandRunner; | ||
|
||
/** | ||
* @param list<string> $managers | ||
* @param list<string> $connections | ||
*/ | ||
public function __construct( | ||
private Registry $registry, | ||
private array $managers, | ||
private array $connections, | ||
) { | ||
} | ||
|
||
protected function registry(): Registry | ||
{ | ||
return $this->registry; | ||
} | ||
|
||
/** | ||
* @return list<string> | ||
*/ | ||
protected function managers(): array | ||
{ | ||
return $this->managers; | ||
} | ||
|
||
/** | ||
* @return list<string> | ||
*/ | ||
protected function connections(): array | ||
{ | ||
return $this->connections; | ||
} | ||
} |
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
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,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Zenstruck\Foundry\ORM\ResetDatabase; | ||
|
||
use Zenstruck\Foundry\Persistence\ResetDatabase\DatabaseResetterInterface; | ||
use Zenstruck\Foundry\Persistence\ResetDatabase\SchemaResetterInterface; | ||
|
||
interface OrmDatabaseResetterInterface extends DatabaseResetterInterface, SchemaResetterInterface | ||
{ | ||
} |
Oops, something went wrong.