From 2473a3ecdd95b712459d22678d1aba25aa38df31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Wed, 7 Apr 2021 17:06:51 +0200 Subject: [PATCH 1/3] Allow PHP 8.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 94a8bae..ecc4211 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ ] }, "require": { - "php": "^7.1.3", + "php": "^7.1.3 || ^8.0", "symfony/framework-bundle": "^4.4 || ^5.0", "symfony/twig-bundle": "^4.4 || ^5.0" }, From 9321bce94d69fa866218166bad5d0c8a069520fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Wed, 7 Apr 2021 17:07:53 +0200 Subject: [PATCH 2/3] Run the CI with PHP 8.0 too --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 42f7f3b..a59fa78 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ php: - 7.1 - 7.2 - 7.3 + - 8.0 env: global: From 3b5ae9e4330c311038d1e4e2b5efc815b5a50be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Wed, 7 Apr 2021 17:17:41 +0200 Subject: [PATCH 3/3] Fixed CS --- Tests/Command/GifOptimizerCommandTest.php | 8 ++++---- Tests/FunctionalTest.php | 4 ++-- Tests/KernelTestCase.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Tests/Command/GifOptimizerCommandTest.php b/Tests/Command/GifOptimizerCommandTest.php index 6397142..a5553a1 100644 --- a/Tests/Command/GifOptimizerCommandTest.php +++ b/Tests/Command/GifOptimizerCommandTest.php @@ -19,7 +19,7 @@ class GifOptimizerCommandTest extends KernelTestCase private $prototypeGif; private $testGif; - public function setUp(): void + protected function setUp(): void { parent::setUp(); @@ -27,7 +27,7 @@ public function setUp(): void $this->testGif = __DIR__ . '/gifs/test.gif'; } - public function tearDown(): void + protected function tearDown(): void { parent::tearDown(); copy($this->prototypeGif, $this->testGif); @@ -52,7 +52,7 @@ public function testGifIsResizedToExpectedWidth() try { $this->getOutputForCommand('jolicode:gifexception:optimize', $args, $options); } catch (CommandNotFound $e) { - $this->markTestSkipped(sprintf('Gif optimizer tool is not executable')); + $this->markTestSkipped('Gif optimizer tool is not executable'); } clearstatcache(true, $this->testGif); @@ -72,7 +72,7 @@ public function testGifIsSmallerFileSize() try { $this->getOutputForCommand('jolicode:gifexception:optimize', $args); } catch (CommandNotFound $e) { - $this->markTestSkipped(sprintf('Gif optimizer tool is not executable')); + $this->markTestSkipped('Gif optimizer tool is not executable'); } clearstatcache(true, $this->testGif); diff --git a/Tests/FunctionalTest.php b/Tests/FunctionalTest.php index f44b29b..abb9410 100644 --- a/Tests/FunctionalTest.php +++ b/Tests/FunctionalTest.php @@ -16,7 +16,7 @@ class FunctionalTest extends WebTestCase { - public function test_it_does_not_display_gif_on_exception_page_if_the_bundle_is_not_enabled() + public function testItDoesNotDisplayGifOnExceptionPageIfTheBundleIsNotEnabled() { $client = static::createClient(['environment' => 'prod', 'debug' => true]); @@ -30,7 +30,7 @@ public function test_it_does_not_display_gif_on_exception_page_if_the_bundle_is_ self::assertFalse($image->hasAttribute('data-gif')); } - public function test_it_displays_gif_on_exception_page_if_the_bundle_is_enabled() + public function testItDisplaysGifOnExceptionPageIfTheBundleIsEnabled() { $client = static::createClient(['environment' => 'dev', 'debug' => true]); diff --git a/Tests/KernelTestCase.php b/Tests/KernelTestCase.php index 2b9c2f5..6d88650 100644 --- a/Tests/KernelTestCase.php +++ b/Tests/KernelTestCase.php @@ -23,7 +23,7 @@ abstract class KernelTestCase extends BaseKernelTestCase */ protected $tester; - public function setUp(): void + protected function setUp(): void { self::bootKernel();