Update composer packages and bump php version to 7.4

main
Igor Scheller 3 years ago committed by msquare
parent 676a2113b4
commit 46d6ada728

@ -18,21 +18,21 @@
"phpcbf": "phpcbf -p" "phpcbf": "phpcbf -p"
}, },
"require": { "require": {
"php": ">=7.3.0", "php": ">=7.4.0",
"ext-json": "*", "ext-json": "*",
"ext-libxml": "*", "ext-libxml": "*",
"ext-mbstring": "*", "ext-mbstring": "*",
"ext-PDO": "*", "ext-PDO": "*",
"ext-SimpleXML": "*", "ext-SimpleXML": "*",
"ext-xml": "*", "ext-xml": "*",
"doctrine/dbal": "^3.1", "doctrine/dbal": "^3.2",
"erusev/parsedown": "^1.7", "erusev/parsedown": "^1.7",
"gettext/gettext": "^5.5", "gettext/gettext": "^5.6",
"gettext/translator": "^1.0", "gettext/translator": "^1.0",
"guzzlehttp/guzzle": "^7.3", "guzzlehttp/guzzle": "^7.4",
"illuminate/container": "^8.41", "illuminate/container": "^8.76",
"illuminate/database": "^8.41", "illuminate/database": "^8.76",
"illuminate/support": "^8.41", "illuminate/support": "^8.76",
"league/oauth2-client": "^2.6", "league/oauth2-client": "^2.6",
"nikic/fast-route": "^1.3", "nikic/fast-route": "^1.3",
"nyholm/psr7": "^1.4", "nyholm/psr7": "^1.4",
@ -41,19 +41,19 @@
"psr/log": "^1.1", "psr/log": "^1.1",
"respect/validation": "^1.1", "respect/validation": "^1.1",
"swiftmailer/swiftmailer": "^6.2", "swiftmailer/swiftmailer": "^6.2",
"symfony/http-foundation": "^5.2", "symfony/http-foundation": "^6.0",
"symfony/mime": "^5.2", "symfony/mime": "^6.0",
"symfony/psr-http-message-bridge": "^2.1", "symfony/psr-http-message-bridge": "^2.1",
"twig/twig": "^3.3", "twig/twig": "^3.3",
"vlucas/phpdotenv": "^5.3" "vlucas/phpdotenv": "^5.4"
}, },
"require-dev": { "require-dev": {
"dms/phpunit-arraysubset-asserts": "^0.3.0", "dms/phpunit-arraysubset-asserts": "^0.3.1",
"fakerphp/faker": "^1.14.1", "fakerphp/faker": "^1.17",
"filp/whoops": "^2.12", "filp/whoops": "^2.14",
"phpunit/phpunit": "^9.5", "phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.6", "squizlabs/php_codesniffer": "^3.6",
"symfony/var-dumper": "^5.2" "symfony/var-dumper": "^6.0"
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {

94
composer.lock generated

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "ed2a8819c2b212ab9d781824a12d7120", "content-hash": "6382e7e9ba81aa4f0146649008ae6f2d",
"packages": [ "packages": [
{ {
"name": "composer/package-versions-deprecated", "name": "composer/package-versions-deprecated",
@ -2938,29 +2938,28 @@
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v5.4.1", "version": "v6.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-foundation.git", "url": "https://github.com/symfony/http-foundation.git",
"reference": "5dad3780023a707f4c24beac7d57aead85c1ce3c" "reference": "4c55dff16ba400dc81c56b6234e5942f9b9c7bcc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/5dad3780023a707f4c24beac7d57aead85c1ce3c", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/4c55dff16ba400dc81c56b6234e5942f9b9c7bcc",
"reference": "5dad3780023a707f4c24beac7d57aead85c1ce3c", "reference": "4c55dff16ba400dc81c56b6234e5942f9b9c7bcc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=8.0.2",
"symfony/deprecation-contracts": "^2.1|^3", "symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-mbstring": "~1.1", "symfony/polyfill-mbstring": "~1.1"
"symfony/polyfill-php80": "^1.16"
}, },
"require-dev": { "require-dev": {
"predis/predis": "~1.0", "predis/predis": "~1.0",
"symfony/cache": "^4.4|^5.0|^6.0", "symfony/cache": "^5.4|^6.0",
"symfony/expression-language": "^4.4|^5.0|^6.0", "symfony/expression-language": "^5.4|^6.0",
"symfony/mime": "^4.4|^5.0|^6.0" "symfony/mime": "^5.4|^6.0"
}, },
"suggest": { "suggest": {
"symfony/mime": "To use the file extension guesser" "symfony/mime": "To use the file extension guesser"
@ -2991,7 +2990,7 @@
"description": "Defines an object-oriented layer for the HTTP specification", "description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/http-foundation/tree/v5.4.1" "source": "https://github.com/symfony/http-foundation/tree/v6.0.1"
}, },
"funding": [ "funding": [
{ {
@ -3007,42 +3006,40 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-09T12:46:57+00:00" "time": "2021-12-09T12:47:37+00:00"
}, },
{ {
"name": "symfony/mime", "name": "symfony/mime",
"version": "v5.4.0", "version": "v6.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/mime.git", "url": "https://github.com/symfony/mime.git",
"reference": "d4365000217b67c01acff407573906ff91bcfb34" "reference": "3506356e2368c5623f52cf5ff643e0dee8d5eef7"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/mime/zipball/d4365000217b67c01acff407573906ff91bcfb34", "url": "https://api.github.com/repos/symfony/mime/zipball/3506356e2368c5623f52cf5ff643e0dee8d5eef7",
"reference": "d4365000217b67c01acff407573906ff91bcfb34", "reference": "3506356e2368c5623f52cf5ff643e0dee8d5eef7",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=8.0.2",
"symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-intl-idn": "^1.10",
"symfony/polyfill-mbstring": "^1.0", "symfony/polyfill-mbstring": "^1.0"
"symfony/polyfill-php80": "^1.16"
}, },
"conflict": { "conflict": {
"egulias/email-validator": "~3.0.0", "egulias/email-validator": "~3.0.0",
"phpdocumentor/reflection-docblock": "<3.2.2", "phpdocumentor/reflection-docblock": "<3.2.2",
"phpdocumentor/type-resolver": "<1.4.0", "phpdocumentor/type-resolver": "<1.4.0",
"symfony/mailer": "<4.4" "symfony/mailer": "<5.4"
}, },
"require-dev": { "require-dev": {
"egulias/email-validator": "^2.1.10|^3.1", "egulias/email-validator": "^2.1.10|^3.1",
"phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0",
"symfony/dependency-injection": "^4.4|^5.0|^6.0", "symfony/dependency-injection": "^5.4|^6.0",
"symfony/property-access": "^4.4|^5.1|^6.0", "symfony/property-access": "^5.4|^6.0",
"symfony/property-info": "^4.4|^5.1|^6.0", "symfony/property-info": "^5.4|^6.0",
"symfony/serializer": "^5.2|^6.0" "symfony/serializer": "^5.4|^6.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
@ -3074,7 +3071,7 @@
"mime-type" "mime-type"
], ],
"support": { "support": {
"source": "https://github.com/symfony/mime/tree/v5.4.0" "source": "https://github.com/symfony/mime/tree/v6.0.1"
}, },
"funding": [ "funding": [
{ {
@ -3090,7 +3087,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-11-23T10:19:22+00:00" "time": "2021-12-08T15:13:44+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
@ -5500,16 +5497,16 @@
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "9.5.10", "version": "9.5.11",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" "reference": "2406855036db1102126125537adb1406f7242fdd"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2406855036db1102126125537adb1406f7242fdd",
"reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", "reference": "2406855036db1102126125537adb1406f7242fdd",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5587,11 +5584,11 @@
], ],
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues", "issues": "https://github.com/sebastianbergmann/phpunit/issues",
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.11"
}, },
"funding": [ "funding": [
{ {
"url": "https://phpunit.de/donate.html", "url": "https://phpunit.de/sponsors.html",
"type": "custom" "type": "custom"
}, },
{ {
@ -5599,7 +5596,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2021-09-25T07:38:51+00:00" "time": "2021-12-25T07:07:57+00:00"
}, },
{ {
"name": "sebastian/cli-parser", "name": "sebastian/cli-parser",
@ -6623,32 +6620,31 @@
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v5.4.1", "version": "v6.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "2366ac8d8abe0c077844613c1a4f0c0a9f522dcc" "reference": "9ca4948ec35bb15175e5475ba83dfdb13042a86c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/2366ac8d8abe0c077844613c1a4f0c0a9f522dcc", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9ca4948ec35bb15175e5475ba83dfdb13042a86c",
"reference": "2366ac8d8abe0c077844613c1a4f0c0a9f522dcc", "reference": "9ca4948ec35bb15175e5475ba83dfdb13042a86c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=8.0.2",
"symfony/polyfill-mbstring": "~1.0", "symfony/polyfill-mbstring": "~1.0"
"symfony/polyfill-php80": "^1.16"
}, },
"conflict": { "conflict": {
"phpunit/phpunit": "<5.4.3", "phpunit/phpunit": "<5.4.3",
"symfony/console": "<4.4" "symfony/console": "<5.4"
}, },
"require-dev": { "require-dev": {
"ext-iconv": "*", "ext-iconv": "*",
"symfony/console": "^4.4|^5.0|^6.0", "symfony/console": "^5.4|^6.0",
"symfony/process": "^4.4|^5.0|^6.0", "symfony/process": "^5.4|^6.0",
"symfony/uid": "^5.1|^6.0", "symfony/uid": "^5.4|^6.0",
"twig/twig": "^2.13|^3.0.4" "twig/twig": "^2.13|^3.0.4"
}, },
"suggest": { "suggest": {
@ -6692,7 +6688,7 @@
"dump" "dump"
], ],
"support": { "support": {
"source": "https://github.com/symfony/var-dumper/tree/v5.4.1" "source": "https://github.com/symfony/var-dumper/tree/v6.0.1"
}, },
"funding": [ "funding": [
{ {
@ -6708,7 +6704,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-01T15:04:08+00:00" "time": "2021-12-08T15:13:44+00:00"
}, },
{ {
"name": "theseer/tokenizer", "name": "theseer/tokenizer",
@ -6825,7 +6821,7 @@
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": ">=7.3.0", "php": ">=7.4.0",
"ext-json": "*", "ext-json": "*",
"ext-libxml": "*", "ext-libxml": "*",
"ext-mbstring": "*", "ext-mbstring": "*",

@ -3,7 +3,6 @@
namespace Engelsystem\Http; namespace Engelsystem\Http;
use Nyholm\Psr7\UploadedFile; use Nyholm\Psr7\UploadedFile;
use Nyholm\Psr7\Uri;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\UploadedFileInterface; use Psr\Http\Message\UploadedFileInterface;
use Psr\Http\Message\UriInterface; use Psr\Http\Message\UriInterface;
@ -194,22 +193,6 @@ class Request extends SymfonyRequest implements ServerRequestInterface
return $new; return $new;
} }
/**
* Retrieves the URI instance.
*
* This method MUST return a UriInterface instance.
*
* @link http://tools.ietf.org/html/rfc3986#section-4.3
* @return string|UriInterface Returns a UriInterface instance
* representing the URI of the request.
*/
public function getUri()
{
$uri = parent::getUri();
return new Uri($uri);
}
/** /**
* Retrieve server parameters. * Retrieve server parameters.
* *

@ -38,7 +38,7 @@ class RequestServiceProvider extends ServiceProvider
protected function setTrustedProxies( protected function setTrustedProxies(
$request, $request,
$proxies, $proxies,
$trustedHeadersSet = Request::HEADER_FORWARDED | Request::HEADER_X_FORWARDED_ALL $trustedHeadersSet = Request::HEADER_FORWARDED | Request::HEADER_X_FORWARDED_TRAEFIK
) { ) {
$request->setTrustedProxies($proxies, $trustedHeadersSet); $request->setTrustedProxies($proxies, $trustedHeadersSet);
} }

@ -4,6 +4,7 @@ namespace Engelsystem\Middleware;
use Engelsystem\Http\Request; use Engelsystem\Http\Request;
use FastRoute\Dispatcher as FastRouteDispatcher; use FastRoute\Dispatcher as FastRouteDispatcher;
use Nyholm\Psr7\Uri;
use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface; use Psr\Http\Server\MiddlewareInterface;
@ -45,7 +46,7 @@ class RouteDispatcher implements MiddlewareInterface
*/ */
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{ {
$path = $request->getUri()->getPath(); $path = (new Uri($request->getUri()))->getPath();
if ($request instanceof Request) { if ($request instanceof Request) {
$path = $request->getPathInfo(); $path = $request->getPathInfo();
} }

@ -200,22 +200,10 @@ class RequestTest extends TestCase
$new = $request->withUri($uri); $new = $request->withUri($uri);
$this->assertNotEquals($request, $new); $this->assertNotEquals($request, $new);
$this->assertEquals('http://foo.bar/bla?foo=bar', (string)$new->getUri()); $this->assertEquals('http://foo.bar/bla?foo=bar', $new->getUri());
$new = $request->withUri($uri, true); $new = $request->withUri($uri, true);
$this->assertEquals('http://lor.em/bla?foo=bar', (string)$new->getUri()); $this->assertEquals('http://lor.em/bla?foo=bar', $new->getUri());
}
/**
* @covers \Engelsystem\Http\Request::getUri
*/
public function testGetUri()
{
$request = Request::create('http://lor.em/test?bla=foo');
$uri = $request->getUri();
$this->assertInstanceOf(UriInterface::class, $uri);
$this->assertEquals('http://lor.em/test?bla=foo', (string)$uri);
} }
/** /**

@ -140,13 +140,10 @@ class RouteDispatcherTest extends TestCase
->willReturn('HEAD'); ->willReturn('HEAD');
$request->expects($this->atLeastOnce()) $request->expects($this->atLeastOnce())
->method('getUri') ->method('getUri')
->willReturn($uriInterface); ->willReturn('http://foo.bar/lorem/foo%21bar');
$request->expects($this->atLeastOnce()) $request->expects($this->atLeastOnce())
->method('getPathInfo') ->method('getPathInfo')
->willReturn('/foo%21bar'); ->willReturn('/foo%21bar');
$uriInterface->expects($this->atLeastOnce())
->method('getPath')
->willReturn('/lorem/foo%21bar');
return [$dispatcher, $response, $request, $handler]; return [$dispatcher, $response, $request, $handler];
} }

Loading…
Cancel
Save