Skip to content

Commit 2238c97

Browse files
author
Ryan Lee
committed
IBX-10186 Add subtree limit queries
1 parent 40159cb commit 2238c97

File tree

35 files changed

+556
-67
lines changed

35 files changed

+556
-67
lines changed

phpstan-baseline.neon

Lines changed: 169 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4680,6 +4680,12 @@ parameters:
46804680
count: 1
46814681
path: src/contracts/Persistence/Content/VersionInfo.php
46824682

4683+
-
4684+
message: '#^PHPDoc tag @param references unknown parameter\: \$limit$#'
4685+
identifier: parameter.notFound
4686+
count: 1
4687+
path: src/contracts/Persistence/Filter/Content/Handler.php
4688+
46834689
-
46844690
message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Filter\\Doctrine\\FilteringQueryBuilder\:\:buildOperatorBasedCriterionConstraint\(\) has parameter \$criterionValue with no value type specified in iterable type array\.$#'
46854691
identifier: missingType.iterableValue
@@ -4710,6 +4716,24 @@ parameters:
47104716
count: 1
47114717
path: src/contracts/Persistence/Filter/LazyListIterator.php
47124718

4719+
-
4720+
message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Handler\:\:beginTransaction\(\) has no return type specified\.$#'
4721+
identifier: missingType.return
4722+
count: 1
4723+
path: src/contracts/Persistence/Handler.php
4724+
4725+
-
4726+
message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Handler\:\:commit\(\) has no return type specified\.$#'
4727+
identifier: missingType.return
4728+
count: 1
4729+
path: src/contracts/Persistence/Handler.php
4730+
4731+
-
4732+
message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Handler\:\:rollback\(\) has no return type specified\.$#'
4733+
identifier: missingType.return
4734+
count: 1
4735+
path: src/contracts/Persistence/Handler.php
4736+
47134737
-
47144738
message: '#^Property Ibexa\\Contracts\\Core\\Persistence\\Notification\\CreateStruct\:\:\$data type has no value type specified in iterable type array\.$#'
47154739
identifier: missingType.iterableValue
@@ -4848,6 +4872,18 @@ parameters:
48484872
count: 1
48494873
path: src/contracts/Repository/ContentService.php
48504874

4875+
-
4876+
message: '#^PHPDoc tag @param references unknown parameter\: \$limit$#'
4877+
identifier: parameter.notFound
4878+
count: 1
4879+
path: src/contracts/Repository/ContentService.php
4880+
4881+
-
4882+
message: '#^Method Ibexa\\Contracts\\Core\\Repository\\ContentService\:\:count\(\) invoked with 3 parameters, 1\-2 required\.$#'
4883+
identifier: arguments.count
4884+
count: 1
4885+
path: src/contracts/Repository/Decorator/ContentServiceDecorator.php
4886+
48514887
-
48524888
message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Decorator\\ContentServiceDecorator\:\:validate\(\) has parameter \$context with no value type specified in iterable type array\.$#'
48534889
identifier: missingType.iterableValue
@@ -4860,12 +4896,42 @@ parameters:
48604896
count: 1
48614897
path: src/contracts/Repository/Decorator/ContentServiceDecorator.php
48624898

4899+
-
4900+
message: '#^PHPDoc tag @param references unknown parameter\: \$limit$#'
4901+
identifier: parameter.notFound
4902+
count: 1
4903+
path: src/contracts/Repository/Decorator/ContentServiceDecorator.php
4904+
48634905
-
48644906
message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Decorator\\LocationServiceDecorator\:\:loadLocationList\(\) has parameter \$locationIds with no value type specified in iterable type array\.$#'
48654907
identifier: missingType.iterableValue
48664908
count: 1
48674909
path: src/contracts/Repository/Decorator/LocationServiceDecorator.php
48684910

4911+
-
4912+
message: '#^Method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:count\(\) invoked with 3 parameters, 1\-2 required\.$#'
4913+
identifier: arguments.count
4914+
count: 1
4915+
path: src/contracts/Repository/Decorator/LocationServiceDecorator.php
4916+
4917+
-
4918+
message: '#^Method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:getLocationChildCount\(\) invoked with 2 parameters, 1 required\.$#'
4919+
identifier: arguments.count
4920+
count: 1
4921+
path: src/contracts/Repository/Decorator/LocationServiceDecorator.php
4922+
4923+
-
4924+
message: '#^Method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:getSubtreeSize\(\) invoked with 2 parameters, 1 required\.$#'
4925+
identifier: arguments.count
4926+
count: 1
4927+
path: src/contracts/Repository/Decorator/LocationServiceDecorator.php
4928+
4929+
-
4930+
message: '#^PHPDoc tag @param references unknown parameter\: \$limit$#'
4931+
identifier: parameter.notFound
4932+
count: 3
4933+
path: src/contracts/Repository/Decorator/LocationServiceDecorator.php
4934+
48694935
-
48704936
message: '#^Method Ibexa\\Contracts\\Core\\Repository\\Decorator\\SearchServiceDecorator\:\:suggest\(\) has no return type specified\.$#'
48714937
identifier: missingType.return
@@ -5400,6 +5466,12 @@ parameters:
54005466
count: 1
54015467
path: src/contracts/Repository/LocationService.php
54025468

5469+
-
5470+
message: '#^PHPDoc tag @param references unknown parameter\: \$limit$#'
5471+
identifier: parameter.notFound
5472+
count: 3
5473+
path: src/contracts/Repository/LocationService.php
5474+
54035475
-
54045476
message: '#^PHPDoc tag @param for parameter \$objectStateGroupId with type mixed is not subtype of native type int\.$#'
54055477
identifier: parameter.phpDocType
@@ -10350,6 +10422,12 @@ parameters:
1035010422
count: 1
1035110423
path: src/lib/Persistence/Cache/LocationHandler.php
1035210424

10425+
-
10426+
message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\\Handler\:\:getSubtreeSize\(\) invoked with 2 parameters, 1 required\.$#'
10427+
identifier: arguments.count
10428+
count: 1
10429+
path: src/lib/Persistence/Cache/LocationHandler.php
10430+
1035310431
-
1035410432
message: '#^Method Ibexa\\Core\\Persistence\\Cache\\LocationHandler\:\:changeMainLocation\(\) has no return type specified\.$#'
1035510433
identifier: missingType.return
@@ -16650,6 +16728,12 @@ parameters:
1665016728
count: 1
1665116729
path: src/lib/Repository/ContentService.php
1665216730

16731+
-
16732+
message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Filter\\Content\\Handler\:\:count\(\) invoked with 2 parameters, 1 required\.$#'
16733+
identifier: arguments.count
16734+
count: 1
16735+
path: src/lib/Repository/ContentService.php
16736+
1665316737
-
1665416738
message: '#^Method Ibexa\\Core\\Repository\\ContentService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#'
1665516739
identifier: missingType.iterableValue
@@ -16704,6 +16788,12 @@ parameters:
1670416788
count: 1
1670516789
path: src/lib/Repository/ContentService.php
1670616790

16791+
-
16792+
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 565 on line 9$#'
16793+
identifier: phpDoc.parseError
16794+
count: 1
16795+
path: src/lib/Repository/ContentService.php
16796+
1670716797
-
1670816798
message: '#^PHPDoc tag @var has invalid value \(\$content \\Ibexa\\Core\\Repository\\Values\\Content\\Content\)\: Unexpected token "\$content", expected type at offset 9 on line 1$#'
1670916799
identifier: phpDoc.parseError
@@ -16914,12 +17004,24 @@ parameters:
1691417004
count: 1
1691517005
path: src/lib/Repository/LocationService.php
1691617006

17007+
-
17008+
message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Content\\Location\\Handler\:\:getSubtreeSize\(\) invoked with 2 parameters, 1 required\.$#'
17009+
identifier: arguments.count
17010+
count: 1
17011+
path: src/lib/Repository/LocationService.php
17012+
1691717013
-
1691817014
message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Content\\UrlAlias\\Handler\:\:publishUrlAliasForLocation\(\) invoked with 6 parameters, 4\-5 required\.$#'
1691917015
identifier: arguments.count
1692017016
count: 1
1692117017
path: src/lib/Repository/LocationService.php
1692217018

17019+
-
17020+
message: '#^Method Ibexa\\Contracts\\Core\\Persistence\\Filter\\Location\\Handler\:\:count\(\) invoked with 2 parameters, 1 required\.$#'
17021+
identifier: arguments.count
17022+
count: 1
17023+
path: src/lib/Repository/LocationService.php
17024+
1692317025
-
1692417026
message: '#^Method Ibexa\\Core\\Repository\\LocationService\:\:__construct\(\) has parameter \$settings with no value type specified in iterable type array\.$#'
1692517027
identifier: missingType.iterableValue
@@ -16932,6 +17034,12 @@ parameters:
1693217034
count: 1
1693317035
path: src/lib/Repository/LocationService.php
1693417036

17037+
-
17038+
message: '#^PHPDoc tag @param references unknown parameter\: \$limit$#'
17039+
identifier: parameter.notFound
17040+
count: 2
17041+
path: src/lib/Repository/LocationService.php
17042+
1693517043
-
1693617044
message: '#^Property Ibexa\\Core\\Repository\\LocationService\:\:\$repository \(Ibexa\\Core\\Repository\\Repository\) does not accept Ibexa\\Contracts\\Core\\Repository\\Repository\.$#'
1693717045
identifier: assign.propertyType
@@ -17814,6 +17922,12 @@ parameters:
1781417922
count: 1
1781517923
path: src/lib/Repository/SettingService.php
1781617924

17925+
-
17926+
message: '#^Method Ibexa\\Contracts\\Core\\Repository\\ContentService\:\:count\(\) invoked with 3 parameters, 1\-2 required\.$#'
17927+
identifier: arguments.count
17928+
count: 1
17929+
path: src/lib/Repository/SiteAccessAware/ContentService.php
17930+
1781717931
-
1781817932
message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\ContentService\:\:validate\(\) has parameter \$context with no value type specified in iterable type array\.$#'
1781917933
identifier: missingType.iterableValue
@@ -17826,6 +17940,12 @@ parameters:
1782617940
count: 1
1782717941
path: src/lib/Repository/SiteAccessAware/ContentService.php
1782817942

17943+
-
17944+
message: '#^PHPDoc tag @param references unknown parameter\: \$limit$#'
17945+
identifier: parameter.notFound
17946+
count: 1
17947+
path: src/lib/Repository/SiteAccessAware/ContentService.php
17948+
1782917949
-
1783017950
message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\Language\\AbstractLanguageResolver\:\:getPrioritizedLanguages\(\) has parameter \$forcedLanguages with no value type specified in iterable type array\.$#'
1783117951
identifier: missingType.iterableValue
@@ -17844,12 +17964,36 @@ parameters:
1784417964
count: 1
1784517965
path: src/lib/Repository/SiteAccessAware/Language/LanguageResolver.php
1784617966

17967+
-
17968+
message: '#^Method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:count\(\) invoked with 3 parameters, 1\-2 required\.$#'
17969+
identifier: arguments.count
17970+
count: 1
17971+
path: src/lib/Repository/SiteAccessAware/LocationService.php
17972+
17973+
-
17974+
message: '#^Method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:getLocationChildCount\(\) invoked with 2 parameters, 1 required\.$#'
17975+
identifier: arguments.count
17976+
count: 1
17977+
path: src/lib/Repository/SiteAccessAware/LocationService.php
17978+
17979+
-
17980+
message: '#^Method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:getSubtreeSize\(\) invoked with 2 parameters, 1 required\.$#'
17981+
identifier: arguments.count
17982+
count: 1
17983+
path: src/lib/Repository/SiteAccessAware/LocationService.php
17984+
1784717985
-
1784817986
message: '#^Method Ibexa\\Core\\Repository\\SiteAccessAware\\LocationService\:\:loadLocationList\(\) has parameter \$locationIds with no value type specified in iterable type array\.$#'
1784917987
identifier: missingType.iterableValue
1785017988
count: 1
1785117989
path: src/lib/Repository/SiteAccessAware/LocationService.php
1785217990

17991+
-
17992+
message: '#^PHPDoc tag @param references unknown parameter\: \$limit$#'
17993+
identifier: parameter.notFound
17994+
count: 2
17995+
path: src/lib/Repository/SiteAccessAware/LocationService.php
17996+
1785317997
-
1785417998
message: '#^Property Ibexa\\Core\\Repository\\SiteAccessAware\\Repository\:\:\$notificationService \(Ibexa\\Core\\Repository\\NotificationService\) does not accept Ibexa\\Core\\Repository\\SiteAccessAware\\NotificationService\.$#'
1785517999
identifier: assign.propertyType
@@ -32433,7 +32577,7 @@ parameters:
3243332577
-
3243432578
message: '#^Cannot access property \$id on Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#'
3243532579
identifier: property.nonObject
32436-
count: 11
32580+
count: 9
3243732581
path: tests/integration/Core/Repository/LocationServiceTest.php
3243832582

3243932583
-
@@ -32442,6 +32586,18 @@ parameters:
3244232586
count: 2
3244332587
path: tests/integration/Core/Repository/LocationServiceTest.php
3244432588

32589+
-
32590+
message: '#^Method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:getLocationChildCount\(\) invoked with 2 parameters, 1 required\.$#'
32591+
identifier: arguments.count
32592+
count: 1
32593+
path: tests/integration/Core/Repository/LocationServiceTest.php
32594+
32595+
-
32596+
message: '#^Method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:getSubtreeSize\(\) invoked with 2 parameters, 1 required\.$#'
32597+
identifier: arguments.count
32598+
count: 2
32599+
path: tests/integration/Core/Repository/LocationServiceTest.php
32600+
3244532601
-
3244632602
message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:assertAliasesBeforeCopy\(\) has no return type specified\.$#'
3244732603
identifier: missingType.return
@@ -32640,12 +32796,6 @@ parameters:
3264032796
count: 1
3264132797
path: tests/integration/Core/Repository/LocationServiceTest.php
3264232798

32643-
-
32644-
message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testGetSubtreeSize\(\) should return Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location but returns Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null\.$#'
32645-
identifier: return.type
32646-
count: 1
32647-
path: tests/integration/Core/Repository/LocationServiceTest.php
32648-
3264932799
-
3265032800
message: '#^Method Ibexa\\Tests\\Integration\\Core\\Repository\\LocationServiceTest\:\:testHideLocation\(\) has no return type specified\.$#'
3265132801
identifier: missingType.return
@@ -32898,12 +33048,6 @@ parameters:
3289833048
count: 1
3289933049
path: tests/integration/Core/Repository/LocationServiceTest.php
3290033050

32901-
-
32902-
message: '#^Parameter \#1 \$location of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:getSubtreeSize\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null given\.$#'
32903-
identifier: argument.type
32904-
count: 2
32905-
path: tests/integration/Core/Repository/LocationServiceTest.php
32906-
3290733051
-
3290833052
message: '#^Parameter \#1 \$location of method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:moveSubtree\(\) expects Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location, Ibexa\\Contracts\\Core\\Repository\\Values\\Content\\Location\|null given\.$#'
3290933053
identifier: argument.type
@@ -52770,6 +52914,12 @@ parameters:
5277052914
count: 1
5277152915
path: tests/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/LogicalOperatorQueryBuilderQueryBuilderTest.php
5277252916

52917+
-
52918+
message: '#^Parameter \#3 \$limit of method Ibexa\\Core\\Persistence\\Legacy\\Filter\\Query\\LimitedCountQueryBuilder\:\:wrap\(\) expects int\<1, max\>\|null, 0 given\.$#'
52919+
identifier: argument.type
52920+
count: 1
52921+
path: tests/lib/Persistence/Legacy/Filter/Query/LimitedCountQueryBuilderTest.php
52922+
5277352923
-
5277452924
message: '#^Call to an undefined method Ibexa\\Contracts\\Core\\Container\:\:get\(\)\.$#'
5277552925
identifier: method.notFound
@@ -54456,6 +54606,12 @@ parameters:
5445654606
count: 1
5445754607
path: tests/lib/Repository/Decorator/LanguageServiceDecoratorTest.php
5445854608

54609+
-
54610+
message: '#^Method Ibexa\\Contracts\\Core\\Repository\\LocationService\:\:getLocationChildCount\(\) invoked with 2 parameters, 1 required\.$#'
54611+
identifier: arguments.count
54612+
count: 1
54613+
path: tests/lib/Repository/Decorator/LocationServiceDecoratorTest.php
54614+
5445954615
-
5446054616
message: '#^Method Ibexa\\Tests\\Core\\Repository\\Decorator\\LocationServiceDecoratorTest\:\:testCopySubtreeDecorator\(\) has no return type specified\.$#'
5446154617
identifier: missingType.return
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
/**
4+
* @copyright Copyright (C) Ibexa AS. All rights reserved.
5+
* @license For full copyright and license information view LICENSE file distributed with this source code.
6+
*/
7+
declare(strict_types=1);
8+
9+
namespace Ibexa\Contracts\Core\Future\Repository;
10+
11+
use Ibexa\Contracts\Core\Repository\ContentService;
12+
use Ibexa\Contracts\Core\Repository\Values\Filter\Filter;
13+
14+
/**
15+
* @internal Future version of ContentService to be released in Ibexa Core 5.0. Used to force value proxies to generate correct types. For internal use only.
16+
*/
17+
interface FutureContentService extends ContentService
18+
{
19+
/**
20+
* {@inheritDoc}
21+
*/
22+
public function count(Filter $filter, ?array $languages = null, ?int $limit = null): int;
23+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
/**
4+
* @copyright Copyright (C) Ibexa AS. All rights reserved.
5+
* @license For full copyright and license information view LICENSE file distributed with this source code.
6+
*/
7+
declare(strict_types=1);
8+
9+
namespace Ibexa\Contracts\Core\Future\Repository;
10+
11+
use Ibexa\Contracts\Core\Repository\LocationService;
12+
use Ibexa\Contracts\Core\Repository\Values\Content\Location;
13+
use Ibexa\Contracts\Core\Repository\Values\Filter\Filter;
14+
15+
/**
16+
* @internal Future version of LocationService to be released in Ibexa Core 5.0. Used to force value proxies to generate correct types. For internal use only.
17+
*/
18+
interface FutureLocationService extends LocationService
19+
{
20+
/**
21+
* {@inheritDoc}
22+
*/
23+
public function getLocationChildCount(Location $location, ?int $limit = null): int;
24+
25+
/**
26+
* {@inheritDoc}
27+
*/
28+
public function getSubtreeSize(Location $location, ?int $limit = null): int;
29+
30+
/**
31+
* {@inheritDoc}
32+
*/
33+
public function count(Filter $filter, ?array $languages = null, ?int $limit = null): int;
34+
}

0 commit comments

Comments
 (0)