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

api-platform / core / 18089958695

29 Sep 2025 07:57AM UTC coverage: 21.569% (-0.2%) from 21.797%
18089958695

push

github

web-flow
fix(openapi): define items type for HydraCollectionBaseSchema hydra:member (#7419)

Co-authored-by: Thibaut Cholley <thibaut.cholley@elsie-sante.fr>

0 of 1 new or added line in 1 file covered. (0.0%)

12063 existing lines in 401 files now uncovered.

11765 of 54545 relevant lines covered (21.57%)

12.57 hits per line

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

100.0
/src/Symfony/Bundle/DependencyInjection/Compiler/MetadataAwareNameConverterPass.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\Symfony\Bundle\DependencyInjection\Compiler;
15

16
use ApiPlatform\Metadata\Exception\RuntimeException;
17
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
18
use Symfony\Component\DependencyInjection\ContainerBuilder;
19
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
20
use Symfony\Component\DependencyInjection\Reference;
21

22
/**
23
 * Injects the metadata aware name converter if available.
24
 *
25
 * @internal
26
 *
27
 * @author Antoine Bluchet <soyuka@gmail.com>
28
 */
29
final class MetadataAwareNameConverterPass implements CompilerPassInterface
30
{
31
    /**
32
     * {@inheritdoc}
33
     *
34
     * @throws RuntimeException
35
     * @throws InvalidArgumentException
36
     */
37
    public function process(ContainerBuilder $container): void
38
    {
UNCOV
39
        if (!$container->hasDefinition('serializer.name_converter.metadata_aware')) {
5✔
UNCOV
40
            return;
1✔
41
        }
42

UNCOV
43
        if ($container->hasAlias('api_platform.name_converter')) {
4✔
UNCOV
44
            $nameConverter = (string) $container->getAlias('api_platform.name_converter');
3✔
45

UNCOV
46
            $container->setParameter('.serializer.name_converter', $nameConverter);
3✔
UNCOV
47
            $container->getDefinition('serializer.name_converter.metadata_aware')->setArgument(1, new Reference($nameConverter));
3✔
48
        }
49

UNCOV
50
        $container->setAlias('api_platform.name_converter', 'serializer.name_converter.metadata_aware');
4✔
51
    }
52
}
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