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

liip / LiipImagineBundle / 20715589528

05 Jan 2026 12:35PM UTC coverage: 79.5% (-2.1%) from 81.603%
20715589528

Pull #1645

github

web-flow
Merge 186422567 into dec6314bf
Pull Request #1645: Add AssetMapper support

9 of 35 new or added lines in 3 files covered. (25.71%)

18 existing lines in 5 files now uncovered.

2164 of 2722 relevant lines covered (79.5%)

90.02 hits per line

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

57.14
/DependencyInjection/Factory/Loader/AssetMapperLoaderFactory.php
1
<?php
2

3
/*
4
 * This file is part of the `liip/LiipImagineBundle` project.
5
 *
6
 * (c) https://github.com/liip/LiipImagineBundle/graphs/contributors
7
 *
8
 * For the full copyright and license information, please view the LICENSE.md
9
 * file that was distributed with this source code.
10
 */
11

12
namespace Liip\ImagineBundle\DependencyInjection\Factory\Loader;
13

14
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
15
use Symfony\Component\DependencyInjection\ChildDefinition;
16
use Symfony\Component\DependencyInjection\ContainerBuilder;
17
use Symfony\Component\DependencyInjection\Reference;
18

19
class AssetMapperLoaderFactory extends AbstractLoaderFactory
20
{
21
        public function create(ContainerBuilder $container, $loaderName, array $config)
22
        {
23
                $locatorDefinition = new ChildDefinition('liip_imagine.binary.locator.asset_mapper');
11✔
24
                $locatorDefinition->replaceArgument(0, new Reference('asset_mapper'));
11✔
25
                $locatorDefinition->replaceArgument(1, new Reference('cache.asset_mapper'));
11✔
26

27
                $definition = $this->getChildLoaderDefinition('filesystem');
11✔
28

29
                if ($container->hasDefinition('liip_imagine.mime_types')) {
11✔
NEW
30
                        $mimeTypes = $container->getDefinition('liip_imagine.mime_types');
×
NEW
31
                        $definition->replaceArgument(0, $mimeTypes);
×
NEW
32
                        $definition->replaceArgument(1, $mimeTypes);
×
33
                }
34
                $definition->replaceArgument(2, $locatorDefinition);
11✔
35

36
                return $this->setTaggedLoaderDefinition($loaderName, $definition, $container);
11✔
37
        }
38

39
        public function getName()
40
        {
41
                return 'asset_mapper';
11✔
42
        }
43

44
        public function addConfiguration(ArrayNodeDefinition $builder)
45
        {
NEW
46
                $builder
×
NEW
47
                        ->children()
×
NEW
48
                        ->end();
×
49
        }
50
}
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