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

output backslashes #1468

Open
wants to merge 3 commits into
base: 3.8.x
Choose a base branch
from
Open
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
5 changes: 2 additions & 3 deletions src/Tools/Console/Command/DiffCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

use function addslashes;
use function class_exists;
use function count;
use function filter_var;
Expand Down Expand Up @@ -155,12 +154,12 @@ protected function execute(
'',
sprintf(
'To run just this migration for testing purposes, you can use <info>migrations:execute --up \'%s\'</info>',
addslashes($fqcn),
$fqcn,
),
'',
sprintf(
'To revert the migration you can use <info>migrations:execute --down \'%s\'</info>',
addslashes($fqcn),
$fqcn,
),
'',
]);
Expand Down
5 changes: 2 additions & 3 deletions src/Tools/Console/Command/DumpSchemaCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

use function addslashes;
use function class_exists;
use function sprintf;
use function str_contains;
Expand Down Expand Up @@ -106,12 +105,12 @@ public function execute(
'',
sprintf(
'To run just this migration for testing purposes, you can use <info>migrations:execute --up \'%s\'</info>',
addslashes($fqcn),
$fqcn,
),
'',
sprintf(
'To revert the migration you can use <info>migrations:execute --down \'%s\'</info>',
addslashes($fqcn),
$fqcn,
),
'',
'To use this as a rollup migration you can use the <info>migrations:rollup</info> command.',
Expand Down
4 changes: 2 additions & 2 deletions tests/Tools/Console/Command/DiffCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ public function testExecute(): void
self::assertSame([
'Generated new migration class to "/path/to/migration.php"',
'',
'To run just this migration for testing purposes, you can use migrations:execute --up \'FooNs\\\\Version1234\'',
'To run just this migration for testing purposes, you can use migrations:execute --up \'FooNs\\Version1234\'',
'',
'To revert the migration you can use migrations:execute --down \'FooNs\\\\Version1234\'',
'To revert the migration you can use migrations:execute --down \'FooNs\\Version1234\'',
], array_map(trim(...), explode("\n", trim($output))));
}

Expand Down
4 changes: 2 additions & 2 deletions tests/Tools/Console/Command/DumpSchemaCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ public function testExecute(): void
[
'Dumped your schema to a new migration class at ""',
'',
'To run just this migration for testing purposes, you can use migrations:execute --up \'FooNs\\\\Version1234\'',
'To run just this migration for testing purposes, you can use migrations:execute --up \'FooNs\\Version1234\'',
'',
'To revert the migration you can use migrations:execute --down \'FooNs\\\\Version1234\'',
'To revert the migration you can use migrations:execute --down \'FooNs\\Version1234\'',
'',
'To use this as a rollup migration you can use the migrations:rollup command.',
],
Expand Down