These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\MediaBundle\DependencyInjection\Compiler; |
||
4 | |||
5 | use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; |
||
6 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
||
7 | |||
8 | /** |
||
9 | * @internal |
||
10 | */ |
||
11 | final class DeprecateClassParametersPass implements CompilerPassInterface |
||
12 | { |
||
13 | 2 | public function process(ContainerBuilder $container) |
|
14 | { |
||
15 | $expectedValues = [ |
||
16 | 2 | 'kunstmaan_media.media_handler.remote_slide.class' => \Kunstmaan\MediaBundle\Helper\RemoteSlide\RemoteSlideHandler::class, |
|
17 | 'kunstmaan_media.media_handler.remote_video.class' => \Kunstmaan\MediaBundle\Helper\RemoteVideo\RemoteVideoHandler::class, |
||
18 | 'kunstmaan_media.media_handler.remote_audio.class' => \Kunstmaan\MediaBundle\Helper\RemoteAudio\RemoteAudioHandler::class, |
||
19 | 'kunstmaan_media.media_handler.image.class' => \Kunstmaan\MediaBundle\Helper\Image\ImageHandler::class, |
||
20 | 'kunstmaan_media.media_handler.file.class' => \Kunstmaan\MediaBundle\Helper\File\FileHandler::class, |
||
21 | 'kunstmaan_media.pdf_transformer.class' => \Kunstmaan\MediaBundle\Helper\Transformer\PdfTransformer::class, |
||
22 | 'kunstmaan_media.media_handler.pdf.class' => \Kunstmaan\MediaBundle\Helper\File\PdfHandler::class, |
||
23 | 'kunstmaan_media.media_manager.class' => \Kunstmaan\MediaBundle\Helper\MediaManager::class, |
||
24 | 'kunstmaan_media.folder_manager.class' => \Kunstmaan\MediaBundle\Helper\FolderManager::class, |
||
25 | 'kunstmaan_media.menu.adaptor.class' => \Kunstmaan\MediaBundle\Helper\Menu\MediaMenuAdaptor::class, |
||
26 | 'kunstmaan_media.listener.doctrine.class' => \Kunstmaan\MediaBundle\EventListener\DoctrineMediaListener::class, |
||
27 | 'kunstmaan_media.form.type.media.class' => \Kunstmaan\MediaBundle\Form\Type\MediaType::class, |
||
28 | 'kunstmaan_media.form.type.iconfont.class' => \Kunstmaan\MediaBundle\Form\Type\IconFontType::class, |
||
29 | 'kunstmaan_media.icon_font_manager.class' => \Kunstmaan\MediaBundle\Helper\IconFont\IconFontManager::class, |
||
30 | 'kunstmaan_media.icon_font.default_loader.class' => \Kunstmaan\MediaBundle\Helper\IconFont\DefaultIconFontLoader::class, |
||
31 | 'kunstmaan_media.media_creator_service.class' => \Kunstmaan\MediaBundle\Helper\Services\MediaCreatorService::class, |
||
32 | 'kunstmaan_media.mimetype_guesser.factory.class' => \Kunstmaan\MediaBundle\Helper\MimeTypeGuesserFactory::class, |
||
33 | 'kunstmaan_media.extension_guesser.factory.class' => \Kunstmaan\MediaBundle\Helper\ExtensionGuesserFactory::class, |
||
34 | 'kunstmaan_media.validator.has_guessable_extension.class' => \Kunstmaan\MediaBundle\Validator\Constraints\HasGuessableExtensionValidator::class, |
||
35 | ]; |
||
36 | |||
37 | 2 | foreach ($expectedValues as $parameter => $expectedValue) { |
|
38 | 2 | if (false === $container->hasParameter($parameter)) { |
|
39 | 2 | continue; |
|
40 | } |
||
41 | |||
42 | 1 | $currentValue = $container->getParameter($parameter); |
|
43 | 1 | if ($currentValue !== $expectedValue) { |
|
44 | 1 | @trigger_error(sprintf('Using the "%s" parameter to change the class of the service definition is deprecated in KunstmaanMediaBundle 5.2 and will be removed in KunstmaanMediaBundle 6.0. Use service decoration or a service alias instead.', $parameter), E_USER_DEPRECATED); |
|
0 ignored issues
–
show
|
|||
45 | } |
||
46 | } |
||
47 | 2 | } |
|
48 | } |
||
49 |
If you suppress an error, we recommend checking for the error condition explicitly: