Completed
Push — master ( 8fe45b...3e4cf7 )
by Jeroen
08:37
created

MediaBundle/Helper/MimeTypeGuesserFactory.php (2 issues)

Upgrade to new PHP Analysis Engine

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\Helper;
4
5
use Kunstmaan\MediaBundle\Helper\File\SVGMimeTypeGuesser;
6
use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser;
7
use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface;
8
9
/**
10
 * @deprecated since KunstmaanMediaBundle 5.7 and will be removed in KunstmaanMediaBundle 6.0. Use the symfony/mime component instead.
11
 */
12
class MimeTypeGuesserFactory implements MimeTypeGuesserFactoryInterface
0 ignored issues
show
Deprecated Code introduced by
The interface Kunstmaan\MediaBundle\He...GuesserFactoryInterface has been deprecated with message: since KunstmaanMediaBundle 5.7 and will be removed in KunstmaanMediaBundle 6.0. Use the symfony/mime component instead.

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
13
{
14
    /**
15
     * Should return a mime type guesser instance, used for file uploads
16
     *
17
     * NOTE: If you override this, you'll probably still have to register the SVGMimeTypeGuesser as last guesser...
18
     *
19
     * @return MimeTypeGuesserInterface
20
     */
21
    public function get()
22
    {
23
        $guesser = MimeTypeGuesser::getInstance();
24
        $guesser->register(new SVGMimeTypeGuesser());
0 ignored issues
show
Deprecated Code introduced by
The class Kunstmaan\MediaBundle\He...File\SVGMimeTypeGuesser has been deprecated with message: this class is deprecated since KunstmaanMediaBundle 5.7 and will be removed in KunstmaanMediaBundle 6.0. Use the "symfony/mime" component instead. Simple Mime type guesser to detect SVG image files, it will test if the file is an XML file and return SVG mime type
if the XML contains a valid SVG namespace...

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
25
26
        return $guesser;
27
    }
28
}
29