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

liip / LiipImagineBundle / 8050676635

26 Feb 2024 02:40PM UTC coverage: 80.511%. Remained the same
8050676635

Pull #1570

github

web-flow
Merge ce8d5dc36 into 65613e842
Pull Request #1570: 2 to 3

1764 of 2191 relevant lines covered (80.51%)

77.73 hits per line

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

0.0
/src/DependencyInjection/Compiler/DriverCompilerPass.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\Compiler;
13

14
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
15
use Symfony\Component\DependencyInjection\ContainerBuilder;
16

17
/**
18
 * Give a helpful exception message in case the imagine driver does not exist.
19
 *
20
 * Third parties can provide a driver, and thus we can only validate after the container has been built.
21
 */
22
class DriverCompilerPass extends AbstractCompilerPass
23
{
24
    public function process(ContainerBuilder $container): void
25
    {
26
        $liipImagineDriver = $container->getParameter('liip_imagine.driver_service');
×
27

28
        if (!$container->hasDefinition($liipImagineDriver)) {
×
29
            throw new InvalidConfigurationException(sprintf("Specified driver '%s' is not defined.", $liipImagineDriver));
×
30
        }
31
    }
32
}
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