Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged branch '4.6' into main #481

Merged
merged 3 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 2 additions & 52 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4360,11 +4360,6 @@ parameters:
count: 1
path: src/contracts/Limitation/Target/Builder/VersionBuilder.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Target\\\\DestinationLocation\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#"
count: 1
path: src/contracts/Limitation/Target/DestinationLocation.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Limitation\\\\Type\\:\\:acceptValue\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -4490,11 +4485,6 @@ parameters:
count: 1
path: src/contracts/Persistence/Content/Type.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\Type\\\\FieldDefinition\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#"
count: 1
path: src/contracts/Persistence/Content/Type/FieldDefinition.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Persistence\\\\Content\\\\Type\\\\Handler\\:\\:delete\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -6350,21 +6340,11 @@ parameters:
count: 1
path: src/contracts/Repository/Values/Content/Search/Facet/UserFacet.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Search\\\\SearchResult\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#"
count: 1
path: src/contracts/Repository/Values/Content/Search/SearchResult.php

-
message: "#^Class Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Trash\\\\SearchResult implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#"
count: 1
path: src/contracts/Repository/Values/Content/Trash/SearchResult.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Trash\\\\SearchResult\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#"
count: 1
path: src/contracts/Repository/Values/Content/Trash/SearchResult.php

-
message: "#^Class Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Trash\\\\TrashItemDeleteResultList implements generic interface IteratorAggregate but does not specify its types\\: TKey, TValue$#"
count: 1
Expand Down Expand Up @@ -6480,26 +6460,11 @@ parameters:
count: 1
path: src/contracts/Repository/Values/UserPreference/UserPreferenceList.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject\\:\\:__construct\\(\\) has parameter \\$properties with no value type specified in iterable type array\\.$#"
count: 1
path: src/contracts/Repository/Values/ValueObject.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject\\:\\:attributes\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/contracts/Repository/Values/ValueObject.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject\\:\\:getProperties\\(\\) has parameter \\$dynamicProperties with no value type specified in iterable type array\\.$#"
count: 1
path: src/contracts/Repository/Values/ValueObject.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject\\:\\:getProperties\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/contracts/Repository/Values/ValueObject.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject\\:\\:__set\\(\\) expects string, null given\\.$#"
count: 1
Expand Down Expand Up @@ -17796,7 +17761,7 @@ parameters:
path: src/lib/Repository/Mapper/RoleDomainMapper.php

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

Expand Down Expand Up @@ -17956,7 +17921,7 @@ parameters:
path: src/lib/Repository/Permission/PermissionResolver.php

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

Expand Down Expand Up @@ -18760,16 +18725,6 @@ parameters:
count: 1
path: src/lib/Repository/Values/Content/Content.php

-
message: "#^Method Ibexa\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content\\:\\:getProperties\\(\\) has parameter \\$dynamicProperties with no value type specified in iterable type array\\.$#"
count: 1
path: src/lib/Repository/Values/Content/Content.php

-
message: "#^Method Ibexa\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content\\:\\:getProperties\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/lib/Repository/Values/Content/Content.php

-
message: "#^Property Ibexa\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Content\\:\\:\\$fieldDefinitionTranslationMap has unknown class eZ\\\\Publish\\\\API\\\\Repository\\\\Values\\\\Content\\\\Field as its type\\.$#"
count: 1
Expand Down Expand Up @@ -34460,11 +34415,6 @@ parameters:
count: 1
path: tests/integration/Core/Repository/SearchServiceTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\SearchServiceTest\\:\\:testUserMetadataGroupHorizontalFilterContent\\(\\) has parameter \\$queryType with no type specified\\.$#"
count: 1
path: tests/integration/Core/Repository/SearchServiceTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\SearchServiceTest\\:\\:testUserMetadataGroupHorizontalFilterLocation\\(\\) has no return type specified\\.$#"
count: 1
Expand Down
1 change: 1 addition & 0 deletions src/bundle/Core/Resources/config/default_settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ parameters:
reference:
reference: ~
filters:
auto_rotate: []
geometry/scaledownonly: [600, 600]
small:
reference: reference
Expand Down
56 changes: 28 additions & 28 deletions src/contracts/FieldType/FieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,20 @@ abstract public function getSettingsSchema();
* It is considered best practice to return a hash map, which contains
* rudimentary settings structures, like e.g. for the "ezstring" FieldType
*
* <code>
* array(
* 'stringLength' => array(
* 'minStringLength' => array(
* 'type' => 'int',
* 'default' => 0,
* ),
* 'maxStringLength' => array(
* 'type' => 'int'
* 'default' => null,
* )
* ),
* );
* </code>
* ```
* [
* 'stringLength' => [
* 'minStringLength' => [
* 'type' => 'int',
* 'default' => 0,
* ],
* 'maxStringLength' => [
* 'type' => 'int'
* 'default' => null,
* ],
* ],
* ];
* ```
*
* @return mixed
*/
Expand Down Expand Up @@ -361,22 +361,22 @@ abstract public function fromPersistenceValue(FieldValue $fieldValue);
*
* @param \Ibexa\Contracts\Core\FieldType\Value $value
*
* @return array Hash with relation type as key and array of destination content ids as value.
* @return array Hash with relation type as key and array of destination content IDs as value.
*
* Example:
* <code>
* array(
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK => array(
* "contentIds" => array( 12, 13, 14 ),
* "locationIds" => array( 24 )
* ),
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED => array(
* "contentIds" => array( 12 ),
* "locationIds" => array( 24, 45 )
* ),
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD => array( 12 )
* )
* </code>
* ```
* [
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK => [
* 'contentIds' => [12, 13, 14],
* 'locationIds' => [24]
* ],
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED => [
* 'contentIds" => [12],
* 'locationIds' => [24, 45]
* ],
* \Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD => [12]
* ]
* ```
*/
abstract public function getRelations(Value $value);
}
24 changes: 12 additions & 12 deletions src/contracts/FieldType/Generic/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,20 +260,20 @@ final public function acceptValue($inputValue): Value
* If given $inputValue could not be converted or is already an instance of dedicate value object,
* the method should simply return it.
*
* This is an operation method for {@see acceptValue()}.
* This is an operation method for {@see Type::acceptValue()}.
*
* Example implementation:
* <code>
* protected function createValueFromInput( $inputValue )
* ```
* protected function createValueFromInput($inputValue)
* {
* if ( is_array( $inputValue ) )
* if (is_array($inputValue))
* {
* $inputValue = \My\FieldType\CookieJar\Value( $inputValue );
* $inputValue = \My\FieldType\CookieJar\Value($inputValue);
* }
*
* return $inputValue;
* }
* </code>
* ```
*
* @param mixed $inputValue
*
Expand Down Expand Up @@ -304,23 +304,23 @@ protected function getValueClass(): string
/**
* Throws an exception if the given $value is not an instance of the supported value subtype.
*
* This is an operation method for {@see acceptValue()}.
* This is an operation method for {@see Type::acceptValue()}.
*
* Default implementation expects the value class to reside in the same namespace as its
* FieldType class and is named "Value".
*
* Example implementation:
* <code>
* ```
* protected function checkValueType($value): void
* {
* if ( !$inputValue instanceof \My\FieldType\CookieJar\Value ) )
* if (!$inputValue instanceof \My\FieldType\CookieJar\Value))
* {
* throw new InvalidArgumentException( "Given value type is not supported." );
* throw new InvalidArgumentException("Given value type isn't supported.");
* }
* }
* </code>
* ```
*
* @param mixed $value A value returned by {@see createValueFromInput()}.
* @param mixed $value A value returned by {@see Type::createValueFromInput()}.
*
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException If the parameter is not an instance of the supported value subtype.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
use Symfony\Component\Validator\ConstraintViolationInterface;

/**
* {@see \Symfony\Component\Validator\ConstraintViolationInterface} to
* {@see \Ibexa\Contracts\Core\FieldType\ValidationError} adapter.
* Constraint violation validation error.
*
* Adapts {@see \Symfony\Component\Validator\ConstraintViolationInterface} to
* {@see \Ibexa\Contracts\Core\FieldType\ValidationError}.
*/
final class ConstraintViolationAdapter implements ValidationErrorInterface
{
Expand Down
20 changes: 6 additions & 14 deletions src/contracts/Limitation/Target/Builder/VersionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
use Ibexa\Core\Base\Exceptions\InvalidArgumentException;

/**
* Version builder.
*
* Builder of {@see \Ibexa\Contracts\Core\Limitation\Target\Version} instance.
*/
final class VersionBuilder
Expand Down Expand Up @@ -41,8 +43,6 @@ public function updateFields(array $updatedFields): self
*
* @param array $languageCodes
*
* @return self
*
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException
*/
public function translateToAnyLanguageOf(array $languageCodes): self
Expand All @@ -61,9 +61,7 @@ public function translateToAnyLanguageOf(array $languageCodes): self
/**
* Set intent to create Content from unspecified (yet) content type, any from the given list.
*
* @param int[] $contentTypeIds
*
* @return self
* @param array<int, int> $contentTypeIds
*
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException
*/
Expand All @@ -83,14 +81,12 @@ public function createFromAnyContentTypeOf(array $contentTypeIds): self
/**
* Set intent to change Version status.
*
* Supported: <code>VersionInfo::STATUS_DRAFT, VersionInfo::STATUS_PUBLISHED, VersionInfo::STATUS_ARCHIVED</code>
* 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}
*
* @see \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo
*
* @param int $status
*
* @return self
*
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException
*/
public function changeStatusTo(int $status): self
Expand All @@ -114,9 +110,7 @@ public function changeStatusTo(int $status): self
* Set intent to update Content Version Fields.
*
* @param string|null $initialLanguageCode
* @param \Ibexa\Contracts\Core\Repository\Values\Content\Field[] $fields
*
* @return self
* @param array<int, \Ibexa\Contracts\Core\Repository\Values\Content\Field> $fields
*/
public function updateFieldsTo(?string $initialLanguageCode, array $fields): self
{
Expand All @@ -138,9 +132,7 @@ static function (Field $field) {
/**
* Set intent to publish, to specified translations, all from the given list.
*
* @param string[] $languageCodes
*
* @return self
* @param array<int, string> $languageCodes
*
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException
*/
Expand Down
Loading
Loading