• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

api-platform / core / 18223414080

03 Oct 2025 01:18PM UTC coverage: 0.0% (-22.0%) from 21.956%
18223414080

Pull #7397

github

web-flow
Merge 69d085182 into 0b8237918
Pull Request #7397: fix(jsonschema/jsonld): make `@id` and `@type` properties required only in the JSON-LD schema for output

0 of 18 new or added lines in 2 files covered. (0.0%)

12304 existing lines in 405 files now uncovered.

0 of 53965 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Doctrine/Orm/Filter/FreeTextQueryFilter.php
1
<?php
2

3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <dunglas@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types=1);
13

14
namespace ApiPlatform\Doctrine\Orm\Filter;
15

16
use ApiPlatform\Doctrine\Common\Filter\LoggerAwareInterface;
17
use ApiPlatform\Doctrine\Common\Filter\LoggerAwareTrait;
18
use ApiPlatform\Doctrine\Common\Filter\ManagerRegistryAwareInterface;
19
use ApiPlatform\Doctrine\Common\Filter\ManagerRegistryAwareTrait;
20
use ApiPlatform\Doctrine\Orm\Util\QueryNameGeneratorInterface;
21
use ApiPlatform\Metadata\BackwardCompatibleFilterDescriptionTrait;
22
use ApiPlatform\Metadata\Operation;
23
use Doctrine\ORM\QueryBuilder;
24

25
final class FreeTextQueryFilter implements FilterInterface, ManagerRegistryAwareInterface, LoggerAwareInterface
26
{
27
    use BackwardCompatibleFilterDescriptionTrait;
28
    use LoggerAwareTrait;
29
    use ManagerRegistryAwareTrait;
30

31
    /**
32
     * @param list<string> $properties an array of properties, defaults to `parameter->getProperties()`
33
     */
34
    public function __construct(private readonly FilterInterface $filter, private readonly ?array $properties = null)
35
    {
UNCOV
36
    }
×
37

38
    public function apply(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, ?Operation $operation = null, array $context = []): void
39
    {
UNCOV
40
        if ($this->filter instanceof ManagerRegistryAwareInterface) {
×
UNCOV
41
            $this->filter->setManagerRegistry($this->getManagerRegistry());
×
42
        }
43

UNCOV
44
        if ($this->filter instanceof LoggerAwareInterface) {
×
UNCOV
45
            $this->filter->setLogger($this->getLogger());
×
46
        }
47

UNCOV
48
        $parameter = $context['parameter'];
×
UNCOV
49
        foreach ($this->properties ?? $parameter->getProperties() ?? [] as $property) {
×
UNCOV
50
            $this->filter->apply(
×
UNCOV
51
                $queryBuilder,
×
UNCOV
52
                $queryNameGenerator,
×
UNCOV
53
                $resourceClass,
×
UNCOV
54
                $operation,
×
UNCOV
55
                ['parameter' => $parameter->withProperty($property)] + $context
×
UNCOV
56
            );
×
57
        }
58
    }
59
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc