Skip to content

Commit

Permalink
Merge pull request #1535 from mbabker/sf-7
Browse files Browse the repository at this point in the history
Add support for Symfony 7
  • Loading branch information
dbu authored Nov 14, 2023
2 parents 1f5d776 + d525335 commit d4e8d6a
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 47 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
stability: 'stable'

# Minimum supported dependencies with the latest supported PHP version
- php: '8.0'
- php: '8.2'
dependencies: lowest
symfony: '*'
stability: 'stable'
Expand All @@ -47,20 +47,20 @@ jobs:
symfony: '5.3.*'
stability: 'stable'

# Test Symfony 5.4 dev version
- php: '7.4'
# Test Symfony 6.4 dev version
- php: '8.2'
dependencies: highest
symfony: '5.4.*'
symfony: '6.4.*'
stability: 'dev'

# Test Symfony 6.0 dev version
- php: '8.0'
# Test Symfony 7.0 dev version
- php: '8.2'
dependencies: highest
symfony: '6.0.*'
symfony: '7.0.*'
stability: 'dev'
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Configure coverage driver
id: coverage
Expand All @@ -77,13 +77,13 @@ jobs:
if: matrix.symfony != '*'
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-interaction --no-progress symfony/flex:^1.11
composer global require --no-interaction --no-progress symfony/flex
composer config extra.symfony.require ${{ matrix.symfony }}
- name: Remove non-compatible dependencies with Symfony 6
if: matrix.symfony == '6.0.*'
- name: Remove non-compatible dependencies with Symfony 7
if: matrix.symfony == '7.0.*'
run: |
composer remove enqueue/enqueue-bundle --dev --no-update
composer remove enqueue/enqueue-bundle symfony/templating --dev --no-update
- name: Set minimum-stability
run: composer config minimum-stability ${{ matrix.stability }}
Expand Down
3 changes: 1 addition & 2 deletions Message/Handler/WarmupCacheHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
use Liip\ImagineBundle\Imagine\Filter\FilterManager;
use Liip\ImagineBundle\Message\WarmupCache;
use Liip\ImagineBundle\Service\FilterService;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;

/**
* Listen to WarmupCache messages and prepare the cache for those images.
*
* @experimental
*/
class WarmupCacheHandler implements MessageHandlerInterface
class WarmupCacheHandler
{
/** @var FilterManager */
private $filterManager;
Expand Down
2 changes: 0 additions & 2 deletions Tests/Binary/Loader/FlysystemLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
use Symfony\Component\Mime\MimeTypes;

/**
* @requires PHP 5.4
*
* @covers \Liip\ImagineBundle\Binary\Loader\FlysystemLoader
*/
class FlysystemLoaderTest extends AbstractTest
Expand Down
2 changes: 0 additions & 2 deletions Tests/Binary/Loader/FlysystemV2LoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
use Symfony\Component\Mime\MimeTypes;

/**
* @requires PHP 7.2
*
* @covers \Liip\ImagineBundle\Binary\Loader\FlysystemV2Loader
*/
class FlysystemV2LoaderTest extends AbstractTest
Expand Down
2 changes: 0 additions & 2 deletions Tests/Imagine/Cache/Resolver/FlysystemV2ResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
use Symfony\Component\Routing\RequestContext;

/**
* @requires PHP 7.2
*
* @covers \Liip\ImagineBundle\Imagine\Cache\Resolver\FlysystemV2Resolver
*/
class FlysystemV2ResolverTest extends AbstractTest
Expand Down
10 changes: 0 additions & 10 deletions Tests/Message/Handler/WarmupCacheHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@
use Liip\ImagineBundle\Message\WarmupCache;
use Liip\ImagineBundle\Service\FilterService;
use Liip\ImagineBundle\Tests\Functional\AbstractWebTestCase;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
use Symfony\Component\Messenger\MessageBusInterface;

/**
* @requires PHP 7.1
*
* @covers \Liip\ImagineBundle\Message\Handler\WarmupCacheHandler
*/
class WarmupCacheHandlerTest extends AbstractWebTestCase
Expand All @@ -36,13 +33,6 @@ protected function setUp(): void
}
}

public function testShouldImplementMessageHandlerInterface(): void
{
$rc = new \ReflectionClass(WarmupCacheHandler::class);

$this->assertTrue($rc->implementsInterface(MessageHandlerInterface::class));
}

public function testCouldBeConstructedWithExpectedArguments(): void
{
static::createClient();
Expand Down
8 changes: 8 additions & 0 deletions Tests/Templating/AbstractFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@
use Liip\ImagineBundle\Templating\FilterExtension;
use Liip\ImagineBundle\Templating\Helper\FilterHelper;
use Liip\ImagineBundle\Tests\AbstractTest;
use Symfony\Component\Templating\Helper\Helper;

abstract class AbstractFilterTest extends AbstractTest
{
public static function setUpBeforeClass(): void
{
if (!class_exists(Helper::class)) {
static::markTestSkipped('Test requires deprecated symfony/templating component');
}
}

public function testCanBeConstructed(): void
{
$this->createTemplatingMock();
Expand Down
34 changes: 17 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "symfony-bundle",
"description": "This bundle provides an image manipulation abstraction toolkit for Symfony-based projects.",
"keywords": [ "imagine", "image", "manipulation", "pictures", "photos", "transformation", "bundle", "symfony", "liip" ],
"homepage": "http://liip.ch",
"homepage": "https://www.liip.ch",
"license": "MIT",
"authors": [
{
Expand All @@ -21,35 +21,35 @@
"php": "^7.2|^8.0",
"ext-mbstring": "*",
"imagine/imagine": "^1.3.2",
"symfony/filesystem": "^3.4|^4.4|^5.3|^6.0",
"symfony/finder": "^3.4|^4.4|^5.3|^6.0",
"symfony/framework-bundle": "^3.4.23|^4.4|^5.3|^6.0",
"symfony/mime": "^4.4|^5.3|^6.0",
"symfony/options-resolver": "^3.4|^4.4|^5.3|^6.0",
"symfony/process": "^3.4|^4.4|^5.3|^6.0",
"symfony/filesystem": "^3.4|^4.4|^5.3|^6.0|^7.0",
"symfony/finder": "^3.4|^4.4|^5.3|^6.0|^7.0",
"symfony/framework-bundle": "^3.4.23|^4.4|^5.3|^6.0|^7.0",
"symfony/mime": "^4.4|^5.3|^6.0|^7.0",
"symfony/options-resolver": "^3.4|^4.4|^5.3|^6.0|^7.0",
"symfony/process": "^3.4|^4.4|^5.3|^6.0|^7.0",
"twig/twig": "^1.44|^2.9|^3.0"
},
"require-dev": {
"ext-gd": "*",
"amazonwebservices/aws-sdk-for-php": "^1.0",
"aws/aws-sdk-php": "^2.4",
"aws/aws-sdk-php": "^2.4|^3.0",
"doctrine/cache": "^1.11|^2.0",
"doctrine/persistence": "^1.3|^2.0",
"enqueue/enqueue-bundle": "^0.9|^0.10",
"league/flysystem": "^1.0|^2.0|^3.0",
"phpstan/phpstan": "^1.10.0",
"psr/cache": "^1.0|^2.0|^3.0",
"psr/log": "^1.0",
"symfony/browser-kit": "^3.4|^4.4|^5.3|^6.0",
"symfony/cache": "^3.4|^4.4|^5.3|^6.0",
"symfony/console": "^3.4|^4.4|^5.3|^6.0",
"symfony/dependency-injection": "^3.4|^4.4|^5.3|^6.0",
"symfony/form": "^3.4|^4.4|^5.3|^6.0",
"symfony/messenger": "^4.4|^5.3|^6.0",
"symfony/phpunit-bridge": "^5.3",
"symfony/browser-kit": "^3.4|^4.4|^5.3|^6.0|^7.0",
"symfony/cache": "^3.4|^4.4|^5.3|^6.0|^7.0",
"symfony/console": "^3.4|^4.4|^5.3|^6.0|^7.0",
"symfony/dependency-injection": "^3.4|^4.4|^5.3|^6.0|^7.0",
"symfony/form": "^3.4|^4.4|^5.3|^6.0|^7.0",
"symfony/messenger": "^4.4|^5.3|^6.0|^7.0",
"symfony/phpunit-bridge": "^5.3|^6.0|^7.0",
"symfony/templating": "^3.4|^4.4|^5.3|^6.0",
"symfony/validator": "^3.4|^4.4|^5.3|^6.0",
"symfony/yaml": "^3.4|^4.4|^5.3|^6.0"
"symfony/validator": "^3.4|^4.4|^5.3|^6.0|^7.0",
"symfony/yaml": "^3.4|^4.4|^5.3|^6.0|^7.0"
},
"suggest": {
"ext-exif": "required to read EXIF metadata from images",
Expand Down

0 comments on commit d4e8d6a

Please sign in to comment.