diff --git a/composer.json b/composer.json index aa7b263d..411d7355 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "ext-pdo": "*", "ext-xsl": "*", "ibexa/content-forms": "~5.0.x-dev", - "ibexa/core": "~5.0.x-dev", + "ibexa/core": "dev-ibx-8534-core-v5-p1 as 5.0.x-dev", "ibexa/http-cache": "~5.0.x-dev", "ibexa/rest": "~5.0.x-dev", "symfony/asset": "^5.1", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 8c06c165..0d05fb20 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -415,11 +415,6 @@ parameters: count: 1 path: src/lib/FieldType/RichText/RichTextStorage.php - - - message: "#^Method Ibexa\\\\FieldTypeRichText\\\\FieldType\\\\RichText\\\\RichTextStorage\\:\\:deleteFieldData\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/FieldType/RichText/RichTextStorage.php - - message: "#^Method Ibexa\\\\FieldTypeRichText\\\\FieldType\\\\RichText\\\\RichTextStorage\\:\\:deleteFieldData\\(\\) has parameter \\$fieldIds with no value type specified in iterable type array\\.$#" count: 1 @@ -435,26 +430,6 @@ parameters: count: 1 path: src/lib/FieldType/RichText/RichTextStorage.php - - - message: "#^Method Ibexa\\\\FieldTypeRichText\\\\FieldType\\\\RichText\\\\RichTextStorage\\:\\:getFieldData\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/FieldType/RichText/RichTextStorage.php - - - - message: "#^Method Ibexa\\\\FieldTypeRichText\\\\FieldType\\\\RichText\\\\RichTextStorage\\:\\:getIndexData\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/FieldType/RichText/RichTextStorage.php - - - - message: "#^Method Ibexa\\\\FieldTypeRichText\\\\FieldType\\\\RichText\\\\RichTextStorage\\:\\:getIndexData\\(\\) should return array\\ but return statement is missing\\.$#" - count: 1 - path: src/lib/FieldType/RichText/RichTextStorage.php - - - - message: "#^Method Ibexa\\\\FieldTypeRichText\\\\FieldType\\\\RichText\\\\RichTextStorage\\:\\:storeFieldData\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/FieldType/RichText/RichTextStorage.php - - message: "#^Offset 1 does not exist on array\\{0\\?\\: string, 1\\?\\: ''\\|'ezremote\\://', 2\\?\\: string, 3\\?\\: string\\}\\.$#" count: 1 @@ -1705,11 +1680,6 @@ parameters: count: 1 path: tests/lib/FieldType/RichText/Gateway/DoctrineStorageTest.php - - - message: "#^Method Ibexa\\\\Tests\\\\FieldTypeRichText\\\\FieldType\\\\RichText\\\\RichTextStorageTest\\:\\:getContext\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: tests/lib/FieldType/RichText/RichTextStorageTest.php - - message: "#^Method Ibexa\\\\Tests\\\\FieldTypeRichText\\\\FieldType\\\\RichText\\\\RichTextStorageTest\\:\\:groupLinksData\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 diff --git a/src/lib/FieldType/RichText/RichTextStorage.php b/src/lib/FieldType/RichText/RichTextStorage.php index 9d6cc50a..d44c3e25 100644 --- a/src/lib/FieldType/RichText/RichTextStorage.php +++ b/src/lib/FieldType/RichText/RichTextStorage.php @@ -42,7 +42,7 @@ public function __construct(StorageGateway $gateway, LoggerInterface $logger = n /** * @see \Ibexa\Contracts\Core\FieldType\FieldStorage */ - public function storeFieldData(VersionInfo $versionInfo, Field $field, array $context) + public function storeFieldData(VersionInfo $versionInfo, Field $field) { $document = new DOMDocument(); $document->loadXML($field->value->data); @@ -128,12 +128,8 @@ public function storeFieldData(VersionInfo $versionInfo, Field $field, array $co /** * Modifies $field if needed, using external data (like for Urls). - * - * @param \Ibexa\Contracts\Core\Persistence\Content\VersionInfo $versionInfo - * @param \Ibexa\Contracts\Core\Persistence\Content\Field $field - * @param array $context */ - public function getFieldData(VersionInfo $versionInfo, Field $field, array $context) + public function getFieldData(VersionInfo $versionInfo, Field $field) { $document = new DOMDocument(); $document->loadXML($field->value->data); @@ -186,7 +182,7 @@ public function getFieldData(VersionInfo $versionInfo, Field $field, array $cont $field->value->data = $document->saveXML(); } - public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds, array $context) + public function deleteFieldData(VersionInfo $versionInfo, array $fieldIds) { foreach ($fieldIds as $fieldId) { $this->gateway->unlinkUrl($fieldId, $versionInfo->versionNo); @@ -202,8 +198,4 @@ public function hasFieldData() { return true; } - - public function getIndexData(VersionInfo $versionInfo, Field $field, array $context) - { - } } diff --git a/tests/lib/FieldType/RichText/RichTextStorageTest.php b/tests/lib/FieldType/RichText/RichTextStorageTest.php index d157ed0d..04896fa7 100644 --- a/tests/lib/FieldType/RichText/RichTextStorageTest.php +++ b/tests/lib/FieldType/RichText/RichTextStorageTest.php @@ -95,8 +95,7 @@ public function testGetFieldData($xmlString, $updatedXmlString, $linkIds, $linkU $storage = $this->getPartlyMockedStorage($gateway); $storage->getFieldData( $versionInfo, - $field, - $this->getContext() + $field ); self::assertEquals( @@ -238,8 +237,7 @@ public function testStoreFieldData( $storage = $this->getPartlyMockedStorage($gateway); $result = $storage->storeFieldData( $versionInfo, - $field, - $this->getContext() + $field ); self::assertEquals( @@ -345,8 +343,7 @@ public function testStoreFieldDataThrowsNotFoundException( $storage = $this->getPartlyMockedStorage($gateway); $storage->storeFieldData( $versionInfo, - $field, - $this->getContext() + $field ); } @@ -366,8 +363,7 @@ public function testDeleteFieldData(): void $storage->deleteFieldData( $versionInfo, - $fieldIds, - $this->getContext() + $fieldIds ); } @@ -389,14 +385,6 @@ protected function getPartlyMockedStorage(StorageGateway $gateway) ->getMock(); } - /** - * @return array - */ - protected function getContext() - { - return ['context']; - } - /** * @var \Psr\Log\LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */