From c880e630a37b7a3760eeaa7fffa073629fa6e101 Mon Sep 17 00:00:00 2001 From: Jakub Zalas Date: Fri, 1 May 2020 13:33:43 +0100 Subject: [PATCH 1/3] Execute docker dependent tests with github actions --- .../Storage/Handler/AbstractRedisSessionHandlerTestCase.php | 5 +++++ .../Storage/Handler/PredisClusterSessionHandlerTest.php | 3 +++ Tests/Session/Storage/Handler/PredisSessionHandlerTest.php | 3 +++ .../Session/Storage/Handler/RedisArraySessionHandlerTest.php | 3 +++ .../Storage/Handler/RedisClusterSessionHandlerTest.php | 3 +++ Tests/Session/Storage/Handler/RedisSessionHandlerTest.php | 3 +++ 6 files changed, 20 insertions(+) diff --git a/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php b/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php index 8828be666..3f3982ff4 100644 --- a/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php +++ b/Tests/Session/Storage/Handler/AbstractRedisSessionHandlerTestCase.php @@ -44,6 +44,11 @@ protected function setUp(): void if (!\extension_loaded('redis')) { self::markTestSkipped('Extension redis required.'); } + try { + (new \Redis())->connect(getenv('REDIS_HOST')); + } catch (\Exception $e) { + self::markTestSkipped($e->getMessage()); + } $host = getenv('REDIS_HOST') ?: 'localhost'; diff --git a/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php b/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php index 622b42da1..8926fb1a9 100644 --- a/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php +++ b/Tests/Session/Storage/Handler/PredisClusterSessionHandlerTest.php @@ -13,6 +13,9 @@ use Predis\Client; +/** + * @group integration + */ class PredisClusterSessionHandlerTest extends AbstractRedisSessionHandlerTestCase { protected function createRedisClient(string $host): Client diff --git a/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php b/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php index 5ecab116f..bb33a3d9a 100644 --- a/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php +++ b/Tests/Session/Storage/Handler/PredisSessionHandlerTest.php @@ -13,6 +13,9 @@ use Predis\Client; +/** + * @group integration + */ class PredisSessionHandlerTest extends AbstractRedisSessionHandlerTestCase { protected function createRedisClient(string $host): Client diff --git a/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php b/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php index 3ef6cb694..c2647c35b 100644 --- a/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php +++ b/Tests/Session/Storage/Handler/RedisArraySessionHandlerTest.php @@ -11,6 +11,9 @@ namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; +/** + * @group integration + */ class RedisArraySessionHandlerTest extends AbstractRedisSessionHandlerTestCase { /** diff --git a/Tests/Session/Storage/Handler/RedisClusterSessionHandlerTest.php b/Tests/Session/Storage/Handler/RedisClusterSessionHandlerTest.php index 8b4cd1cdd..278b3c876 100644 --- a/Tests/Session/Storage/Handler/RedisClusterSessionHandlerTest.php +++ b/Tests/Session/Storage/Handler/RedisClusterSessionHandlerTest.php @@ -11,6 +11,9 @@ namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; +/** + * @group integration + */ class RedisClusterSessionHandlerTest extends AbstractRedisSessionHandlerTestCase { public static function setUpBeforeClass(): void diff --git a/Tests/Session/Storage/Handler/RedisSessionHandlerTest.php b/Tests/Session/Storage/Handler/RedisSessionHandlerTest.php index 71658f072..e7fb1ca19 100644 --- a/Tests/Session/Storage/Handler/RedisSessionHandlerTest.php +++ b/Tests/Session/Storage/Handler/RedisSessionHandlerTest.php @@ -11,6 +11,9 @@ namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler; +/** + * @group integration + */ class RedisSessionHandlerTest extends AbstractRedisSessionHandlerTestCase { /** From fbd216d2304b1a3fe38d6392b04729c8dd356359 Mon Sep 17 00:00:00 2001 From: vudaltsov Date: Sat, 16 May 2020 16:15:54 +0300 Subject: [PATCH 2/3] Properties $originalName and $mimeType are never null in UploadedFile --- File/UploadedFile.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/File/UploadedFile.php b/File/UploadedFile.php index 5b75dd84f..520615603 100644 --- a/File/UploadedFile.php +++ b/File/UploadedFile.php @@ -24,7 +24,7 @@ */ class UploadedFile extends File { - private $test = false; + private $test; private $originalName; private $mimeType; private $size; @@ -72,7 +72,7 @@ public function __construct($path, $originalName, $mimeType = null, $size = null * It is extracted from the request from which the file has been uploaded. * Then it should not be considered as a safe value. * - * @return string|null The original name + * @return string The original name */ public function getClientOriginalName() { @@ -101,7 +101,7 @@ public function getClientOriginalExtension() * For a trusted mime type, use getMimeType() instead (which guesses the mime * type based on the file content). * - * @return string|null The mime type + * @return string The mime type * * @see getMimeType() */ From 7c4bb04524fe8f5d328a70ed3d143253514cc4bf Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 20 May 2020 10:37:50 +0200 Subject: [PATCH 3/3] Use ">=" for the "php" requirement --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index efc4b9425..a8c7c24c4 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "symfony/mime": "^4.3|^5.0", "symfony/polyfill-mbstring": "~1.1" }, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy