diff --git a/composer.lock b/composer.lock index 83fc9721..9281ae44 100644 --- a/composer.lock +++ b/composer.lock @@ -59,27 +59,27 @@ }, { "name": "phpgt/cli", - "version": "v1.3.2", + "version": "v1.3.3", "source": { "type": "git", "url": "https://github.com/PhpGt/Cli.git", - "reference": "3f00088f76225088602e6d9faa1cf90fbd2205d3" + "reference": "b0334aee36f9e8aad9ca8b9cda397ffe5781f96f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PhpGt/Cli/zipball/3f00088f76225088602e6d9faa1cf90fbd2205d3", - "reference": "3f00088f76225088602e6d9faa1cf90fbd2205d3", + "url": "https://api.github.com/repos/PhpGt/Cli/zipball/b0334aee36f9e8aad9ca8b9cda397ffe5781f96f", + "reference": "b0334aee36f9e8aad9ca8b9cda397ffe5781f96f", "shasum": "" }, "require": { "ext-json": "*", "ext-readline": "*", "php": ">=8.0", - "phpgt/daemon": "1.*" + "phpgt/daemon": "^v1.1" }, "require-dev": { - "phpstan/phpstan": ">=0.12.64", - "phpunit/phpunit": "9.*" + "phpstan/phpstan": "^v1.4", + "phpunit/phpunit": "^v9.5" }, "type": "library", "autoload": { @@ -106,7 +106,7 @@ ], "support": { "issues": "https://github.com/PhpGt/Cli/issues", - "source": "https://github.com/PhpGt/Cli/tree/v1.3.2" + "source": "https://github.com/PhpGt/Cli/tree/v1.3.3" }, "funding": [ { @@ -114,7 +114,7 @@ "type": "github" } ], - "time": "2021-06-15T19:01:44+00:00" + "time": "2022-02-26T15:38:15+00:00" }, { "name": "phpgt/config", @@ -391,16 +391,16 @@ }, { "name": "phpgt/dom", - "version": "v3.0.2", + "version": "v3.0.3", "source": { "type": "git", "url": "https://github.com/PhpGt/Dom.git", - "reference": "762e10859d660d30c159cba3e8af19ec1ae5203c" + "reference": "234c3f2b2b482c046d0317467d53d1d90960193d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PhpGt/Dom/zipball/762e10859d660d30c159cba3e8af19ec1ae5203c", - "reference": "762e10859d660d30c159cba3e8af19ec1ae5203c", + "url": "https://api.github.com/repos/PhpGt/Dom/zipball/234c3f2b2b482c046d0317467d53d1d90960193d", + "reference": "234c3f2b2b482c046d0317467d53d1d90960193d", "shasum": "" }, "require": { @@ -408,13 +408,13 @@ "ext-libxml": "*", "ext-mbstring": "*", "php": ">=8.0", - "phpgt/cssxpath": ">=1.1.2", + "phpgt/cssxpath": "^1.1", "phpgt/propfunc": "^1.0", "psr/http-message": "^1.0" }, "require-dev": { - "phpstan/phpstan": ">=0.12", - "phpunit/phpunit": ">=9.3.8" + "phpstan/phpstan": "^1.4", + "phpunit/phpunit": "^9.5" }, "type": "library", "autoload": { @@ -477,7 +477,7 @@ "description": "The modern DOM API for PHP projects.", "support": { "issues": "https://github.com/PhpGt/Dom/issues", - "source": "https://github.com/PhpGt/Dom/tree/v3.0.2" + "source": "https://github.com/PhpGt/Dom/tree/v3.0.3" }, "funding": [ { @@ -485,7 +485,7 @@ "type": "github" } ], - "time": "2022-01-30T16:47:45+00:00" + "time": "2022-02-26T14:23:56+00:00" }, { "name": "phpgt/domtemplate", @@ -582,23 +582,24 @@ }, { "name": "phpgt/input", - "version": "v1.1.2", + "version": "v1.1.3", "source": { "type": "git", "url": "https://github.com/PhpGt/Input.git", - "reference": "ae78931ffd5c4800f362db61bd86f8e545733e86" + "reference": "d2d27019e7fcf6438e1f54bdfb8322de7edb2ffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PhpGt/Input/zipball/ae78931ffd5c4800f362db61bd86f8e545733e86", - "reference": "ae78931ffd5c4800f362db61bd86f8e545733e86", + "url": "https://api.github.com/repos/PhpGt/Input/zipball/d2d27019e7fcf6438e1f54bdfb8322de7edb2ffd", + "reference": "d2d27019e7fcf6438e1f54bdfb8322de7edb2ffd", "shasum": "" }, "require": { - "phpgt/http": "*" + "phpgt/http": "^v1.1" }, "require-dev": { - "phpunit/phpunit": "8.*" + "phpstan/phpstan": "^v1.4", + "phpunit/phpunit": "^v9.5" }, "type": "library", "autoload": { @@ -613,9 +614,15 @@ "description": "Encapsulated user input.", "support": { "issues": "https://github.com/PhpGt/Input/issues", - "source": "https://github.com/PhpGt/Input/tree/v1.1.2" + "source": "https://github.com/PhpGt/Input/tree/v1.1.3" }, - "time": "2019-11-29T11:22:35+00:00" + "funding": [ + { + "url": "https://github.com/sponsors/PhpGt", + "type": "github" + } + ], + "time": "2022-02-26T15:42:23+00:00" }, { "name": "phpgt/logger", @@ -1239,12 +1246,12 @@ } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - }, "files": [ "bootstrap.php" - ] + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2088,16 +2095,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.11", + "version": "9.2.13", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "665a1ac0a763c51afc30d6d130dac0813092b17f" + "reference": "deac8540cb7bd40b2b8cfa679b76202834fd04e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/665a1ac0a763c51afc30d6d130dac0813092b17f", - "reference": "665a1ac0a763c51afc30d6d130dac0813092b17f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/deac8540cb7bd40b2b8cfa679b76202834fd04e8", + "reference": "deac8540cb7bd40b2b8cfa679b76202834fd04e8", "shasum": "" }, "require": { @@ -2153,7 +2160,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.11" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.13" }, "funding": [ { @@ -2161,7 +2168,7 @@ "type": "github" } ], - "time": "2022-02-18T12:46:09+00:00" + "time": "2022-02-23T17:02:38+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2406,16 +2413,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.14", + "version": "9.5.16", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1883687169c017d6ae37c58883ca3994cfc34189" + "reference": "5ff8c545a50226c569310a35f4fa89d79f1ddfdc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1883687169c017d6ae37c58883ca3994cfc34189", - "reference": "1883687169c017d6ae37c58883ca3994cfc34189", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/5ff8c545a50226c569310a35f4fa89d79f1ddfdc", + "reference": "5ff8c545a50226c569310a35f4fa89d79f1ddfdc", "shasum": "" }, "require": { @@ -2431,7 +2438,7 @@ "phar-io/version": "^3.0.2", "php": ">=7.3", "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.7", + "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -2493,7 +2500,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.14" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.16" }, "funding": [ { @@ -2505,7 +2512,7 @@ "type": "github" } ], - "time": "2022-02-18T12:54:07+00:00" + "time": "2022-02-23T17:10:58+00:00" }, { "name": "sebastian/cli-parser", diff --git a/src/Middleware/Lifecycle.php b/src/Middleware/Lifecycle.php index 14a1c256..f91fea24 100644 --- a/src/Middleware/Lifecycle.php +++ b/src/Middleware/Lifecycle.php @@ -3,7 +3,7 @@ use Gt\Config\ConfigSection; use Gt\Http\RequestFactory; -use Gt\Http\ResponseStatusException\ClientError\HttpNotFound; +use Gt\Http\StatusCode; use Gt\Logger\Log; use Gt\WebEngine\Debug\Timer; use Psr\Http\Message\ResponseInterface; @@ -97,7 +97,7 @@ public function finish( Timer $timer, ConfigSection $appConfig ):void { - http_response_code($response->getStatusCode()); + http_response_code($response->getStatusCode() ?? StatusCode::OK); foreach($response->getHeaders() as $key => $value) { $stringValue = implode(", ", $value);