Skip to content

Commit

Permalink
[8.x] Bumped minimum Symfony version (#35535)
Browse files Browse the repository at this point in the history
* Bumped minimum symfony version

* Added test for converting empty strings middleware

Co-Authored-By: Jason Varga <jason@pixelfear.com>

Co-authored-by: Jason Varga <jason@pixelfear.com>
  • Loading branch information
GrahamCampbell and jasonvarga committed Dec 8, 2020
1 parent b08aef6 commit c2337b6
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 36 deletions.
24 changes: 12 additions & 12 deletions composer.json
Expand Up @@ -31,15 +31,15 @@
"psr/simple-cache": "^1.0",
"ramsey/uuid": "^4.0",
"swiftmailer/swiftmailer": "^6.0",
"symfony/console": "^5.1",
"symfony/error-handler": "^5.1",
"symfony/finder": "^5.1",
"symfony/http-foundation": "^5.1",
"symfony/http-kernel": "^5.1",
"symfony/mime": "^5.1",
"symfony/process": "^5.1",
"symfony/routing": "^5.1",
"symfony/var-dumper": "^5.1",
"symfony/console": "^5.1.4",
"symfony/error-handler": "^5.1.4",
"symfony/finder": "^5.1.4",
"symfony/http-foundation": "^5.1.4",
"symfony/http-kernel": "^5.1.4",
"symfony/mime": "^5.1.4",
"symfony/process": "^5.1.4",
"symfony/routing": "^5.1.4",
"symfony/var-dumper": "^5.1.4",
"tijsverkoyen/css-to-inline-styles": "^2.2.2",
"vlucas/phpdotenv": "^5.2",
"voku/portable-ascii": "^1.4.8"
Expand Down Expand Up @@ -88,7 +88,7 @@
"pda/pheanstalk": "^4.0",
"phpunit/phpunit": "^8.5.8|^9.3.3",
"predis/predis": "^1.1.1",
"symfony/cache": "^5.1"
"symfony/cache": "^5.1.4"
},
"provide": {
"psr/container-implementation": "1.0"
Expand Down Expand Up @@ -144,8 +144,8 @@
"predis/predis": "Required to use the predis connector (^1.1.2).",
"psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).",
"pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).",
"symfony/cache": "Required to PSR-6 cache bridge (^5.1).",
"symfony/filesystem": "Required to enable support for relative symbolic links (^5.1).",
"symfony/cache": "Required to PSR-6 cache bridge (^5.1.4).",
"symfony/filesystem": "Required to enable support for relative symbolic links (^5.1.4).",
"symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).",
"wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)."
},
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Cache/composer.json
Expand Up @@ -35,7 +35,7 @@
"illuminate/database": "Required to use the database cache driver (^8.0).",
"illuminate/filesystem": "Required to use the file cache driver (^8.0).",
"illuminate/redis": "Required to use the redis cache driver (^8.0).",
"symfony/cache": "Required to PSR-6 cache bridge (^5.1)."
"symfony/cache": "Required to PSR-6 cache bridge (^5.1.4)."
},
"config": {
"sort-packages": true
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Collections/composer.json
Expand Up @@ -32,7 +32,7 @@
}
},
"suggest": {
"symfony/var-dumper": "Required to use the dump method (^5.1)."
"symfony/var-dumper": "Required to use the dump method (^5.1.4)."
},
"config": {
"sort-packages": true
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Console/composer.json
Expand Up @@ -19,8 +19,8 @@
"illuminate/contracts": "^8.0",
"illuminate/macroable": "^8.0",
"illuminate/support": "^8.0",
"symfony/console": "^5.1",
"symfony/process": "^5.1"
"symfony/console": "^5.1.4",
"symfony/process": "^5.1.4"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Cookie/composer.json
Expand Up @@ -19,8 +19,8 @@
"illuminate/contracts": "^8.0",
"illuminate/macroable": "^8.0",
"illuminate/support": "^8.0",
"symfony/http-foundation": "^5.1",
"symfony/http-kernel": "^5.1"
"symfony/http-foundation": "^5.1.4",
"symfony/http-kernel": "^5.1.4"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Database/composer.json
Expand Up @@ -22,7 +22,7 @@
"illuminate/contracts": "^8.0",
"illuminate/macroable": "^8.0",
"illuminate/support": "^8.0",
"symfony/console": "^5.1"
"symfony/console": "^5.1.4"
},
"autoload": {
"psr-4": {
Expand All @@ -41,7 +41,7 @@
"illuminate/events": "Required to use the observers with Eloquent (^8.0).",
"illuminate/filesystem": "Required to use the migrations (^8.0).",
"illuminate/pagination": "Required to paginate the result set (^8.0).",
"symfony/finder": "Required to use Eloquent model factories (^5.1)."
"symfony/finder": "Required to use Eloquent model factories (^5.1.4)."
},
"config": {
"sort-packages": true
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Filesystem/composer.json
Expand Up @@ -19,7 +19,7 @@
"illuminate/contracts": "^8.0",
"illuminate/macroable": "^8.0",
"illuminate/support": "^8.0",
"symfony/finder": "^5.1"
"symfony/finder": "^5.1.4"
},
"autoload": {
"psr-4": {
Expand All @@ -39,8 +39,8 @@
"league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).",
"league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).",
"psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).",
"symfony/filesystem": "Required to enable support for relative symbolic links (^5.1).",
"symfony/mime": "Required to enable support for guessing extensions (^5.1)."
"symfony/filesystem": "Required to enable support for relative symbolic links (^5.1.4).",
"symfony/mime": "Required to enable support for guessing extensions (^5.1.4)."
},
"config": {
"sort-packages": true
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Http/composer.json
Expand Up @@ -20,9 +20,9 @@
"illuminate/macroable": "^8.0",
"illuminate/session": "^8.0",
"illuminate/support": "^8.0",
"symfony/http-foundation": "^5.1",
"symfony/http-kernel": "^5.1",
"symfony/mime": "^5.1"
"symfony/http-foundation": "^5.1.4",
"symfony/http-kernel": "^5.1.4",
"symfony/mime": "^5.1.4"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Queue/composer.json
Expand Up @@ -26,7 +26,7 @@
"illuminate/support": "^8.0",
"opis/closure": "^3.6",
"ramsey/uuid": "^4.0",
"symfony/process": "^5.1"
"symfony/process": "^5.1.4"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Routing/composer.json
Expand Up @@ -24,9 +24,9 @@
"illuminate/pipeline": "^8.0",
"illuminate/session": "^8.0",
"illuminate/support": "^8.0",
"symfony/http-foundation": "^5.1",
"symfony/http-kernel": "^5.1",
"symfony/routing": "^5.1"
"symfony/http-foundation": "^5.1.4",
"symfony/http-kernel": "^5.1.4",
"symfony/routing": "^5.1.4"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Session/composer.json
Expand Up @@ -20,8 +20,8 @@
"illuminate/contracts": "^8.0",
"illuminate/filesystem": "^8.0",
"illuminate/support": "^8.0",
"symfony/finder": "^5.1",
"symfony/http-foundation": "^5.1"
"symfony/finder": "^5.1.4",
"symfony/http-foundation": "^5.1.4"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Support/composer.json
Expand Up @@ -43,8 +43,8 @@
"suggest": {
"illuminate/filesystem": "Required to use the composer class (^8.0).",
"ramsey/uuid": "Required to use Str::uuid() (^4.0).",
"symfony/process": "Required to use the composer class (^5.1).",
"symfony/var-dumper": "Required to use the dd function (^5.1).",
"symfony/process": "Required to use the composer class (^5.1.4).",
"symfony/var-dumper": "Required to use the dd function (^5.1.4).",
"vlucas/phpdotenv": "Required to use the Env class and env helper (^5.2)."
},
"config": {
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Validation/composer.json
Expand Up @@ -23,8 +23,8 @@
"illuminate/macroable": "^8.0",
"illuminate/support": "^8.0",
"illuminate/translation": "^8.0",
"symfony/http-foundation": "^5.1",
"symfony/mime": "^5.1"
"symfony/http-foundation": "^5.1.4",
"symfony/mime": "^5.1.4"
},
"autoload": {
"psr-4": {
Expand Down
27 changes: 27 additions & 0 deletions tests/Foundation/Http/Middleware/ConvertEmptyStringsToNullTest.php
@@ -0,0 +1,27 @@
<?php

namespace Illuminate\Tests\Foundation\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull;
use Illuminate\Http\Request;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request as SymfonyRequest;

class ConvertEmptyStringsToNullTest extends TestCase
{
public function testConvertsEmptyStringsToNull()
{
$middleware = new ConvertEmptyStringsToNull();
$symfonyRequest = new SymfonyRequest([
'foo' => 'bar',
'baz' => '',
]);
$symfonyRequest->server->set('REQUEST_METHOD', 'GET');
$request = Request::createFromBase($symfonyRequest);

$middleware->handle($request, function (Request $request) {
$this->assertSame('bar', $request->get('foo'));
$this->assertNull($request->get('bar'));
});
}
}

0 comments on commit c2337b6

Please sign in to comment.