Skip to content

Commit

Permalink
fixup! fixup! IBX-6773: Bookmarks for non-accessible contents cause e…
Browse files Browse the repository at this point in the history
…xception - Changed to ibexa namespace for new classes
  • Loading branch information
vidarl committed Jun 26, 2024
1 parent fabbe47 commit 7aa2651
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
5 changes: 3 additions & 2 deletions eZ/Publish/Core/Repository/BookmarkService.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
use eZ\Publish\API\Repository\Values\Bookmark\BookmarkList;
use eZ\Publish\API\Repository\Values\Content\Location;
use eZ\Publish\API\Repository\Values\Content\Query;
use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
use eZ\Publish\API\Repository\Values\Content\Query\SortClause;
use eZ\Publish\API\Repository\Values\Filter\Filter;
use eZ\Publish\Core\Base\Exceptions\InvalidArgumentException;
use eZ\Publish\SPI\Persistence\Bookmark\CreateStruct;
use eZ\Publish\SPI\Persistence\Bookmark\Handler as BookmarkHandler;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause;


class BookmarkService implements BookmarkServiceInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ services:
eZ\Publish\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\:
resource: '../../../../Persistence/Legacy/Filter/CriterionQueryBuilder/*'

Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\:
resource: '../../../../../../../src/lib/Persistence/Legacy/Filter/CriterionQueryBuilder/*'

eZ\Publish\Core\Persistence\Legacy\Filter\SortClauseQueryBuilder\:
resource: '../../../../Persistence/Legacy/Filter/SortClauseQueryBuilder/*'

Ibexa\Core\Persistence\Legacy\Filter\SortClauseQueryBuilder\:
resource: '../../../../../../../src/lib/Persistence/Legacy/Filter/SortClauseQueryBuilder/*'
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion;

use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
use eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator;
use eZ\Publish\API\Repository\Values\Content\Query\Criterion\Operator\Specifications;
use eZ\Publish\SPI\Repository\Values\Filter\FilteringCriterion;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Ibexa\Core\Persistence\Legacy\Filter\SortClauseQueryBuilder\Bookmark;

use eZ\Publish\API\Repository\Values\Content\Query\SortClause\BookmarkId;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\SortClause\BookmarkId;
use eZ\Publish\SPI\Persistence\Filter\Doctrine\FilteringQueryBuilder;
use eZ\Publish\SPI\Repository\Values\Filter\FilteringSortClause;
use eZ\Publish\SPI\Repository\Values\Filter\SortClauseQueryBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@

namespace Ibexa\Tests\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Location;

use eZ\Publish\API\Repository\Values\Content\Query\Criterion as EzCriterion;
use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
use eZ\Publish\Core\Persistence\Legacy\Tests\Filter\BaseCriterionVisitorQueryBuilderTestCase;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion as IbexaCriterion;
use Ibexa\Core\Persistence\Legacy\Filter\CriterionQueryBuilder\Location\BookmarkQueryBuilder;

final class BookmarkQueryBuilderTest extends BaseCriterionVisitorQueryBuilderTestCase
{
public function getFilteringCriteriaQueryData(): iterable
{
yield 'Bookmarks locations for user_id=14' => [
new Criterion\IsBookmarked(14),
new IbexaCriterion\IsBookmarked(14),
'bookmark.user_id = :dcValue1',
['dcValue1' => 14],
];

yield 'Bookmarks locations for user_id=14 OR user_id=7' => [
new EzCriterion\LogicalOr(
new Criterion\LogicalOr(
[
new Criterion\IsBookmarked(14),
new Criterion\IsBookmarked(7),
new IbexaCriterion\IsBookmarked(14),
new IbexaCriterion\IsBookmarked(7),
]
),
'(bookmark.user_id = :dcValue1) OR (bookmark.user_id = :dcValue2)',
Expand Down

0 comments on commit 7aa2651

Please sign in to comment.