Skip to content

Commit

Permalink
Upgrade to use new CLI functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Apr 11, 2019
1 parent 3307502 commit 2e9c8d9
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 93 deletions.
5 changes: 2 additions & 3 deletions bin/serve
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
use Gt\Cli\Application;
use Gt\Cli\Argument\ArgumentList;
use Gt\Cli\Argument\CommandArgumentList;
use Gt\Server\Command\StartCommand;

$autoloadLocations = [
Expand All @@ -17,8 +17,7 @@ foreach($autoloadLocations as $location) {

$app = new Application(
"PHP.Gt development web server",
new ArgumentList(...$argv),
new CommandArgumentList("start", ...$argv),
new StartCommand()
);
$app->setDefaultCommand("start");
$app->run();
14 changes: 10 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
{
"repositories": [
{
"type": "path",
"url": "/home/g105b/Code/PhpGt/*"
}
],
"minimum-stability": "dev",

"name": "phpgt/server",
"description": "Development HTTP server.",

"minimum-stability": "dev",

"bin": [
"bin/serve"
],

"require": {
"phpgt/cli": "1.*"
"phpgt/cli": "dev-master"
},
"require-dev": {
"phpunit/phpunit": "8.*"
Expand All @@ -25,4 +31,4 @@
"Gt\\Test\\Server\\": "./test/unit/"
}
}
}
}
114 changes: 74 additions & 40 deletions composer.lock

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

Loading

0 comments on commit 2e9c8d9

Please sign in to comment.