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

api-platform / core / 17723449516

15 Sep 2025 05:52AM UTC coverage: 0.0% (-22.6%) from 22.578%
17723449516

Pull #7383

github

web-flow
Merge fa5b61e35 into 949c3c975
Pull Request #7383: fix(metadata): compute isWritable during updates

0 of 6 new or added lines in 4 files covered. (0.0%)

11356 existing lines in 371 files now uncovered.

0 of 48868 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/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')) {
×
UNCOV
40
            return;
×
41
        }
42

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

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

UNCOV
50
        $container->setAlias('api_platform.name_converter', 'serializer.name_converter.metadata_aware');
×
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

© 2025 Coveralls, Inc