Skip to content

Commit

Permalink
Forward compatibility with upcoming symfony/console v5 and current v4
Browse files Browse the repository at this point in the history
This changeset includes a simple test to verify installation of this
project as dependency works alongside symfony/console:^4.0.

Symfony 5 has yet to be released (ETA this month), but some manual tests
against the current development version suggest this is supported as
well.
  • Loading branch information
clue committed Nov 4, 2019
1 parent 1165e36 commit a043d49
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ matrix:
dist: precise
- php: 7.2
script: composer build
- php: 7.2
install: []
script: composer install --dry-run --working-dir=tests/install-as-dep
allow_failures:
- php: hhvm

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"homepage": "https://github.com/clue/graph-composer",
"license": "MIT",
"require": {
"php": "^5.3.6 || ^7.0",
"php": ">=5.3.6",
"clue/graph": "^0.9.0",
"graphp/graphviz": "^0.2.0",
"jms/composer-deps-analyzer": "0.1.*",
"symfony/console": "^3.0 || ^2.1"
"symfony/console": "^5.0 || ^4.0 || ^3.0 || ^2.1"
},
"require-dev": {
"clue/phar-composer": "^1.0",
Expand Down
5 changes: 3 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/Clue/GraphComposer/Command/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
} else {
readfile($path);
}

return 0;
}
}
2 changes: 2 additions & 0 deletions src/Clue/GraphComposer/Command/Show.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$graph = new GraphComposer($input->getArgument('dir'));
$graph->setFormat($input->getOption('format'));
$graph->displayGraph();

return 0;
}
}
17 changes: 17 additions & 0 deletions tests/install-as-dep/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"require": {
"symfony/console": "^4.0"
},
"require-dev": {
"clue/graph-composer": "*@dev"
},
"repositories": [
{
"type": "path",
"url": "../../",
"options": {
"symlink": false
}
}
]
}

0 comments on commit a043d49

Please sign in to comment.