Skip to content

Commit 5efc56e

Browse files
authored
Merge pull request #38 from elbformat/ibexa-4-finalize
Finalize ibexa4 upgrade
2 parents cc960d0 + 90cfb72 commit 5efc56e

File tree

8 files changed

+18
-14
lines changed

8 files changed

+18
-14
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
"require": {
3333
"php": ">=8.1",
34-
"ibexa/oss": "^4.0",
34+
"ibexa/oss": "^4.6",
3535
"ext-dom": "*"
3636
},
3737
"require-dev": {

docs/changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## v2.0.1
4+
Minimum version is Ibexa 4.6.
5+
* Added Matrix field Helper
6+
7+
## v2.0.0
8+
Ibexa 4 support
9+
310
## v1.2.2
411
Added field helper for
512
* Matrix

docs/testing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
To run the steps from circle ci locally, you can use the same docker image
44
```bash
5-
docker-compose run php sh
5+
docker compose run php sh
66
composer install --dev
77
vendor/bin/phpunit --testsuite unit
88
vendor/bin/php-cs-fixer fix src
@@ -12,8 +12,8 @@ vendor/bin/psalm
1212

1313
To run integration tests, you need to spin up a database first. To ease this, you can use the docker-compose setup provided
1414
```bash
15-
docker-compose up -d
16-
docker-compose exec php sh
15+
docker compose up -d
16+
docker compose run php sh
1717
vendor/bin/phpunit --testsuite integration
1818
```
1919

src/FieldHelper/MatrixFieldHelper.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
use Elbformat\FieldHelperBundle\Exception\FieldNotFoundException;
88
use Elbformat\FieldHelperBundle\Exception\InvalidFieldTypeException;
9-
use eZ\Publish\API\Repository\Values\Content\Content;
10-
use eZ\Publish\API\Repository\Values\Content\ContentStruct;
11-
use EzSystems\EzPlatformMatrixFieldtype\FieldType\Value;
9+
use Ibexa\Contracts\Core\Repository\Values\Content\Content;
10+
use Ibexa\Contracts\Core\Repository\Values\Content\ContentStruct;
11+
use Ibexa\FieldTypeMatrix\FieldType\Value;
1212

1313
/**
1414
* @author Hannes Giesenow <hannes.giesenow@elbformat.de>
@@ -31,7 +31,6 @@ public function getArray(Content $content, string $fieldName): array
3131
{
3232
$rows = $this->getValue($content, $fieldName)->getRows();
3333
$result = [];
34-
/** @var Value\Row $row */
3534
foreach ($rows as $row) {
3635
/** @var string[] $cells */
3736
$cells = $row->getCells();
@@ -89,7 +88,6 @@ public function getKeyValue(Content $content, string $fieldName, ?string $key =
8988
}
9089

9190
$result = [];
92-
/** @var Value\Row $row */
9391
foreach ($rows as $row) {
9492
/** @var string[] $cells */
9593
$cells = $row->getCells();
@@ -112,7 +110,6 @@ public function getList(Content $content, string $fieldName, string $columnName
112110
}
113111
$rows = $this->getValue($content, $fieldName)->getRows();
114112
$result = [];
115-
/** @var Value\Row $row */
116113
foreach ($rows as $row) {
117114
$cells = $row->getCells();
118115
$result[] = (string) $cells[$columnName];

src/FieldHelper/NumberFieldHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
/**
1616
* Helps reading, updating and comparing numeric field types.
17-
* https://doc.ezplatform.com/en/latest/api/field_type_reference.
17+
* https://doc.ibexa.co/en/latest/content_management/field_types/field_type_reference/field_type_reference/
1818
*
1919
* @author Hannes Giesenow <hannes.giesenow@elbformat.de>
2020
*/

src/FieldHelper/RelationFieldHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ protected function getRelationIds(Content $content, string $fieldName): array
116116
foreach ($stringIds as $stringId) {
117117
$ids[] = (int) $stringId;
118118
}
119-
} elseif($field->value instanceof RelationValue) {
119+
} elseif ($field->value instanceof RelationValue) {
120120
$ids = $field->value->destinationContentId ? [(int)$field->value->destinationContentId] : [];
121121
} else {
122122
/** @psalm-suppress DeprecatedClass */

src/FieldHelper/RichtextFieldHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
/**
1616
* Helps reading, updating and comparing richtext field types.
17-
* https://doc.ezplatform.com/en/latest/api/field_type_reference.
17+
* https://doc.ibexa.co/en/latest/content_management/field_types/field_type_reference/field_type_reference/
1818
*
1919
* @author Ronny Gericke <ronny.gericke@elbformat.de>
2020
*/

tests/FieldHelper/NetgenTagsFieldHelperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function testGetFirstTag(): void
4747
protected function createContentFromTags(array $tags): Content
4848
{
4949
$tagObjs = [];
50-
foreach($tags as $tag) {
50+
foreach ($tags as $tag) {
5151
$tagObjs[] = new Tag(['keywords' => ['ger-DE' => $tag],'mainLanguageCode' => 'ger-DE']);
5252
}
5353
$field = new Field(['value' => new Value($tagObjs)]);

0 commit comments

Comments
 (0)