Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite19a34d

Browse files
committed
feature#25148 Pr/workflow name as graph label (shdev)
This PR was squashed before being merged into the 4.1-dev branch (closes#25148).Discussion----------Pr/workflow name as graph label| Q | A| ------------- | ---| Branch? | master| Bug fix? | no| New feature? | yes| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR |This pull request added an option to the workflow dumper command, which allows you to add a graph label with the workflow name to the output. Without the option nothing changed the behavior from before.Example call:```bashbin/console workflow:dump <workflowname> --label=custom_label```Commits-------0afce8d Pr/workflow name as graph label
2 parents033e752 +0afce8d commite19a34d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

‎src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CHANGELOG
77
* Allowed to pass an optional`LoggerInterface $logger` instance to the`Router`
88
* Added a new`parameter_bag` service with related autowiring aliases to access parameters as-a-service
99
* Allowed the`Router` to work with any PSR-11 container
10+
* added option in workflow dump command to label graph with a custom label
1011

1112
4.0.0
1213
-----

‎src/Symfony/Bundle/FrameworkBundle/Command/WorkflowDumpCommand.php‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
useSymfony\Component\Console\Command\Command;
1515
useSymfony\Component\Console\Input\InputArgument;
1616
useSymfony\Component\Console\Input\InputInterface;
17+
useSymfony\Component\Console\Input\InputOption;
1718
useSymfony\Component\Console\Output\OutputInterface;
1819
useSymfony\Component\Workflow\Dumper\GraphvizDumper;
1920
useSymfony\Component\Workflow\Dumper\StateMachineGraphvizDumper;
@@ -37,6 +38,7 @@ protected function configure()
3738
->setDefinition(array(
3839
newInputArgument('name', InputArgument::REQUIRED,'A workflow name'),
3940
newInputArgument('marking', InputArgument::IS_ARRAY,'A marking (a list of places)'),
41+
newInputOption('label','l', InputArgument::OPTIONAL,'Labels a graph'),
4042
))
4143
->setDescription('Dump a workflow')
4244
->setHelp(<<<'EOF'
@@ -73,6 +75,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
7375
$marking->mark($place);
7476
}
7577

76-
$output->writeln($dumper->dump($workflow->getDefinition(),$marking));
78+
$options =array();
79+
$label =$input->getOption('label');
80+
if (null !==$label &&'' !==trim($label)) {
81+
$options =array('graph' =>array('label' =>$label));
82+
}
83+
$output->writeln($dumper->dump($workflow->getDefinition(),$marking,$options));
7784
}
7885
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp