8000 Pr/workflow name as graph label by shdev · Pull Request #25148 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Pr/workflow name as graph label #25148

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

Closed
wants to merge 8 commits into from
Closed
Changes from 1 commit
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
Next Next commit
Update WorkflowDumpCommand.php
- Workflow Command labels a graph with workflow name if option is set
  • Loading branch information
shdev authored and fabpot committed Dec 11, 2017
commit ec06cdd17b2c5830df590b915fdeca9c47423ab6
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ protected function configure()
->setDefinition(array(
new InputArgument('name', InputArgument::REQUIRED, 'A workflow name'),
new InputArgument('marking', InputArgument::IS_ARRAY, 'A marking (a list of places)'),
new InputOption('workflow-name-label', null, null, 'Labels graph with workflow name'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about --label | --label="value" api? Using workflow name as default value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for your comment thats a very good idea. I will change it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated my pull request now it's like you suggested

))
->setDescription('Dump a workflow')
->setHelp(<<<'EOF'
Expand Down Expand Up @@ -73,6 +74,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
$marking->mark($place);
}

$output->writeln($dumper->dump($workflow->getDefinition(), $marking));
$options = [];
if ($input->getOption('workflow-name-label')) {
$options = ['graph' => ['label' => $serviceId]];
}

$output->writeln($dumper->dump($workflow->getDefinition(), $marking, $options));
}
}
0