From b551ebbd90857a2e1a1589f4799e94472f1f89b7 Mon Sep 17 00:00:00 2001 From: Hannes Giesenow Date: Mon, 9 Oct 2023 17:12:16 +0200 Subject: [PATCH] Compatibility for ibexa >= 4.5 --- composer.json | 2 +- src/FieldHelper/ImageFieldHelper.php | 2 +- src/FieldHelper/RelationFieldHelper.php | 2 +- tests/FieldHelper/ImageFieldHelperTest.php | 5 ++--- tests/FieldHelper/RelationFieldHelperTest.php | 7 ++----- tests/FieldHelper/RichtextFieldHelperTest.php | 4 ++-- 6 files changed, 9 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 4b1031d..898263c 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ }, "require": { "php": ">=8.1", - "ibexa/oss": "^3.3", + "ibexa/oss": "^4.5", "ext-dom": "*" }, "require-dev": { diff --git a/src/FieldHelper/ImageFieldHelper.php b/src/FieldHelper/ImageFieldHelper.php index 5f1cbd3..69d2f26 100644 --- a/src/FieldHelper/ImageFieldHelper.php +++ b/src/FieldHelper/ImageFieldHelper.php @@ -13,7 +13,7 @@ use eZ\Publish\Core\FieldType\RelationList\Value as RelationValue; use eZ\Publish\Core\MVC\ConfigResolverInterface; use eZ\Publish\SPI\Variation\VariationHandler; -use EzSystems\PlatformHttpCacheBundle\ResponseTagger\ResponseTagger; +use Ibexa\Contracts\HttpCache\ResponseTagger\ResponseTagger; use eZ\Publish\Core\FieldType\Image\Value as ImageValue; use eZ\Publish\Core\FieldType\ImageAsset\Value as ImageAssetValue; diff --git a/src/FieldHelper/RelationFieldHelper.php b/src/FieldHelper/RelationFieldHelper.php index e523242..90f9038 100644 --- a/src/FieldHelper/RelationFieldHelper.php +++ b/src/FieldHelper/RelationFieldHelper.php @@ -11,7 +11,7 @@ use eZ\Publish\API\Repository\Values\Content\ContentStruct; use eZ\Publish\Core\FieldType\Relation\Value as RelationValue; use eZ\Publish\Core\FieldType\RelationList\Value as RelationListValue; -use EzSystems\PlatformHttpCacheBundle\ResponseTagger\ResponseTagger; +use Ibexa\Contracts\HttpCache\ResponseTagger\ResponseTagger; use Psr\Log\LoggerInterface; /** diff --git a/tests/FieldHelper/ImageFieldHelperTest.php b/tests/FieldHelper/ImageFieldHelperTest.php index 30a06ca..ff6117e 100644 --- a/tests/FieldHelper/ImageFieldHelperTest.php +++ b/tests/FieldHelper/ImageFieldHelperTest.php @@ -15,13 +15,12 @@ use eZ\Publish\Core\Base\Exceptions\NotFoundException; use eZ\Publish\Core\FieldType\Float\Value as FloatValue; use eZ\Publish\Core\FieldType\Image\Value; -use eZ\Publish\Core\MVC\ConfigResolverInterface; +use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use eZ\Publish\Core\Repository\Values\Content\Content; use eZ\Publish\Core\Repository\Values\Content\VersionInfo; use eZ\Publish\Core\Repository\Values\ContentType\ContentType; use eZ\Publish\SPI\Variation\VariationHandler; -use EzSystems\EzPlatformRichText\eZ\FieldType\RichText\Value as RichtextValue; -use EzSystems\PlatformHttpCacheBundle\ResponseTagger\ResponseTagger; +use Ibexa\Contracts\HttpCache\ResponseTagger\ResponseTagger; use PHPUnit\Framework\TestCase; /** diff --git a/tests/FieldHelper/RelationFieldHelperTest.php b/tests/FieldHelper/RelationFieldHelperTest.php index 8c230d7..b57999c 100644 --- a/tests/FieldHelper/RelationFieldHelperTest.php +++ b/tests/FieldHelper/RelationFieldHelperTest.php @@ -7,23 +7,20 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; use Elbformat\FieldHelperBundle\FieldHelper\RelationFieldHelper; -use Elbformat\FieldHelperBundle\FieldHelper\TextFieldHelper; use eZ\Publish\API\Repository\ContentService; use eZ\Publish\API\Repository\Repository; use eZ\Publish\API\Repository\Values\Content\ContentInfo; use eZ\Publish\API\Repository\Values\Content\Field; use eZ\Publish\Core\Base\Exceptions\NotFoundException; +use eZ\Publish\Core\FieldType\Float\Value as FloatValue; use eZ\Publish\Core\FieldType\Relation\Value as RelationValue; use eZ\Publish\Core\FieldType\RelationList\Value as RelationListValue; -use eZ\Publish\Core\FieldType\Float\Value as FloatValue; -use eZ\Publish\Core\FieldType\TextBlock\Value as TextBlockValue; -use eZ\Publish\Core\FieldType\TextLine\Value as TextLineValue; use eZ\Publish\Core\FieldType\Value; use eZ\Publish\Core\Repository\Values\Content\Content; use eZ\Publish\Core\Repository\Values\Content\ContentCreateStruct; use eZ\Publish\Core\Repository\Values\Content\ContentUpdateStruct; use eZ\Publish\Core\Repository\Values\Content\VersionInfo; -use EzSystems\PlatformHttpCacheBundle\ResponseTagger\ResponseTagger; +use Ibexa\Contracts\HttpCache\ResponseTagger\ResponseTagger; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; diff --git a/tests/FieldHelper/RichtextFieldHelperTest.php b/tests/FieldHelper/RichtextFieldHelperTest.php index d4055b0..d959308 100644 --- a/tests/FieldHelper/RichtextFieldHelperTest.php +++ b/tests/FieldHelper/RichtextFieldHelperTest.php @@ -10,8 +10,8 @@ use eZ\Publish\Core\Helper\FieldHelper; use eZ\Publish\Core\Repository\Values\Content\Content; use eZ\Publish\Core\Repository\Values\Content\ContentUpdateStruct; -use EzSystems\EzPlatformRichText\eZ\FieldType\RichText\Value as RichTextValue; -use EzSystems\EzPlatformRichText\eZ\RichText\Converter; +use Ibexa\FieldTypeRichText\FieldType\RichText\Value as RichTextValue; +use Ibexa\Contracts\FieldTypeRichText\RichText\Converter; use PHPUnit\Framework\TestCase; /**