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

liip / LiipImagineBundle / 20717607934

05 Jan 2026 01:56PM UTC coverage: 79.645% (-0.6%) from 80.201%
20717607934

Pull #1645

github

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

1 of 20 new or added lines in 3 files covered. (5.0%)

2156 of 2707 relevant lines covered (79.65%)

90.45 hits per line

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

0.0
/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
    {
NEW
23
        $locatorDefinition = new ChildDefinition('liip_imagine.binary.locator.asset_mapper');
×
NEW
24
        $locatorDefinition->replaceArgument(0, new Reference('asset_mapper'));
×
25

NEW
26
        $definition = $this->getChildLoaderDefinition('filesystem');
×
27

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

NEW
35
        return $this->setTaggedLoaderDefinition($loaderName, $definition, $container);
×
36
    }
37

38
    public function getName()
39
    {
NEW
40
        return 'asset_mapper';
×
41
    }
42

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