Skip to content

Commit

Permalink
restore querybuilders and repositories from master
Browse files Browse the repository at this point in the history
  • Loading branch information
SzymonKostrubiec committed Jul 9, 2024
1 parent fc36793 commit 0e32bee
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,10 @@ public function getQuery(FormEvent $event): Query
/** @var Search $data */
$data = $event->getData();

/** @var Query\BoolQuery $boolQuery */
$boolQuery = $this->queryBuilder->buildQuery([
/** @phpstan-ignore-next-line */
'query' => $data['box']['query'] ?? '',

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^5.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^5.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^5.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^5.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^5.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^5.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^5.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^5.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^5.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^5.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^5.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^5.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 34 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Cannot access offset 'box' on BitBag\SyliusElasticsearchPlugin\Model\Search.
]);

/** @phpstan-ignore-next-line */
foreach ($data['facets'] ?? [] as $facetId => $selectedBuckets) {

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^5.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^5.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^5.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^5.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^5.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^5.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^5.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^5.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^5.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^5.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^5.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^5.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.

Check failure on line 37 in src/QueryBuilder/FormQueryBuilder/SiteWideFacetsQueryBuilder.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Cannot access offset 'facets' on BitBag\SyliusElasticsearchPlugin\Model\Search.
if (!$selectedBuckets) {
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public function getQuery(FormEvent $event, string $namePropertyPrefix): Query

$data = $this->shopProductListDataHandler->retrieveData($eventData);

/** @var Query\BoolQuery $boolQuery */
$boolQuery = $this->searchProductsQueryBuilder->buildQuery($data);

foreach ($data['facets'] ?? [] as $facetId => $selectedBuckets) {
Expand Down
6 changes: 2 additions & 4 deletions src/Repository/OrderItemRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ public function __construct(

public function countByVariant(ProductVariantInterface $variant, array $orderStates = []): int
{
if ([] !== $orderStates) {
if (empty($orderStates)) {

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^5.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^5.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^5.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^5.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^5.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^5.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^5.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^5.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^5.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^5.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^5.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^5.4

Construct empty() is not allowed. Use more strict comparison.

Check failure on line 28 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Construct empty() is not allowed. Use more strict comparison.
$orderStates = [OrderInterface::STATE_CANCELLED, OrderInterface::STATE_CART];
}
/** @var EntityRepository $queryBuilder */
$queryBuilder = $this->baseOrderItemRepository;

return (int) ($queryBuilder
return (int) ($this->baseOrderItemRepository

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^5.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^5.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^5.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^5.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^5.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^5.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^5.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^5.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^5.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^5.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^5.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^5.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().

Check failure on line 32 in src/Repository/OrderItemRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Call to an undefined method BitBag\SyliusElasticsearchPlugin\Repository\OrderItemRepositoryInterface|Doctrine\ORM\EntityRepository::createQueryBuilder().
->createQueryBuilder('oi')
->select('SUM(oi.quantity)')
->join('oi.order', 'o')
Expand Down
16 changes: 6 additions & 10 deletions src/Repository/ProductAttributeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace BitBag\SyliusElasticsearchPlugin\Repository;

use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\QueryBuilder;
use Sylius\Component\Resource\Repository\RepositoryInterface;

class ProductAttributeRepository implements ProductAttributeRepositoryInterface
Expand All @@ -24,11 +24,10 @@ public function __construct(

public function getAttributeTypeByName(string $attributeName): string
{
/** @var EntityRepository $queryBuilder */
$queryBuilder = $this->productAttributeRepository;
/** @var QueryBuilder $queryBuilder */
$queryBuilder = $this->productAttributeRepository->createQueryBuilder('p');

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 28 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

$result = $queryBuilder
->createQueryBuilder('p')
->select('p.type')
->where('p.code = :code')
->setParameter(':code', $attributeName)
Expand All @@ -40,24 +39,21 @@ public function getAttributeTypeByName(string $attributeName): string

public function findAllWithTranslations(?string $locale): array
{
/** @var EntityRepository $queryBuilder */
$queryBuilder = $this->productAttributeRepository;
/** @var QueryBuilder $queryBuilder */
$queryBuilder = $this->productAttributeRepository->createQueryBuilder('o');

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^5.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

Check failure on line 43 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Call to an undefined method Sylius\Component\Resource\Repository\RepositoryInterface::createQueryBuilder().

if (null !== $locale) {
$queryBuilder
->createQueryBuilder('o')
->addSelect('translation')
/** @phpstan-ignore-next-line */
->leftJoin('o.translations', 'translation', 'ot')

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^5.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^5.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^5.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^5.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^5.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^5.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^5.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^5.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^5.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^5.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^5.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^5.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.

Check failure on line 48 in src/Repository/ProductAttributeRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Parameter #3 $conditionType of method Doctrine\ORM\QueryBuilder::leftJoin() expects 'ON'|'WITH'|null, 'ot' given.
->andWhere('translation.locale = :locale')
->setParameter('locale', $locale)
;
}

return $queryBuilder
->createQueryBuilder('o')
->getQuery()
->getResult()
;
;
}
}
10 changes: 2 additions & 8 deletions src/Repository/ProductAttributeValueRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

namespace BitBag\SyliusElasticsearchPlugin\Repository;

use Doctrine\ORM\EntityRepository;
use Sylius\Component\Attribute\Model\AttributeInterface;
use Sylius\Component\Product\Repository\ProductAttributeValueRepositoryInterface as BaseAttributeValueRepositoryInterface;
use Sylius\Component\Taxonomy\Model\Taxon;
Expand All @@ -27,31 +26,26 @@ public function __construct(

public function getUniqueAttributeValues(AttributeInterface $productAttribute, Taxon $taxon): array
{
/** @var EntityRepository $queryBuilder */
$queryBuilder = $this->baseAttributeValueRepository;
$queryBuilder = $this->baseAttributeValueRepository->createQueryBuilder('o');

Check failure on line 29 in src/Repository/ProductAttributeValueRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Call to an undefined method Sylius\Component\Product\Repository\ProductAttributeValueRepositoryInterface::createQueryBuilder().

Check failure on line 29 in src/Repository/ProductAttributeValueRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Call to an undefined method Sylius\Component\Product\Repository\ProductAttributeValueRepositoryInterface::createQueryBuilder().

Check failure on line 29 in src/Repository/ProductAttributeValueRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.1, Symfony ^6.4

Call to an undefined method Sylius\Component\Product\Repository\ProductAttributeValueRepositoryInterface::createQueryBuilder().

Check failure on line 29 in src/Repository/ProductAttributeValueRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.1, Symfony ^6.4

Call to an undefined method Sylius\Component\Product\Repository\ProductAttributeValueRepositoryInterface::createQueryBuilder().

Check failure on line 29 in src/Repository/ProductAttributeValueRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Call to an undefined method Sylius\Component\Product\Repository\ProductAttributeValueRepositoryInterface::createQueryBuilder().

Check failure on line 29 in src/Repository/ProductAttributeValueRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Call to an undefined method Sylius\Component\Product\Repository\ProductAttributeValueRepositoryInterface::createQueryBuilder().

Check failure on line 29 in src/Repository/ProductAttributeValueRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.2, Symfony ^6.4

Call to an undefined method Sylius\Component\Product\Repository\ProductAttributeValueRepositoryInterface::createQueryBuilder().

Check failure on line 29 in src/Repository/ProductAttributeValueRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Call to an undefined method Sylius\Component\Product\Repository\ProductAttributeValueRepositoryInterface::createQueryBuilder().

Check failure on line 29 in src/Repository/ProductAttributeValueRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Call to an undefined method Sylius\Component\Product\Repository\ProductAttributeValueRepositoryInterface::createQueryBuilder().

Check failure on line 29 in src/Repository/ProductAttributeValueRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.2, Symfony ^6.4

Call to an undefined method Sylius\Component\Product\Repository\ProductAttributeValueRepositoryInterface::createQueryBuilder().

Check failure on line 29 in src/Repository/ProductAttributeValueRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.13, PHP 8.3, Symfony ^6.4

Call to an undefined method Sylius\Component\Product\Repository\ProductAttributeValueRepositoryInterface::createQueryBuilder().

Check failure on line 29 in src/Repository/ProductAttributeValueRepository.php

View workflow job for this annotation

GitHub Actions / Sylius ^1.12, PHP 8.3, Symfony ^6.4

Call to an undefined method Sylius\Component\Product\Repository\ProductAttributeValueRepositoryInterface::createQueryBuilder().

/** @var string|null $storageType */
$storageType = $productAttribute->getStorageType();

$queryBuilder
->createQueryBuilder('o')
->join('o.subject', 'p', 'WITH', 'p.enabled = 1')
->join('p.productTaxons', 't', 'WITH', 't.product = p.id')
->select('o.localeCode, o.' . $storageType . ' as value')
->andWhere('t.taxon = :taxon');

if (true === $this->includeAllDescendants) {
$queryBuilder
->createQueryBuilder('o')
->innerJoin('t.taxon', 'taxon')
$queryBuilder->innerJoin('t.taxon', 'taxon')
->orWhere('taxon.left >= :taxonLeft and taxon.right <= :taxonRight and taxon.root = :taxonRoot')
->setParameter('taxonLeft', $taxon->getLeft())
->setParameter('taxonRight', $taxon->getRight())
->setParameter('taxonRoot', $taxon->getRoot());
}

return $queryBuilder
->createQueryBuilder('o')
->andWhere('o.attribute = :attribute')
->groupBy('o.' . $storageType)
->addGroupBy('o.localeCode')
Expand Down
11 changes: 4 additions & 7 deletions src/Repository/ProductOptionRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace BitBag\SyliusElasticsearchPlugin\Repository;

use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\QueryBuilder;
use Sylius\Component\Resource\Repository\RepositoryInterface;

class ProductOptionRepository implements ProductOptionRepositoryInterface
Expand All @@ -24,24 +24,21 @@ public function __construct(

public function findAllWithTranslations(?string $locale): array
{
/** @var EntityRepository $queryBuilder */
$queryBuilder = $this->productOptionRepository;
/** @var QueryBuilder $queryBuilder */
$queryBuilder = $this->productOptionRepository->createQueryBuilder('o');

if (null !== $locale) {
$queryBuilder
->createQueryBuilder('o')
->addSelect('translation')
/** @phpstan-ignore-next-line */
->leftJoin('o.translations', 'translation', 'ot')
->andWhere('translation.locale = :locale')
->setParameter('locale', $locale)
;
}

return $queryBuilder
->createQueryBuilder('o')
->getQuery()
->getResult()
;
;
}
}
14 changes: 4 additions & 10 deletions src/Repository/ProductVariantRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,22 @@ public function __construct(

public function findOneByOptionValue(ProductOptionValueInterface $productOptionValue): ?ProductVariantInterface
{
/** @var EntityRepository $baseProductVariantRepository */
$baseProductVariantRepository = $this->baseProductVariantRepository;

return $baseProductVariantRepository->createQueryBuilder('o')
return $this->baseProductVariantRepository->createQueryBuilder('o')
->where(':optionValue MEMBER OF o.optionValues')
->setParameter('optionValue', $productOptionValue)
->getQuery()
->setMaxResults(1)
->getOneOrNullResult()
;
;
}

public function findByOptionValue(ProductOptionValueInterface $productOptionValue): array
{
/** @var EntityRepository $baseProductVariantRepository */
$baseProductVariantRepository = $this->baseProductVariantRepository;

return $baseProductVariantRepository->createQueryBuilder('o')
return $this->baseProductVariantRepository->createQueryBuilder('o')
->where(':optionValue MEMBER OF o.optionValues')
->setParameter('optionValue', $productOptionValue)
->getQuery()
->getResult()
;
;
}
}
14 changes: 4 additions & 10 deletions src/Repository/TaxonRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,15 @@ public function __construct(

public function getTaxonsByAttributeViaProduct(AttributeInterface $attribute): array
{
/** @var EntityRepository $baseTaxonRepository */
$baseTaxonRepository = $this->baseTaxonRepository;

/** @var EntityRepository $productRepository */
$productRepository = $this->productRepository;

return $baseTaxonRepository
return $this->baseTaxonRepository
->createQueryBuilder('t')
->distinct(true)
->select('t')
->leftJoin($this->productTaxonEntityClass, 'pt', Join::WITH, 'pt.taxon = t.id')
->where(
'pt.product IN(' .
$productRepository
->createQueryBuilder('p')
$this
->productRepository->createQueryBuilder('p')
->leftJoin($this->productAttributeEntityClass, 'pav', Join::WITH, 'pav.subject = p.id')
->where('pav.attribute = :attribute')
->getQuery()
Expand All @@ -54,6 +48,6 @@ public function getTaxonsByAttributeViaProduct(AttributeInterface $attribute): a
->setParameter(':attribute', $attribute)
->getQuery()
->getResult()
;
;
}
}

0 comments on commit 0e32bee

Please sign in to comment.