Skip to content

Commit 2a5a6a4

Browse files
committed
Merge branch '4.6' into main+4.6
# Conflicts: # phpstan-baseline.neon # src/contracts/Repository/LocationService.php # src/contracts/Repository/SearchService.php
2 parents 7c30793 + 1efa3ef commit 2a5a6a4

File tree

17 files changed

+276
-239
lines changed

17 files changed

+276
-239
lines changed

Diff for: phpstan-baseline.neon

+2-52
Original file line numberDiff line numberDiff line change
@@ -4360,11 +4360,6 @@ parameters:
43604360
count: 1
43614361
path: src/contracts/Limitation/Target/Builder/VersionBuilder.php
43624362

4363-
-
4364-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Target\\\\DestinationLocation\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#"
4365-
count: 1
4366-
path: src/contracts/Limitation/Target/DestinationLocation.php
4367-
43684363
-
43694364
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Type\\:\\:acceptValue\\(\\) has no return type specified\\.$#"
43704365
count: 1
@@ -4490,11 +4485,6 @@ parameters:
44904485
count: 1
44914486
path: src/contracts/Persistence/Content/Type.php
44924487

4493-
-
4494-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\Type\\\\FieldDefinition\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#"
4495-
count: 1
4496-
path: src/contracts/Persistence/Content/Type/FieldDefinition.php
4497-
44984488
-
44994489
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\Type\\\\Handler\\:\\:delete\\(\\) has no return type specified\\.$#"
45004490
count: 1
@@ -6350,21 +6340,11 @@ parameters:
63506340
count: 1
63516341
path: src/contracts/Repository/Values/Content/Search/Facet/UserFacet.php
63526342

6353-
-
6354-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Search\\\\SearchResult\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#"
6355-
count: 1
6356-
path: src/contracts/Repository/Values/Content/Search/SearchResult.php
6357-
63586343
-
63596344
message: "#^Class Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Trash\\\\SearchResult implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#"
63606345
count: 1
63616346
path: src/contracts/Repository/Values/Content/Trash/SearchResult.php
63626347

6363-
-
6364-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Trash\\\\SearchResult\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#"
6365-
count: 1
6366-
path: src/contracts/Repository/Values/Content/Trash/SearchResult.php
6367-
63686348
-
63696349
message: "#^Class Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Trash\\\\TrashItemDeleteResultList implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#"
63706350
count: 1
@@ -6480,26 +6460,11 @@ parameters:
64806460
count: 1
64816461
path: src/contracts/Repository/Values/UserPreference/UserPreferenceList.php
64826462

6483-
-
6484-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#"
6485-
count: 1
6486-
path: src/contracts/Repository/Values/ValueObject.php
6487-
64886463
-
64896464
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject\\:\\:attributes\\(\\) return type has no value type specified in iterable type array\\.$#"
64906465
count: 1
64916466
path: src/contracts/Repository/Values/ValueObject.php
64926467

6493-
-
6494-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject\\:\\:getProperties\\(\\) has parameter \\$dynamicProperties with no value type specified in iterable type array\\.$#"
6495-
count: 1
6496-
path: src/contracts/Repository/Values/ValueObject.php
6497-
6498-
-
6499-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject\\:\\:getProperties\\(\\) return type has no value type specified in iterable type array\\.$#"
6500-
count: 1
6501-
path: src/contracts/Repository/Values/ValueObject.php
6502-
65036468
-
65046469
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject\\:\\:__set\\(\\) expects string, null given\\.$#"
65056470
count: 1
@@ -17796,7 +17761,7 @@ parameters:
1779617761
path: src/lib/Repository/Mapper/RoleDomainMapper.php
1779717762

1779817763
-
17799-
message: "#^Parameter \\#1 \\$limitationValues of method Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Type\\:\\:buildValue\\(\\) expects array, array\\|null given\\.$#"
17764+
message: "#^Parameter \\#1 \\$limitationValues of method Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Type\\:\\:buildValue\\(\\) expects array\\<int, mixed\\>, array\\|null given\\.$#"
1780017765
count: 2
1780117766
path: src/lib/Repository/Mapper/RoleDomainMapper.php
1780217767

@@ -17956,7 +17921,7 @@ parameters:
1795617921
path: src/lib/Repository/Permission/PermissionResolver.php
1795717922

1795817923
-
17959-
message: "#^Parameter \\#1 \\$limitationValues of method Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Type\\:\\:buildValue\\(\\) expects array, array\\|null given\\.$#"
17924+
message: "#^Parameter \\#1 \\$limitationValues of method Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Type\\:\\:buildValue\\(\\) expects array\\<int, mixed\\>, array\\|null given\\.$#"
1796017925
count: 1
1796117926
path: src/lib/Repository/Permission/PermissionResolver.php
1796217927

@@ -18760,16 +18725,6 @@ parameters:
1876018725
count: 1
1876118726
path: src/lib/Repository/Values/Content/Content.php
1876218727

18763-
-
18764-
message: "#^Method Ibexa\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content\\:\\:getProperties\\(\\) has parameter \\$dynamicProperties with no value type specified in iterable type array\\.$#"
18765-
count: 1
18766-
path: src/lib/Repository/Values/Content/Content.php
18767-
18768-
-
18769-
message: "#^Method Ibexa\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content\\:\\:getProperties\\(\\) return type has no value type specified in iterable type array\\.$#"
18770-
count: 1
18771-
path: src/lib/Repository/Values/Content/Content.php
18772-
1877318728
-
1877418729
message: "#^Property Ibexa\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content\\:\\:\\$fieldDefinitionTranslationMap has unknown class eZ\\\\Publish\\\\API\\\\Repository\\\\Values\\\\Content\\\\Field as its type\\.$#"
1877518730
count: 1
@@ -34460,11 +34415,6 @@ parameters:
3446034415
count: 1
3446134416
path: tests/integration/Core/Repository/SearchServiceTest.php
3446234417

34463-
-
34464-
message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\SearchServiceTest\\:\\:testUserMetadataGroupHorizontalFilterContent\\(\\) has parameter \\$queryType with no type specified\\.$#"
34465-
count: 1
34466-
path: tests/integration/Core/Repository/SearchServiceTest.php
34467-
3446834418
-
3446934419
message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\SearchServiceTest\\:\\:testUserMetadataGroupHorizontalFilterLocation\\(\\) has no return type specified\\.$#"
3447034420
count: 1

Diff for: src/bundle/Core/Resources/config/default_settings.yml

+1
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ parameters:
180180
reference:
181181
reference: ~
182182
filters:
183+
auto_rotate: []
183184
geometry/scaledownonly: [600, 600]
184185
small:
185186
reference: reference

Diff for: src/contracts/FieldType/FieldType.php

+28-28
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,20 @@ abstract public function getSettingsSchema();
101101
* It is considered best practice to return a hash map, which contains
102102
* rudimentary settings structures, like e.g. for the "ezstring" FieldType
103103
*
104-
* <code>
105-
* array(
106-
* 'stringLength' => array(
107-
* 'minStringLength' => array(
108-
* 'type' => 'int',
109-
* 'default' => 0,
110-
* ),
111-
* 'maxStringLength' => array(
112-
* 'type' => 'int'
113-
* 'default' => null,
114-
* )
115-
* ),
116-
* );
117-
* </code>
104+
* ```
105+
* [
106+
* 'stringLength' => [
107+
* 'minStringLength' => [
108+
* 'type' => 'int',
109+
* 'default' => 0,
110+
* ],
111+
* 'maxStringLength' => [
112+
* 'type' => 'int'
113+
* 'default' => null,
114+
* ],
115+
* ],
116+
* ];
117+
* ```
118118
*
119119
* @return mixed
120120
*/
@@ -361,22 +361,22 @@ abstract public function fromPersistenceValue(FieldValue $fieldValue);
361361
*
362362
* @param \Ibexa\Contracts\Core\FieldType\Value $value
363363
*
364-
* @return array Hash with relation type as key and array of destination content ids as value.
364+
* @return array Hash with relation type as key and array of destination content IDs as value.
365365
*
366366
* Example:
367-
* <code>
368-
* array(
369-
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK => array(
370-
* "contentIds" => array( 12, 13, 14 ),
371-
* "locationIds" => array( 24 )
372-
* ),
373-
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED => array(
374-
* "contentIds" => array( 12 ),
375-
* "locationIds" => array( 24, 45 )
376-
* ),
377-
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD => array( 12 )
378-
* )
379-
* </code>
367+
* ```
368+
* [
369+
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK => [
370+
* 'contentIds' => [12, 13, 14],
371+
* 'locationIds' => [24]
372+
* ],
373+
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED => [
374+
* 'contentIds" => [12],
375+
* 'locationIds' => [24, 45]
376+
* ],
377+
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD => [12]
378+
* ]
379+
* ```
380380
*/
381381
abstract public function getRelations(Value $value);
382382
}

Diff for: src/contracts/FieldType/Generic/Type.php

+12-12
Original file line numberDiff line numberDiff line change
@@ -260,20 +260,20 @@ final public function acceptValue($inputValue): Value
260260
* If given $inputValue could not be converted or is already an instance of dedicate value object,
261261
* the method should simply return it.
262262
*
263-
* This is an operation method for {@see acceptValue()}.
263+
* This is an operation method for {@see Type::acceptValue()}.
264264
*
265265
* Example implementation:
266-
* <code>
267-
* protected function createValueFromInput( $inputValue )
266+
* ```
267+
* protected function createValueFromInput($inputValue)
268268
* {
269-
* if ( is_array( $inputValue ) )
269+
* if (is_array($inputValue))
270270
* {
271-
* $inputValue = \My\FieldType\CookieJar\Value( $inputValue );
271+
* $inputValue = \My\FieldType\CookieJar\Value($inputValue);
272272
* }
273273
*
274274
* return $inputValue;
275275
* }
276-
* </code>
276+
* ```
277277
*
278278
* @param mixed $inputValue
279279
*
@@ -304,23 +304,23 @@ protected function getValueClass(): string
304304
/**
305305
* Throws an exception if the given $value is not an instance of the supported value subtype.
306306
*
307-
* This is an operation method for {@see acceptValue()}.
307+
* This is an operation method for {@see Type::acceptValue()}.
308308
*
309309
* Default implementation expects the value class to reside in the same namespace as its
310310
* FieldType class and is named "Value".
311311
*
312312
* Example implementation:
313-
* <code>
313+
* ```
314314
* protected function checkValueType($value): void
315315
* {
316-
* if ( !$inputValue instanceof \My\FieldType\CookieJar\Value ) )
316+
* if (!$inputValue instanceof \My\FieldType\CookieJar\Value))
317317
* {
318-
* throw new InvalidArgumentException( "Given value type is not supported." );
318+
* throw new InvalidArgumentException("Given value type isn't supported.");
319319
* }
320320
* }
321-
* </code>
321+
* ```
322322
*
323-
* @param mixed $value A value returned by {@see createValueFromInput()}.
323+
* @param mixed $value A value returned by {@see Type::createValueFromInput()}.
324324
*
325325
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException If the parameter is not an instance of the supported value subtype.
326326
*/

Diff for: src/contracts/FieldType/Generic/ValidationError/ConstraintViolationAdapter.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
use Symfony\Component\Validator\ConstraintViolationInterface;
1515

1616
/**
17-
* {@see \Symfony\Component\Validator\ConstraintViolationInterface} to
18-
* {@see \Ibexa\Contracts\Core\FieldType\ValidationError} adapter.
17+
* Constraint violation validation error.
18+
*
19+
* Adapts {@see \Symfony\Component\Validator\ConstraintViolationInterface} to
20+
* {@see \Ibexa\Contracts\Core\FieldType\ValidationError}.
1921
*/
2022
final class ConstraintViolationAdapter implements ValidationErrorInterface
2123
{

Diff for: src/contracts/Limitation/Target/Builder/VersionBuilder.php

+13-9
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
use Ibexa\Core\Base\Exceptions\InvalidArgumentException;
1515

1616
/**
17+
* Version builder.
18+
*
1719
* Builder of {@see \Ibexa\Contracts\Core\Limitation\Target\Version} instance.
1820
*/
1921
final class VersionBuilder
@@ -28,6 +30,8 @@ public function build(): Target\Version
2830

2931
/**
3032
* @param \Ibexa\Contracts\Core\Repository\Values\Content\Field[] $updatedFields
33+
*
34+
* @return VersionBuilder
3135
*/
3236
public function updateFields(array $updatedFields): self
3337
{
@@ -41,7 +45,7 @@ public function updateFields(array $updatedFields): self
4145
*
4246
* @param array $languageCodes
4347
*
44-
* @return self
48+
* @return VersionBuilder
4549
*
4650
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException
4751
*/
@@ -61,9 +65,9 @@ public function translateToAnyLanguageOf(array $languageCodes): self
6165
/**
6266
* Set intent to create Content from unspecified (yet) content type, any from the given list.
6367
*
64-
* @param int[] $contentTypeIds
68+
* @param array<int, int> $contentTypeIds
6569
*
66-
* @return self
70+
* @return VersionBuilder
6771
*
6872
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException
6973
*/
@@ -83,13 +87,13 @@ public function createFromAnyContentTypeOf(array $contentTypeIds): self
8387
/**
8488
* Set intent to change Version status.
8589
*
86-
* Supported: <code>VersionInfo::STATUS_DRAFT, VersionInfo::STATUS_PUBLISHED, VersionInfo::STATUS_ARCHIVED</code>
90+
* Supported: {@see \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo::STATUS_DRAFT}, {@see \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo::STATUS_PUBLISHED}, {@see \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo::STATUS_ARCHIVED}
8791
*
8892
* @see \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo
8993
*
9094
* @param int $status
9195
*
92-
* @return self
96+
* @return VersionBuilder
9397
*
9498
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException
9599
*/
@@ -114,9 +118,9 @@ public function changeStatusTo(int $status): self
114118
* Set intent to update Content Version Fields.
115119
*
116120
* @param string|null $initialLanguageCode
117-
* @param \Ibexa\Contracts\Core\Repository\Values\Content\Field[] $fields
121+
* @param array<int, \Ibexa\Contracts\Core\Repository\Values\Content\Field> $fields
118122
*
119-
* @return self
123+
* @return VersionBuilder
120124
*/
121125
public function updateFieldsTo(?string $initialLanguageCode, array $fields): self
122126
{
@@ -138,9 +142,9 @@ static function (Field $field) {
138142
/**
139143
* Set intent to publish, to specified translations, all from the given list.
140144
*
141-
* @param string[] $languageCodes
145+
* @param array<int, string> $languageCodes
142146
*
143-
* @return self
147+
* @return VersionBuilder
144148
*
145149
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException
146150
*/

0 commit comments

Comments
 (0)