| Conditions | 5 |
| Paths | 3 |
| Total Lines | 28 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function process(ContainerBuilder $container) |
||
| 19 | { |
||
| 20 | // if the old listener is no longer in use |
||
| 21 | if (!$container->hasDefinition('kunstmaan_admin.consolelogger.listener')) { |
||
| 22 | return; |
||
| 23 | } |
||
| 24 | |||
| 25 | $definition = $container->getDefinition('kunstmaan_admin.consolelogger.listener'); |
||
| 26 | |||
| 27 | // if the default setup is in use, the subscriber / listener take care of correctly handling the errors |
||
| 28 | if ( |
||
| 29 | $container->hasParameter('kunstmaan_admin.consoleexception.class') && |
||
| 30 | ConsoleExceptionListener::class === $container->getParameter('kunstmaan_admin.consoleexception.class') && |
||
| 31 | '%kunstmaan_admin.consoleexception.class%' === $definition->getClass() |
||
| 32 | ) { |
||
| 33 | return; |
||
| 34 | } |
||
| 35 | |||
| 36 | // if the listener has been overwritten in any way, a deprecation warning is needed |
||
| 37 | @trigger_error( |
||
|
|
|||
| 38 | sprintf( |
||
| 39 | 'The "%s" is deprecated and replaced by "%s" since KunstmaanAdminBundle 5.1 and will be removed in KunstmaanAdminBundle 6.0.', |
||
| 40 | ConsoleExceptionListener::class, |
||
| 41 | ConsoleExceptionSubscriber::class |
||
| 42 | ), |
||
| 43 | E_USER_DEPRECATED |
||
| 44 | ); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |
If you suppress an error, we recommend checking for the error condition explicitly: