diff --git a/.circleci/config.yml b/.circleci/config.yml index 236c6a9..23d3783 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,7 +58,7 @@ jobs: sleep 1 done echo Failed waiting for MySQL && exit 1 - - run: 'vendor/bin/phpunit --testsuite integration' + - run: 'php -d memory_limit=512M vendor/bin/phpunit --testsuite integration' - store_test_results: path: 'build' - codecov/upload: diff --git a/composer.json b/composer.json index 898263c..19fd7f1 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ }, "require": { "php": ">=8.1", - "ibexa/oss": "^4.5", + "ibexa/oss": "^4.0", "ext-dom": "*" }, "require-dev": { diff --git a/docs/testing.md b/docs/testing.md index ab07339..2894550 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -13,7 +13,7 @@ vendor/bin/psalm To run integration tests, you need to spin up a database first. To ease this, you can use the docker-compose setup provided ```bash docker-compose up -d -docker-compose run php bash +docker-compose run php sh vendor/bin/phpunit --testsuite integration ``` diff --git a/src/Data/Image.php b/src/Data/Image.php index 16c6631..0c51daa 100644 --- a/src/Data/Image.php +++ b/src/Data/Image.php @@ -4,9 +4,9 @@ namespace Elbformat\FieldHelperBundle\Data; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\API\Repository\Values\Content\VersionInfo; -use eZ\Publish\SPI\Variation\VariationHandler; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; +use Ibexa\Contracts\Core\Variation\VariationHandler; class Image { diff --git a/src/Data/ImageFormatsProxy.php b/src/Data/ImageFormatsProxy.php index 7d82372..a6028d1 100644 --- a/src/Data/ImageFormatsProxy.php +++ b/src/Data/ImageFormatsProxy.php @@ -5,10 +5,10 @@ namespace Elbformat\FieldHelperBundle\Data; use ArrayAccess; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\API\Repository\Values\Content\VersionInfo; -use eZ\Publish\Core\FieldType\Image\Value; -use eZ\Publish\SPI\Variation\VariationHandler; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo; +use Ibexa\Core\FieldType\Image\Value; +use Ibexa\Contracts\Core\Variation\VariationHandler; /** * This proxy makes sure, that image formats will only be generated as soon as they are needed in the template. diff --git a/src/Data/Url.php b/src/Data/Url.php index 1bab2e0..38e59f9 100644 --- a/src/Data/Url.php +++ b/src/Data/Url.php @@ -4,7 +4,7 @@ namespace Elbformat\FieldHelperBundle\Data; -use eZ\Publish\Core\FieldType\Url\Value; +use Ibexa\Core\FieldType\Url\Value; /** * @author Hannes Giesenow diff --git a/src/Exception/FieldNotFoundException.php b/src/Exception/FieldNotFoundException.php index 98685cc..8ff973f 100644 --- a/src/Exception/FieldNotFoundException.php +++ b/src/Exception/FieldNotFoundException.php @@ -4,7 +4,7 @@ namespace Elbformat\FieldHelperBundle\Exception; -use eZ\Publish\API\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; /** * Thrown, when a field by the given name was not found in this content object. diff --git a/src/FieldHelper/AbstractFieldHelper.php b/src/FieldHelper/AbstractFieldHelper.php index 4791e12..223d5f9 100644 --- a/src/FieldHelper/AbstractFieldHelper.php +++ b/src/FieldHelper/AbstractFieldHelper.php @@ -4,8 +4,8 @@ namespace Elbformat\FieldHelperBundle\FieldHelper; -use eZ\Publish\API\Repository\Values\Content\Content; -use eZ\Publish\API\Repository\Values\Content\Field; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; /** diff --git a/src/FieldHelper/AuthorFieldHelper.php b/src/FieldHelper/AuthorFieldHelper.php index 76216f7..bcaaded 100644 --- a/src/FieldHelper/AuthorFieldHelper.php +++ b/src/FieldHelper/AuthorFieldHelper.php @@ -5,10 +5,10 @@ namespace Elbformat\FieldHelperBundle\FieldHelper; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; -use eZ\Publish\API\Repository\Values\Content\Content; -use eZ\Publish\Core\FieldType\Author\Author; -use eZ\Publish\Core\FieldType\Author\AuthorCollection; -use eZ\Publish\Core\FieldType\Author\Value as AuthorValue; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Core\FieldType\Author\Author; +use Ibexa\Core\FieldType\Author\AuthorCollection; +use Ibexa\Core\FieldType\Author\Value as AuthorValue; class AuthorFieldHelper extends AbstractFieldHelper { @@ -31,7 +31,6 @@ public function getNames(Content $content, string $fieldName): string $authors = $this->getValues($content, $fieldName); $names = []; - /** @var Author $author */ foreach ($authors as $author) { $names[] = $author->name; } diff --git a/src/FieldHelper/BoolFieldHelper.php b/src/FieldHelper/BoolFieldHelper.php index 20fab99..b974cb0 100644 --- a/src/FieldHelper/BoolFieldHelper.php +++ b/src/FieldHelper/BoolFieldHelper.php @@ -6,10 +6,10 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; -use eZ\Publish\API\Repository\Values\Content\Content; -use eZ\Publish\API\Repository\Values\Content\ContentStruct; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\FieldType\Checkbox\Value as CheckboxValue; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\ContentStruct; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\Checkbox\Value as CheckboxValue; /** * @author Hannes Giesenow diff --git a/src/FieldHelper/DateTimeFieldHelper.php b/src/FieldHelper/DateTimeFieldHelper.php index b6d4580..8287bca 100644 --- a/src/FieldHelper/DateTimeFieldHelper.php +++ b/src/FieldHelper/DateTimeFieldHelper.php @@ -9,12 +9,12 @@ use DateTimeInterface; use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; -use eZ\Publish\API\Repository\Values\Content\Content; -use eZ\Publish\API\Repository\Values\Content\ContentStruct; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\FieldType\Date\Value as DateValue; -use eZ\Publish\Core\FieldType\DateAndTime\Value as DateTimeValue; -use eZ\Publish\Core\FieldType\Time\Value as TimeValue; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\ContentStruct; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\Date\Value as DateValue; +use Ibexa\Core\FieldType\DateAndTime\Value as DateTimeValue; +use Ibexa\Core\FieldType\Time\Value as TimeValue; /** * @author Hannes Giesenow diff --git a/src/FieldHelper/FileFieldHelper.php b/src/FieldHelper/FileFieldHelper.php index a8ddd7d..4282d6c 100644 --- a/src/FieldHelper/FileFieldHelper.php +++ b/src/FieldHelper/FileFieldHelper.php @@ -6,9 +6,9 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; -use eZ\Publish\API\Repository\Values\Content\Content; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\FieldType\BinaryFile\Value as BinaryValue; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\BinaryFile\Value as BinaryValue; class FileFieldHelper extends AbstractFieldHelper { diff --git a/src/FieldHelper/ImageFieldHelper.php b/src/FieldHelper/ImageFieldHelper.php index 7700727..8681688 100644 --- a/src/FieldHelper/ImageFieldHelper.php +++ b/src/FieldHelper/ImageFieldHelper.php @@ -6,16 +6,16 @@ use Elbformat\FieldHelperBundle\Data\Image; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; -use eZ\Publish\API\Repository\Exceptions\NotFoundException; -use eZ\Publish\API\Repository\Repository; -use eZ\Publish\API\Repository\Values\Content\Content; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\FieldType\RelationList\Value as RelationValue; -use eZ\Publish\Core\MVC\ConfigResolverInterface; +use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; +use Ibexa\Contracts\Core\Repository\Repository; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\RelationList\Value as RelationValue; +use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; use Ibexa\Contracts\Core\Variation\VariationHandler; use Ibexa\Contracts\HttpCache\ResponseTagger\ResponseTagger; -use eZ\Publish\Core\FieldType\Image\Value as ImageValue; -use eZ\Publish\Core\FieldType\ImageAsset\Value as ImageAssetValue; +use Ibexa\Core\FieldType\Image\Value as ImageValue; +use Ibexa\Core\FieldType\ImageAsset\Value as ImageAssetValue; /** * Create an image object from Image content object, or a filed with a relation diff --git a/src/FieldHelper/NetgenTagsFieldHelper.php b/src/FieldHelper/NetgenTagsFieldHelper.php index 30ebac5..3f5c188 100644 --- a/src/FieldHelper/NetgenTagsFieldHelper.php +++ b/src/FieldHelper/NetgenTagsFieldHelper.php @@ -6,8 +6,8 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; -use eZ\Publish\API\Repository\Values\Content\Content; -use eZ\Publish\API\Repository\Values\Content\Field; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; use Netgen\TagsBundle\API\Repository\TagsService; use Netgen\TagsBundle\API\Repository\Values\Tags\Tag; use Netgen\TagsBundle\Core\FieldType\Tags\Value as NetgenTagsValue; diff --git a/src/FieldHelper/NumberFieldHelper.php b/src/FieldHelper/NumberFieldHelper.php index a5ee803..db5cc5f 100644 --- a/src/FieldHelper/NumberFieldHelper.php +++ b/src/FieldHelper/NumberFieldHelper.php @@ -6,11 +6,11 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; -use eZ\Publish\API\Repository\Values\Content\Content; -use eZ\Publish\API\Repository\Values\Content\ContentStruct; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\FieldType\Float\Value as FloatValue; -use eZ\Publish\Core\FieldType\Integer\Value as IntValue; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\ContentStruct; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\Float\Value as FloatValue; +use Ibexa\Core\FieldType\Integer\Value as IntValue; /** * Helps reading, updating and comparing numeric field types. diff --git a/src/FieldHelper/RelationFieldHelper.php b/src/FieldHelper/RelationFieldHelper.php index 90f9038..aa35e4c 100644 --- a/src/FieldHelper/RelationFieldHelper.php +++ b/src/FieldHelper/RelationFieldHelper.php @@ -6,11 +6,11 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; -use eZ\Publish\API\Repository\Repository; -use eZ\Publish\API\Repository\Values\Content\Content; -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 Ibexa\Contracts\Core\Repository\Repository; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\ContentStruct; +use Ibexa\Core\FieldType\Relation\Value as RelationValue; +use Ibexa\Core\FieldType\RelationList\Value as RelationListValue; use Ibexa\Contracts\HttpCache\ResponseTagger\ResponseTagger; use Psr\Log\LoggerInterface; diff --git a/src/FieldHelper/RichtextFieldHelper.php b/src/FieldHelper/RichtextFieldHelper.php index d5f63f1..3cfdb9b 100644 --- a/src/FieldHelper/RichtextFieldHelper.php +++ b/src/FieldHelper/RichtextFieldHelper.php @@ -5,12 +5,12 @@ namespace Elbformat\FieldHelperBundle\FieldHelper; use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; -use eZ\Publish\API\Repository\Values\Content\Content; -use eZ\Publish\API\Repository\Values\Content\ContentStruct; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\Helper\FieldHelper; -use EzSystems\EzPlatformRichText\eZ\FieldType\RichText\Value; -use EzSystems\EzPlatformRichText\eZ\RichText\Converter as RichtextConverter; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\ContentStruct; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\Helper\FieldHelper; +use Ibexa\FieldTypeRichText\FieldType\RichText\Value; +use Ibexa\Contracts\FieldTypeRichText\RichText\Converter as RichtextConverter; /** * Helps reading, updating and comparing richtext field types. diff --git a/src/FieldHelper/SelectionFieldHelper.php b/src/FieldHelper/SelectionFieldHelper.php index e142077..af3081e 100644 --- a/src/FieldHelper/SelectionFieldHelper.php +++ b/src/FieldHelper/SelectionFieldHelper.php @@ -6,8 +6,8 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; -use eZ\Publish\API\Repository\Values\Content\Content; -use eZ\Publish\Core\FieldType\Selection\Value as SelectionValue; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Core\FieldType\Selection\Value as SelectionValue; class SelectionFieldHelper extends AbstractFieldHelper { diff --git a/src/FieldHelper/TextFieldHelper.php b/src/FieldHelper/TextFieldHelper.php index 0815d36..f49d9db 100644 --- a/src/FieldHelper/TextFieldHelper.php +++ b/src/FieldHelper/TextFieldHelper.php @@ -6,12 +6,12 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; -use eZ\Publish\API\Repository\Values\Content\Content; -use eZ\Publish\API\Repository\Values\Content\ContentStruct; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\FieldType\EmailAddress\Value as MailValue; -use eZ\Publish\Core\FieldType\TextBlock\Value as TextBlockValue; -use eZ\Publish\Core\FieldType\TextLine\Value as TextLineValue; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\ContentStruct; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\EmailAddress\Value as MailValue; +use Ibexa\Core\FieldType\TextBlock\Value as TextBlockValue; +use Ibexa\Core\FieldType\TextLine\Value as TextLineValue; /** * Handles ezstring,eztext and ezemail diff --git a/src/FieldHelper/UrlFieldHelper.php b/src/FieldHelper/UrlFieldHelper.php index 7658ef9..449ab7f 100644 --- a/src/FieldHelper/UrlFieldHelper.php +++ b/src/FieldHelper/UrlFieldHelper.php @@ -7,10 +7,10 @@ use Elbformat\FieldHelperBundle\Data\Url; use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; -use eZ\Publish\API\Repository\Values\Content\Content; -use eZ\Publish\API\Repository\Values\Content\ContentStruct; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\FieldType\Url\Value as UrlValue; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\ContentStruct; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\Url\Value as UrlValue; /** * @author Hannes Giesenow diff --git a/tests/FieldHelper/AuthorFieldHelperTest.php b/tests/FieldHelper/AuthorFieldHelperTest.php index 7eafe23..379d3ce 100644 --- a/tests/FieldHelper/AuthorFieldHelperTest.php +++ b/tests/FieldHelper/AuthorFieldHelperTest.php @@ -7,11 +7,11 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; use Elbformat\FieldHelperBundle\FieldHelper\AuthorFieldHelper; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\FieldType\Author\Author; -use eZ\Publish\Core\FieldType\Author\Value; -use eZ\Publish\Core\FieldType\Float\Value as FloatValue; -use eZ\Publish\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\Author\Author; +use Ibexa\Core\FieldType\Author\Value; +use Ibexa\Core\FieldType\Float\Value as FloatValue; +use Ibexa\Core\Repository\Values\Content\Content; use PHPUnit\Framework\TestCase; /** diff --git a/tests/FieldHelper/BoolFieldHelperTest.php b/tests/FieldHelper/BoolFieldHelperTest.php index 51709e8..2d12aff 100644 --- a/tests/FieldHelper/BoolFieldHelperTest.php +++ b/tests/FieldHelper/BoolFieldHelperTest.php @@ -7,12 +7,12 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; use Elbformat\FieldHelperBundle\FieldHelper\BoolFieldHelper; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\FieldType\Checkbox\Value as CheckboxValue; -use eZ\Publish\Core\FieldType\Float\Value as FloatValue; -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 Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\Checkbox\Value as CheckboxValue; +use Ibexa\Core\FieldType\Float\Value as FloatValue; +use Ibexa\Core\Repository\Values\Content\Content; +use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; +use Ibexa\Core\Repository\Values\Content\ContentUpdateStruct; use PHPUnit\Framework\TestCase; /** diff --git a/tests/FieldHelper/DateTimeFieldHelperTest.php b/tests/FieldHelper/DateTimeFieldHelperTest.php index 5f1ae4a..80bc19c 100644 --- a/tests/FieldHelper/DateTimeFieldHelperTest.php +++ b/tests/FieldHelper/DateTimeFieldHelperTest.php @@ -7,15 +7,15 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; use Elbformat\FieldHelperBundle\FieldHelper\DateTimeFieldHelper; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\FieldType\Date\Value as DateValue; -use eZ\Publish\Core\FieldType\DateAndTime\Value as DateTimeValue; -use eZ\Publish\Core\FieldType\Float\Value as FloatValue; -use eZ\Publish\Core\FieldType\Time\Value as TimeValue; -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 Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\Date\Value as DateValue; +use Ibexa\Core\FieldType\DateAndTime\Value as DateTimeValue; +use Ibexa\Core\FieldType\Float\Value as FloatValue; +use Ibexa\Core\FieldType\Time\Value as TimeValue; +use Ibexa\Core\FieldType\Value; +use Ibexa\Core\Repository\Values\Content\Content; +use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; +use Ibexa\Core\Repository\Values\Content\ContentUpdateStruct; use PHPUnit\Framework\TestCase; /** diff --git a/tests/FieldHelper/FileFieldHelperTest.php b/tests/FieldHelper/FileFieldHelperTest.php index 70335aa..1f390a3 100644 --- a/tests/FieldHelper/FileFieldHelperTest.php +++ b/tests/FieldHelper/FileFieldHelperTest.php @@ -7,10 +7,10 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; use Elbformat\FieldHelperBundle\FieldHelper\FileFieldHelper; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\FieldType\BinaryFile\Value; -use eZ\Publish\Core\FieldType\Float\Value as FloatValue; -use eZ\Publish\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\BinaryFile\Value; +use Ibexa\Core\FieldType\Float\Value as FloatValue; +use Ibexa\Core\Repository\Values\Content\Content; use PHPUnit\Framework\TestCase; /** diff --git a/tests/FieldHelper/ImageFieldHelperTest.php b/tests/FieldHelper/ImageFieldHelperTest.php index ff6117e..821efbc 100644 --- a/tests/FieldHelper/ImageFieldHelperTest.php +++ b/tests/FieldHelper/ImageFieldHelperTest.php @@ -9,17 +9,17 @@ use Elbformat\FieldHelperBundle\FieldHelper\ImageFieldHelper; use Elbformat\FieldHelperBundle\FieldHelper\RelationFieldHelper; use Elbformat\FieldHelperBundle\FieldHelper\RichtextFieldHelper; -use eZ\Publish\API\Repository\ContentService; -use eZ\Publish\API\Repository\Repository; -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\Image\Value; +use Ibexa\Contracts\Core\Repository\ContentService; +use Ibexa\Contracts\Core\Repository\Repository; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\Base\Exceptions\NotFoundException; +use Ibexa\Core\FieldType\Float\Value as FloatValue; +use Ibexa\Core\FieldType\Image\Value; 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 Ibexa\Core\Repository\Values\Content\Content; +use Ibexa\Core\Repository\Values\Content\VersionInfo; +use Ibexa\Core\Repository\Values\ContentType\ContentType; +use Ibexa\Contracts\Core\Variation\VariationHandler; use Ibexa\Contracts\HttpCache\ResponseTagger\ResponseTagger; use PHPUnit\Framework\TestCase; @@ -66,7 +66,7 @@ public function testGetImageFromRelation(): void public function testGetImageFromRelationEmpty(): void { $this->fhRel->method('getOneContent')->willReturn(null); - $field = new Field(['value' => new \eZ\Publish\Core\FieldType\RelationList\Value(['destinationContentIds' => 1])]); + $field = new Field(['value' => new \Ibexa\Core\FieldType\RelationList\Value(['destinationContentIds' => 1])]); $content = $this->createMock(Content::class); $content->method('getField')->with('image_field')->willReturn($field); @@ -75,7 +75,7 @@ public function testGetImageFromRelationEmpty(): void public function testGetImageFromRelationNotFound(): void { $this->fhRel->method('getOneContent')->willThrowException(new NotFoundException('content', 1)); - $field = new Field(['value' => new \eZ\Publish\Core\FieldType\RelationList\Value(['destinationContentIds' => 1])]); + $field = new Field(['value' => new \Ibexa\Core\FieldType\RelationList\Value(['destinationContentIds' => 1])]); $content = $this->createMock(Content::class); $content->method('getField')->with('image_field')->willReturn($field); @@ -92,7 +92,7 @@ public function testGetImageFromImageAsset(): void public function testGetImageFromImageAssetEmpty(): void { - $field = new Field(['value' => new \eZ\Publish\Core\FieldType\ImageAsset\Value()]); + $field = new Field(['value' => new \Ibexa\Core\FieldType\ImageAsset\Value()]); $content = $this->createMock(Content::class); $content->method('getField')->with('image_field')->willReturn($field); $this->assertNull($this->fh->getImage($content, 'image_field')); @@ -134,7 +134,7 @@ protected function createContentFromRelation(?string $alt = null, ?string $capti { $image = $this->createContentFromImage($alt, $caption); $this->fhRel->method('getOneContent')->willReturn($image); - $field = new Field(['value' => new \eZ\Publish\Core\FieldType\RelationList\Value(['destinationContentIds' => 1])]); + $field = new Field(['value' => new \Ibexa\Core\FieldType\RelationList\Value(['destinationContentIds' => 1])]); $content = $this->createMock(Content::class); $content->method('getField')->with('image_field')->willReturn($field); @@ -144,7 +144,7 @@ protected function createContentFromRelation(?string $alt = null, ?string $capti protected function createContentFromAsset(?string $alt = null, ?string $caption = null): Content { $image = $this->createContentFromImage($alt, $caption); - $field = new Field(['value' => new \eZ\Publish\Core\FieldType\ImageAsset\Value(1, $alt)]); + $field = new Field(['value' => new \Ibexa\Core\FieldType\ImageAsset\Value(1, $alt)]); $content = $this->createMock(Content::class); $content->method('getField')->with('image_field')->willReturn($field); $contentSvc = $this->getMockBuilder(ContentService::class)->getMock(); diff --git a/tests/FieldHelper/NetgenTagsFieldHelperTest.php b/tests/FieldHelper/NetgenTagsFieldHelperTest.php index 6fba60c..bce39af 100644 --- a/tests/FieldHelper/NetgenTagsFieldHelperTest.php +++ b/tests/FieldHelper/NetgenTagsFieldHelperTest.php @@ -5,10 +5,10 @@ namespace Elbformat\FieldHelperBundle\Tests\FieldHelper; use Elbformat\FieldHelperBundle\FieldHelper\NetgenTagsFieldHelper; -use eZ\Publish\API\Repository\Values\Content\Field; -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 Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\Repository\Values\Content\Content; +use Ibexa\Core\Repository\Values\Content\VersionInfo; +use Ibexa\Core\Repository\Values\ContentType\ContentType; use Netgen\TagsBundle\API\Repository\TagsService; use Netgen\TagsBundle\API\Repository\Values\Tags\Tag; use Netgen\TagsBundle\Core\FieldType\Tags\Value; diff --git a/tests/FieldHelper/NumberFieldHelperTest.php b/tests/FieldHelper/NumberFieldHelperTest.php index a30f683..e221a0f 100644 --- a/tests/FieldHelper/NumberFieldHelperTest.php +++ b/tests/FieldHelper/NumberFieldHelperTest.php @@ -7,14 +7,14 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; use Elbformat\FieldHelperBundle\FieldHelper\NumberFieldHelper; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\FieldType\Float\Value as FloatValue; -use eZ\Publish\Core\FieldType\Integer\Value as IntValue; -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 Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\Float\Value as FloatValue; +use Ibexa\Core\FieldType\Integer\Value as IntValue; +use Ibexa\Core\FieldType\TextLine\Value as TextLineValue; +use Ibexa\Core\FieldType\Value; +use Ibexa\Core\Repository\Values\Content\Content; +use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; +use Ibexa\Core\Repository\Values\Content\ContentUpdateStruct; use PHPUnit\Framework\TestCase; /** diff --git a/tests/FieldHelper/RelationFieldHelperTest.php b/tests/FieldHelper/RelationFieldHelperTest.php index b57999c..2ec1a46 100644 --- a/tests/FieldHelper/RelationFieldHelperTest.php +++ b/tests/FieldHelper/RelationFieldHelperTest.php @@ -7,19 +7,19 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; use Elbformat\FieldHelperBundle\FieldHelper\RelationFieldHelper; -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\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 Ibexa\Contracts\Core\Repository\ContentService; +use Ibexa\Contracts\Core\Repository\Repository; +use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\Base\Exceptions\NotFoundException; +use Ibexa\Core\FieldType\Float\Value as FloatValue; +use Ibexa\Core\FieldType\Relation\Value as RelationValue; +use Ibexa\Core\FieldType\RelationList\Value as RelationListValue; +use Ibexa\Core\FieldType\Value; +use Ibexa\Core\Repository\Values\Content\Content; +use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; +use Ibexa\Core\Repository\Values\Content\ContentUpdateStruct; +use Ibexa\Core\Repository\Values\Content\VersionInfo; 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 d959308..450833b 100644 --- a/tests/FieldHelper/RichtextFieldHelperTest.php +++ b/tests/FieldHelper/RichtextFieldHelperTest.php @@ -5,11 +5,11 @@ namespace Elbformat\FieldHelperBundle\Tests\FieldHelper; use Elbformat\FieldHelperBundle\FieldHelper\RichtextFieldHelper; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\FieldType\Value; -use eZ\Publish\Core\Helper\FieldHelper; -use eZ\Publish\Core\Repository\Values\Content\Content; -use eZ\Publish\Core\Repository\Values\Content\ContentUpdateStruct; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\Value; +use Ibexa\Core\Helper\FieldHelper; +use Ibexa\Core\Repository\Values\Content\Content; +use Ibexa\Core\Repository\Values\Content\ContentUpdateStruct; use Ibexa\FieldTypeRichText\FieldType\RichText\Value as RichTextValue; use Ibexa\Contracts\FieldTypeRichText\RichText\Converter; use PHPUnit\Framework\TestCase; diff --git a/tests/FieldHelper/SelectionFieldHelperTest.php b/tests/FieldHelper/SelectionFieldHelperTest.php index 39a08af..8975e7f 100644 --- a/tests/FieldHelper/SelectionFieldHelperTest.php +++ b/tests/FieldHelper/SelectionFieldHelperTest.php @@ -7,12 +7,12 @@ use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; use Elbformat\FieldHelperBundle\FieldHelper\FileFieldHelper; use Elbformat\FieldHelperBundle\FieldHelper\SelectionFieldHelper; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\API\Repository\Values\ContentType\ContentType; -use eZ\Publish\API\Repository\Values\ContentType\FieldDefinition; -use eZ\Publish\Core\FieldType\Float\Value as FloatValue; -use eZ\Publish\Core\FieldType\Selection\Value; -use eZ\Publish\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; +use Ibexa\Contracts\Core\Repository\Values\ContentType\FieldDefinition; +use Ibexa\Core\FieldType\Float\Value as FloatValue; +use Ibexa\Core\FieldType\Selection\Value; +use Ibexa\Core\Repository\Values\Content\Content; use PHPUnit\Framework\TestCase; class SelectionFieldHelperTest extends TestCase diff --git a/tests/FieldHelper/TextFieldHelperTest.php b/tests/FieldHelper/TextFieldHelperTest.php index cf9265e..817445c 100644 --- a/tests/FieldHelper/TextFieldHelperTest.php +++ b/tests/FieldHelper/TextFieldHelperTest.php @@ -7,15 +7,15 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; use Elbformat\FieldHelperBundle\FieldHelper\TextFieldHelper; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\FieldType\EmailAddress\Value as EmailAddressValue; -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 Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\EmailAddress\Value as EmailAddressValue; +use Ibexa\Core\FieldType\Float\Value as FloatValue; +use Ibexa\Core\FieldType\TextBlock\Value as TextBlockValue; +use Ibexa\Core\FieldType\TextLine\Value as TextLineValue; +use Ibexa\Core\FieldType\Value; +use Ibexa\Core\Repository\Values\Content\Content; +use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; +use Ibexa\Core\Repository\Values\Content\ContentUpdateStruct; use PHPUnit\Framework\TestCase; /** diff --git a/tests/FieldHelper/UrlFieldHelperTest.php b/tests/FieldHelper/UrlFieldHelperTest.php index 33c8ef8..68dc877 100644 --- a/tests/FieldHelper/UrlFieldHelperTest.php +++ b/tests/FieldHelper/UrlFieldHelperTest.php @@ -7,15 +7,15 @@ use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException; use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException; use Elbformat\FieldHelperBundle\FieldHelper\UrlFieldHelper; -use eZ\Publish\API\Repository\Values\Content\Field; -use eZ\Publish\Core\FieldType\Url\Value as UrlValue; -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 Ibexa\Contracts\Core\Repository\Values\Content\Field; +use Ibexa\Core\FieldType\Url\Value as UrlValue; +use Ibexa\Core\FieldType\Float\Value as FloatValue; +use Ibexa\Core\FieldType\TextBlock\Value as TextBlockValue; +use Ibexa\Core\FieldType\TextLine\Value as TextLineValue; +use Ibexa\Core\FieldType\Value; +use Ibexa\Core\Repository\Values\Content\Content; +use Ibexa\Core\Repository\Values\Content\ContentCreateStruct; +use Ibexa\Core\Repository\Values\Content\ContentUpdateStruct; use PHPUnit\Framework\TestCase; /** diff --git a/tests/Integration/ReadWriteContentTest.php b/tests/Integration/ReadWriteContentTest.php index e68230b..9656c5c 100644 --- a/tests/Integration/ReadWriteContentTest.php +++ b/tests/Integration/ReadWriteContentTest.php @@ -6,14 +6,14 @@ use Doctrine\DBAL\Connection; use Elbformat\FieldHelperBundle\Registry\RegistryInterface; -use eZ\Publish\API\Repository\ContentService; -use eZ\Publish\API\Repository\Repository; -use eZ\Publish\API\Repository\Values\Content\Content; -use eZ\Publish\API\Repository\Values\Content\ContentCreateStruct; -use eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct; -use eZ\Publish\API\Repository\Values\ContentType\ContentType; -use eZ\Publish\API\Repository\Values\ContentType\ContentTypeCreateStruct; -use EzSystems\DoctrineSchema\API\Builder\SchemaBuilder; +use Ibexa\Contracts\Core\Repository\ContentService; +use Ibexa\Contracts\Core\Repository\Repository; +use Ibexa\Contracts\Core\Repository\Values\Content\Content; +use Ibexa\Contracts\Core\Repository\Values\Content\ContentCreateStruct; +use Ibexa\Contracts\Core\Repository\Values\Content\ContentUpdateStruct; +use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentType; +use Ibexa\Contracts\Core\Repository\Values\ContentType\ContentTypeCreateStruct; +use Ibexa\DoctrineSchema\Builder\SchemaBuilder; /** * @author Hannes Giesenow @@ -28,7 +28,7 @@ class ReadWriteContentTest extends KernelTestCase public function setUp(): void { parent::setUp(); - $this->repo = $this->containerInstance->get('ezpublish.api.repository'); + $this->repo = $this->containerInstance->get('ibexa.api.repository'); $this->fhReg = $this->containerInstance->get(RegistryInterface::class); $this->contentService = $this->repo->getContentService(); // Create database structure and content-type only once @@ -283,7 +283,7 @@ public function testUrl(): void protected function createContentType(): ContentType { // Create content-type with one of each kind - $repo = $this->containerInstance->get('ezpublish.api.repository'); + $repo = $this->containerInstance->get('ibexa.api.repository'); $ctStruct = $repo->getContentTypeService()->newContentTypeCreateStruct('test'); $ctStruct->mainLanguageCode = 'eng-GB'; $ctStruct->names = ['eng-GB' => 'Test']; @@ -359,7 +359,7 @@ protected function initDatabase() } // Fill up with initial data - $queries = array_filter(preg_split('(;\\s*$)m', file_get_contents(__DIR__ . '/../../vendor/ezsystems/ezplatform-kernel/data/mysql/cleandata.sql'))); + $queries = array_filter(preg_split('(;\\s*$)m', file_get_contents(__DIR__ . '/../../vendor/ibexa/core/data/mysql/cleandata.sql'))); foreach ($queries as $query) { $db->exec(str_replace('\"', '"', $query)); } diff --git a/tests/Integration/RegistryConsumer.php b/tests/Integration/RegistryConsumer.php index 6ba2f76..17a46b3 100644 --- a/tests/Integration/RegistryConsumer.php +++ b/tests/Integration/RegistryConsumer.php @@ -5,7 +5,7 @@ namespace Elbformat\FieldHelperBundle\Tests\Integration; use Elbformat\FieldHelperBundle\Registry\RegistryInterface; -use EzSystems\DoctrineSchema\API\Builder\SchemaBuilder; +use Ibexa\DoctrineSchema\Builder\SchemaBuilder; /** * This services is needed for integration test, as the other unused services are removed otherwise. diff --git a/tests/Integration/TestKernel.php b/tests/Integration/TestKernel.php index c2d068d..50cf906 100644 --- a/tests/Integration/TestKernel.php +++ b/tests/Integration/TestKernel.php @@ -6,12 +6,12 @@ use Doctrine\Bundle\DoctrineBundle\DoctrineBundle; use Elbformat\FieldHelperBundle\ElbformatFieldHelperBundle; -use eZ\Bundle\EzPublishCoreBundle\EzPublishCoreBundle; -use eZ\Bundle\EzPublishLegacySearchEngineBundle\EzPublishLegacySearchEngineBundle; -use EzSystems\DoctrineSchemaBundle\DoctrineSchemaBundle; -use EzSystems\EzPlatformRichTextBundle\EzPlatformRichTextBundle; -use EzSystems\PlatformHttpCacheBundle\EzSystemsPlatformHttpCacheBundle; -use EzSystems\PlatformInstallerBundle\EzSystemsPlatformInstallerBundle; +use Ibexa\Bundle\Core\IbexaCoreBundle; +use Ibexa\Bundle\LegacySearchEngine\IbexaLegacySearchEngineBundle; +use Ibexa\Bundle\DoctrineSchema\DoctrineSchemaBundle; +use Ibexa\Bundle\FieldTypeRichText\IbexaFieldTypeRichTextBundle; +use Ibexa\Bundle\HttpCache\IbexaHttpCacheBundle; +use Ibexa\Bundle\RepositoryInstaller\IbexaRepositoryInstallerBundle; use FOS\HttpCacheBundle\FOSHttpCacheBundle; use FOS\JsRoutingBundle\FOSJsRoutingBundle; use Hautelook\TemplatedUriBundle\HautelookTemplatedUriBundle; @@ -44,15 +44,14 @@ public function registerBundles() new JMSTranslationBundle(), new LiipImagineBundle(), new FOSHttpCacheBundle(), - new EzPublishCoreBundle(), - new EzPublishLegacySearchEngineBundle(), -// new EzPublishIOBundle(), + new IbexaCoreBundle(), + new IbexaLegacySearchEngineBundle(), new DoctrineSchemaBundle(), - new EzSystemsPlatformHttpCacheBundle(), + new IbexaHttpCacheBundle(), new HautelookTemplatedUriBundle(), new ElbformatFieldHelperBundle(), - new EzSystemsPlatformInstallerBundle(), - new EzPlatformRichTextBundle(), + new IbexaRepositoryInstallerBundle(), + new IbexaFieldTypeRichTextBundle(), ]; } diff --git a/tests/Integration/TestTagsKernel.php b/tests/Integration/TestTagsKernel.php index cd9a245..5fd542d 100644 --- a/tests/Integration/TestTagsKernel.php +++ b/tests/Integration/TestTagsKernel.php @@ -4,8 +4,8 @@ namespace Elbformat\FieldHelperBundle\Tests\Integration; -use EzSystems\EzPlatformAdminUiBundle\EzPlatformAdminUiBundle; -use EzSystems\EzPlatformRestBundle\EzPlatformRestBundle; +use Ibexa\Bundle\AdminUi\IbexaAdminUiBundle; +use Ibexa\Bundle\Rest\IbexaRestBundle; use Lolautruche\EzCoreExtraBundle\EzCoreExtraBundle; use Netgen\TagsBundle\NetgenTagsBundle; diff --git a/tests/Integration/config_test.yml b/tests/Integration/config_test.yml index 7b59e75..6fd6f52 100644 --- a/tests/Integration/config_test.yml +++ b/tests/Integration/config_test.yml @@ -9,7 +9,7 @@ services: logger: class: Psr\Log\NullLogger -ezpublish: +ibexa: siteaccess: list: [default] default_siteaccess: default