Skip to content

Commit

Permalink
Merge pull request #25 from jawira/fix-default-server
Browse files Browse the repository at this point in the history
Fix default server
  • Loading branch information
jawira authored Jan 12, 2024
2 parents 5c0428c + b2ed8a0 commit f816f0a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"issues": "https://github.com/jawira/doctrine-diagram-bundle/issues"
},
"require": {
"php": "^8",
"php": "^8.0",
"doctrine/orm": "^2.9",
"doctrine/persistence": "^2.2 || ^3.0",
"jawira/db-draw": "^1.2",
"jawira/plantuml-client": "^1.0",
"symfony/console": "^6.1 || ^7.0",
"symfony/filesystem": "^6.1 || ^7.0",
"symfony/framework-bundle": "^6.1 || ^7.0"
"symfony/console": "^5.4 || ^6.0 || ^7.0",
"symfony/filesystem": "^5.4 || ^6.0 || ^7.0",
"symfony/framework-bundle": "^5.4 || ^6.0 || ^7.0"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.15",
Expand Down
17 changes: 12 additions & 5 deletions src/Command/DoctrineDiagramCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* @author Jawira Portugal
*/
#[AsCommand('doctrine:diagram')]
#[AsCommand('doctrine:diagram', 'Create a database diagram.')]
class DoctrineDiagramCommand extends Command
{
public function __construct(private DoctrineDiagram $doctrineDiagram)
Expand All @@ -26,15 +26,22 @@ public function __construct(private DoctrineDiagram $doctrineDiagram)

protected function configure(): void
{
$this->setDescription('Create database diagram.')
$this
->setHelp(<<<'HELP'
Create a database diagram using a Doctrine ORM connection.
If you are experiencing problems creating a diagram, try using PlantUML (<info>puml</info>) format.
Unlike <info>png</info> and <info>svg</info> formats, PlantUML doesn't require an internet connection.
HELP
)
->addUsage(sprintf('--%s=%s', Config::SIZE, Size::MINI))
->addUsage(sprintf('--%s=my-diagram --%s=png', Config::FILENAME, Config::FORMAT))
->addUsage(sprintf('--%s=default', Config::CONNECTION))
->addOption(Config::SIZE, null, InputOption::VALUE_REQUIRED, 'Diagram size (mini, midi or maxi)')
->addOption(Config::SIZE, null, InputOption::VALUE_REQUIRED, 'Diagram size (mini, midi or maxi).')
->addOption(Config::FILENAME, null, InputOption::VALUE_REQUIRED, 'Destination file name.')
->addOption(Config::FORMAT, null, InputOption::VALUE_REQUIRED, 'Diagram format (svg, png or puml).')
->addOption(Config::CONNECTION, null, InputOption::VALUE_REQUIRED, 'Doctrine connection to use.')
->addOption(Config::SERVER, null, InputOption::VALUE_REQUIRED, 'PlantUML server URL, used to convert puml diagrams to svg and png.');
->addOption(Config::SERVER, null, InputOption::VALUE_REQUIRED, 'PlantUML server URL, used to convert puml diagrams to svg and png.')
->addOption(Config::CONNECTION, null, InputOption::VALUE_REQUIRED, 'Doctrine connection to use.');
}

protected function execute(InputInterface $input, OutputInterface $output): int
Expand Down
2 changes: 1 addition & 1 deletion src/Constants/Fallback.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ class Fallback
public const SIZE = Size::MIDI;
public const FILENAME = 'database';
public const FORMAT = Format::SVG;
public const SERVER = 'http//www.plantuml.com/plantuml';
public const SERVER = 'http://www.plantuml.com/plantuml';
public const CONNECTION = 'default';
}

0 comments on commit f816f0a

Please sign in to comment.