Skip to content

Commit

Permalink
IDumper: $databaseType is required (BC break)
Browse files Browse the repository at this point in the history
  • Loading branch information
janpecha committed Apr 25, 2018
1 parent c6fdf57 commit 06f7007
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Dumpers/AbstractSqlDumper.php
Expand Up @@ -46,11 +46,11 @@ public function setHeader(array $header = NULL)


/**
* @param string|NULL
* @param string see Database::*
* @param string|NULL
* @return void
*/
public function start($description = NULL, $databaseType = NULL)
public function start($databaseType, $description = NULL)
{
if ($this->started) {
throw new \Inlm\SchemaGenerator\InvalidStateException('Dumper is already started.');
Expand Down
4 changes: 2 additions & 2 deletions src/Dumpers/NullDumper.php
Expand Up @@ -10,11 +10,11 @@
class NullDumper implements IDumper
{
/**
* @param string|NULL
* @param string see Database::*
* @param string|NULL
* @return void
*/
public function start($description = NULL, $databaseType = NULL)
public function start($databaseType, $description = NULL)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/IDumper.php
Expand Up @@ -8,11 +8,11 @@
interface IDumper
{
/**
* @param string|NULL
* @param string see Database::*
* @param string|NULL
* @return void
*/
function start($description = NULL, $databaseType = NULL);
function start($databaseType, $description = NULL);


/**
Expand Down
2 changes: 1 addition & 1 deletion src/SchemaGenerator.php
Expand Up @@ -117,7 +117,7 @@ public function generate($description = NULL)
$schemaDiff = new DiffGenerator($configOld->getSchema(), $configNew->getSchema());

$this->log('Generating migrations');
$this->dumper->start($description, $this->databaseType);
$this->dumper->start($this->databaseType, $description);

foreach ($schemaDiff->getCreatedAndUpdatedTables() as $diff) {
if ($diff instanceof Diffs\CreatedTable) {
Expand Down

0 comments on commit 06f7007

Please sign in to comment.