Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bridges\SymfonyConsole: do not use unsupported $defaultName property #134

Merged
merged 1 commit into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions src/Bridges/SymfonyConsole/ContinueCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@

class ContinueCommand extends BaseCommand
{
/** @var string */
protected static $defaultName = 'migrations:continue';
public static function getDefaultName(): string
{
return 'migrations:continue';
}


/** @var string */
protected static $defaultDescription = 'Updates database schema by running all new migrations';
public static function getDefaultDescription(): string
{
return 'Updates database schema by running all new migrations';
}


protected function configure(): void
{
$this->setName(self::$defaultName);
$this->setDescription(self::$defaultDescription);
$this->setHelp("If table 'migrations' does not exist in current database, it is created automatically.");
}

Expand Down
18 changes: 11 additions & 7 deletions src/Bridges/SymfonyConsole/CreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,19 @@ class CreateCommand extends BaseCommand
const CONTENT_SOURCE_EMPTY = 'empty';

/** @var string */
protected static $defaultName = 'migrations:create';
protected $defaultContentSource = self::CONTENT_SOURCE_DIFF;

/** @var string */
protected static $defaultDescription = 'Creates new migration file with proper name (e.g. 2015-03-14-130836-label.sql)';

/** @var string */
protected $defaultContentSource = self::CONTENT_SOURCE_DIFF;
public static function getDefaultName(): string
{
return 'migrations:create';
}


public static function getDefaultDescription(): string
{
return 'Creates new migration file with proper name (e.g. 2015-03-14-130836-label.sql)';
}


public function setDefaultContentSource(string $defaultContentSource): void
Expand All @@ -45,8 +51,6 @@ public function setDefaultContentSource(string $defaultContentSource): void

protected function configure(): void
{
$this->setName(self::$defaultName);
$this->setDescription(self::$defaultDescription);
$this->setHelp('Prints path of the created file to standard output.');

$this->addArgument('type', InputArgument::REQUIRED, $this->getTypeArgDescription());
Expand Down
15 changes: 9 additions & 6 deletions src/Bridges/SymfonyConsole/ResetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@

class ResetCommand extends BaseCommand
{
/** @var string */
protected static $defaultName = 'migrations:reset';
public static function getDefaultName(): string
{
return 'migrations:reset';
}


/** @var string */
protected static $defaultDescription = 'Drops current database and recreates it from scratch';
public static function getDefaultDescription(): string
{
return 'Drops current database and recreates it from scratch';
}


protected function configure(): void
{
$this->setName(self::$defaultName);
$this->setDescription(self::$defaultDescription);
$this->setHelp("Drops current database and runs all migrations");
}

Expand Down
14 changes: 7 additions & 7 deletions tests/matrix/symfony-bundle/symfony-3.0-php-5.5-to-7.2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ PHP_VERSION_MAX="70299"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.5"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/doctrine-bundle:~1.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/config:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/dependency-injection:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/doctrine-bridge:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/framework-bundle:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/http-kernel:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/yaml:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/config:~3.4"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.4"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/dependency-injection:~3.4"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/doctrine-bridge:~3.4"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/framework-bundle:~3.4"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/http-kernel:~3.4"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/yaml:~3.4"
DBAL='doctrine'
14 changes: 7 additions & 7 deletions tests/matrix/symfony-bundle/symfony-3.0-php-7.3-to-7.4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ PHP_VERSION_MAX="70499"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/dbal:~2.5"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/orm:~2.6.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE doctrine/doctrine-bundle:~1.0"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/config:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/dependency-injection:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/doctrine-bridge:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/framework-bundle:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/http-kernel:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/yaml:~3.3"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/config:~3.4"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/console:~3.4"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/dependency-injection:~3.4"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/doctrine-bridge:~3.4"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/framework-bundle:~3.4"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/http-kernel:~3.4"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE symfony/yaml:~3.4"
COMPOSER_REQUIRE="$COMPOSER_REQUIRE nette/tester:~2.3"

DBAL='doctrine'