Skip to content

Commit

Permalink
Merge branch '4.6'
Browse files Browse the repository at this point in the history
# Conflicts:
#	phpstan-baseline-7.4.neon
#	phpstan-baseline-gte-8.0.neon
#	phpstan-baseline.neon
#	src/contracts/Repository/ContentService.php
  • Loading branch information
adriendupuis committed Nov 13, 2024
2 parents aba61e9 + 02200e6 commit ae12de3
Show file tree
Hide file tree
Showing 17 changed files with 397 additions and 215 deletions.
48 changes: 9 additions & 39 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ parameters:
path: src/bundle/Core/Command/CleanupVersionsCommand.php

-
message: "#^Parameter \\#1 \\$array of function array_filter expects array, iterable\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\VersionInfo\\> given\\.$#"
message: "#^Parameter \\#1 \\$array of function array_filter expects array, iterable\\<int, Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\VersionInfo\\> given\\.$#"
count: 1
path: src/bundle/Core/Command/CleanupVersionsCommand.php

-
message: "#^Parameter \\#1 \\$array of function array_slice expects array, iterable\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\VersionInfo\\> given\\.$#"
message: "#^Parameter \\#1 \\$array of function array_slice expects array, iterable\\<int, Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\VersionInfo\\> given\\.$#"
count: 1
path: src/bundle/Core/Command/CleanupVersionsCommand.php

-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, iterable\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\VersionInfo\\> given\\.$#"
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, iterable\\<int, Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\VersionInfo\\> given\\.$#"
count: 1
path: src/bundle/Core/Command/CleanupVersionsCommand.php

Expand Down Expand Up @@ -5400,11 +5400,6 @@ parameters:
count: 1
path: src/contracts/Persistence/User/Policy.php

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

-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\ContentService\\:\\:validate\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -5415,21 +5410,6 @@ parameters:
count: 1
path: src/contracts/Repository/ContentService.php

-
message: "#^PHPDoc tag @param for parameter \\$contentId with type mixed is not subtype of native type int\\.$#"
count: 1
path: src/contracts/Repository/ContentService.php

-
message: "#^PHPDoc tag @param has invalid value \\(\\\\Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Language\\|null if not set the draft is created with the initialLanguage code of the source version or if not present with the main language\\.\\)\\: Unexpected token \"if\", expected variable at offset 870$#"
count: 1
path: src/contracts/Repository/ContentService.php

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

-
message: "#^Method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Decorator\\\\ContentServiceDecorator\\:\\:validate\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -8431,7 +8411,7 @@ parameters:
path: src/lib/Base/Utils/DeprecationWarnerInterface.php

-
message: "#^Parameter \\#1 \\$locations of class Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Events\\\\Content\\\\DeleteContentEvent constructor expects array, array\\|iterable\\<int\\> given\\.$#"
message: "#^Parameter \\#1 \\$locations of class Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Events\\\\Content\\\\DeleteContentEvent constructor expects array, array\\|iterable\\<int, int\\> given\\.$#"
count: 1
path: src/lib/Event/ContentService.php

Expand Down Expand Up @@ -11121,7 +11101,7 @@ parameters:
path: src/lib/MVC/Symfony/FieldType/RelationList/ParameterProvider.php

-
message: "#^Parameter \\#1 \\$array of function array_keys expects array, iterable\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\ContentInfo\\> given\\.$#"
message: "#^Parameter \\#1 \\$array of function array_keys expects array, iterable\\<int, Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\ContentInfo\\> given\\.$#"
count: 1
path: src/lib/MVC/Symfony/FieldType/RelationList/ParameterProvider.php

Expand Down Expand Up @@ -18980,11 +18960,6 @@ parameters:
count: 1
path: src/lib/Repository/ContentService.php

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

-
message: "#^Method Ibexa\\\\Core\\\\Repository\\\\ContentService\\:\\:loadContentByRemoteId\\(\\) has parameter \\$languages with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -19036,7 +19011,7 @@ parameters:
path: src/lib/Repository/ContentService.php

-
message: "#^Parameter \\#3 \\$prioritizedLanguages of method Ibexa\\\\Core\\\\Repository\\\\Mapper\\\\ContentDomainMapper\\:\\:buildContentDomainObjectFromPersistence\\(\\) expects array\\<string\\>, array\\<string\\>\\|null given\\.$#"
message: "#^Parameter \\#3 \\$prioritizedLanguages of method Ibexa\\\\Core\\\\Repository\\\\Mapper\\\\ContentDomainMapper\\:\\:buildContentDomainObjectFromPersistence\\(\\) expects array\\<string\\>, array\\<int, string\\>\\|null given\\.$#"
count: 1
path: src/lib/Repository/ContentService.php

Expand Down Expand Up @@ -19985,11 +19960,6 @@ parameters:
count: 1
path: src/lib/Repository/SettingService.php

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

-
message: "#^Method Ibexa\\\\Core\\\\Repository\\\\SiteAccessAware\\\\ContentService\\:\\:validate\\(\\) has parameter \\$context with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -26756,7 +26726,7 @@ parameters:
path: tests/integration/Core/Repository/ContentServiceTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\ContentServiceTest\\:\\:testLoadVersions\\(\\) should return array\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\VersionInfo\\> but returns iterable\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\VersionInfo\\>\\.$#"
message: "#^Method Ibexa\\\\Tests\\\\Integration\\\\Core\\\\Repository\\\\ContentServiceTest\\:\\:testLoadVersions\\(\\) should return array\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\VersionInfo\\> but returns iterable\\<int, Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\VersionInfo\\>\\.$#"
count: 1
path: tests/integration/Core/Repository/ContentServiceTest.php

Expand Down Expand Up @@ -27021,7 +26991,7 @@ parameters:
path: tests/integration/Core/Repository/ContentServiceTest.php

-
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, iterable\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\VersionInfo\\> given\\.$#"
message: "#^Parameter \\#1 \\$value of function count expects array\\|Countable, iterable\\<int, Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\VersionInfo\\> given\\.$#"
count: 2
path: tests/integration/Core/Repository/ContentServiceTest.php

Expand Down Expand Up @@ -53606,7 +53576,7 @@ parameters:
path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php

-
message: "#^Parameter \\#1 \\$contentIds of method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\ContentService\\:\\:loadContentInfoList\\(\\) expects array\\<int\\>, array\\<int, string\\> given\\.$#"
message: "#^Parameter \\#1 \\$contentIds of method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\ContentService\\:\\:loadContentInfoList\\(\\) expects array\\<int, int\\>, array\\<int, string\\> given\\.$#"
count: 1
path: tests/lib/Repository/Decorator/ContentServiceDecoratorTest.php

Expand Down
5 changes: 5 additions & 0 deletions src/contracts/Persistence/Content/Location/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ public function create(CreateStruct $location);
*/
public function removeSubtree($locationId);

/**
* Removes all draft contents that have no location assigned to them under the given parent location.
*/
public function deleteChildrenDrafts(int $locationId): void;

/**
* Set section on all content objects in the subtree.
* Only main locations will be updated.
Expand Down
Loading

0 comments on commit ae12de3

Please sign in to comment.