Skip to content

Commit 95e543c

Browse files
committed
Merge pull request #804 from ezsystems/undeprecated_criteria
Un-deprecate working Location based Content criteria
2 parents ea12eee + fccc64b commit 95e543c

File tree

7 files changed

+7
-21
lines changed

7 files changed

+7
-21
lines changed

doc/bc/changes-5.3.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ Changes affecting version compatibility with former or future versions.
8686
* In semantic configuration, `ezpublish.system.<siteAccessName>.session_name` is deprecated.
8787
Use `ezpublish.system.<siteAccessName>.session.name` instead.
8888

89+
* All Location based SortClauses, as well as PriorityCriterion and DepthCriterion has been
90+
deprecated for content search use since their behaviour is unpredictable by design when
91+
content has several locations. Instead use same functionality on new Location Search API.
92+
8993
No further changes are known in this release at the time of writing.
9094
See online on your corresponding eZ Publish version for
9195
updated list of known issues (missing features, breaks and errata).

eZ/Publish/API/Repository/Values/Content/Query/Criterion/LocationId.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
* Supported operators:
2222
* - IN: matches against a list of location ids
2323
* - EQ: matches against a unique location id
24-
*
25-
* @deprecated Since 5.3, use Location search instead
2624
*/
2725
class LocationId extends Criterion implements CriterionInterface
2826
{
@@ -33,8 +31,6 @@ class LocationId extends Criterion implements CriterionInterface
3331
*
3432
* @throws \InvalidArgumentException if a non numeric id is given
3533
* @throws \InvalidArgumentException if the value type doesn't match the operator
36-
*
37-
* @deprecated Since 5.3, use Location search instead
3834
*/
3935
public function __construct( $value )
4036
{

eZ/Publish/API/Repository/Values/Content/Query/Criterion/LocationRemoteId.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
* Supported operators:
2020
* - IN: will match from a list of location remote IDs
2121
* - EQ: will match against one location remote ID
22-
*
23-
* @deprecated Since 5.3, use Location search instead
2422
*/
2523
class LocationRemoteId extends Criterion implements CriterionInterface
2624
{
@@ -31,8 +29,6 @@ class LocationRemoteId extends Criterion implements CriterionInterface
3129
*
3230
* @throws \InvalidArgumentException if a non numeric id is given
3331
* @throws \InvalidArgumentException if the value type doesn't match the operator
34-
*
35-
* @deprecated Since 5.3, use Location search instead
3632
*/
3733
public function __construct( $value )
3834
{

eZ/Publish/API/Repository/Values/Content/Query/Criterion/ParentLocationId.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
* Supported operators:
2222
* - IN: matches against a list of location ids
2323
* - EQ: matches against a unique location id
24-
*
25-
* @deprecated Since 5.3, use Location search instead
2624
*/
2725
class ParentLocationId extends Criterion implements CriterionInterface
2826
{
@@ -33,8 +31,6 @@ class ParentLocationId extends Criterion implements CriterionInterface
3331
*
3432
* @throws \InvalidArgumentException if a non numeric id is given
3533
* @throws \InvalidArgumentException if the value type doesn't match the operator
36-
*
37-
* @deprecated Since 5.3, use Location search instead
3834
*/
3935
public function __construct( $value )
4036
{

eZ/Publish/API/Repository/Values/Content/Query/Criterion/Subtree.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
* Criterion that matches content that belongs to a given (list of) Subtree(s)
1919
*
2020
* Content will be matched if it is part of at least one of the given subtree path strings
21-
*
22-
* @deprecated Since 5.3, use Location search instead
2321
*/
2422
class Subtree extends Criterion implements CriterionInterface
2523
{
@@ -30,8 +28,6 @@ class Subtree extends Criterion implements CriterionInterface
3028
*
3129
* @throws InvalidArgumentException if a non path string is given
3230
* @throws InvalidArgumentException if the value type doesn't match the operator
33-
*
34-
* @deprecated Since 5.3, use Location search instead
3531
*/
3632
public function __construct( $value )
3733
{

eZ/Publish/API/Repository/Values/Content/Query/Criterion/Visibility.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
/**
1818
* A criterion that matches content based on its visibility
1919
*
20-
* @deprecated Since 5.3, use Location search instead
20+
* @warning This Criterion acts on all locations of a Content, so it will include hidden
21+
* content within the tree you are searching for if content has visible location elsewhere.
22+
* This is intentional and you should rather use LocationSearch if this is not the behaviour you want.
2123
*/
2224
class Visibility extends Criterion implements CriterionInterface
2325
{
@@ -37,8 +39,6 @@ class Visibility extends Criterion implements CriterionInterface
3739
* @param int $value Visibility: self::VISIBLE, self::HIDDEN
3840
*
3941
* @throws \InvalidArgumentException
40-
*
41-
* @deprecated Since 5.3, use Location search instead
4242
*/
4343
public function __construct( $value )
4444
{

eZ/Publish/API/Repository/Values/Content/Query/FacetBuilder/LocationFacetBuilder.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
* @todo: check hierarchical facets
2323
*
2424
* @package eZ\Publish\API\Repository\Values\Content\Query
25-
*
26-
* @deprecated Since 5.3, use Location search instead
2725
*/
2826
class LocationFacetBuilder extends FacetBuilder
2927
{

0 commit comments

Comments
 (0)