Conditions | 6 |
Paths | 6 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function process(ContainerBuilder $container) |
||
17 | { |
||
18 | // only needed if kernel.root_dir is no longer present |
||
19 | if ($container->hasParameter('kernel.root_dir')) { |
||
20 | return; |
||
21 | } |
||
22 | |||
23 | $filterSets = $container->getParameter('liip_imagine.filter_sets'); |
||
24 | foreach ($filterSets as $filterSet) { |
||
25 | foreach ($filterSet['filters'] as $filterName => $filter) { |
||
26 | if ($filter === 'paste') { |
||
27 | throw new \InvalidArgumentException(sprintf('The "paste" filter no longer works in Symfony 5.0. Please use "paste_image" and adapt the "image" to be relative to the "%kernel.project_dir%" instead of "%kernel.root_dir%".')); |
||
28 | } |
||
29 | |||
30 | if ($filter === 'watermark') { |
||
31 | throw new \InvalidArgumentException(sprintf('The "paste" filter no longer works in Symfony 5.0. Please use "paste_image" and adapt the "image" to be relative to the "%kernel.project_dir%" instead of "%kernel.root_dir%".')); |
||
32 | } |
||
33 | } |
||
34 | } |
||
35 | } |
||
36 | } |