Skip to content

Commit 30d824f

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: Fill out custom type guesser paragraph
2 parents fa741c2 + 081be3b commit 30d824f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

components/mime.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ that extension to improve the guessing performance.
272272
Adding a MIME Type Guesser
273273
..........................
274274

275-
You can register your own MIME type guesser by creating a class that implements
275+
You can add your own MIME type guesser by creating a class that implements
276276
:class:`Symfony\\Component\\Mime\\MimeTypeGuesserInterface`::
277277

278278
namespace App;
@@ -296,6 +296,12 @@ You can register your own MIME type guesser by creating a class that implements
296296
}
297297
}
298298

299+
MIME type guessers must be :ref:`registered as services <service-container-creating-service>`
300+
and :doc:`tagged </service_container/tags>` with the ``mime.mime_type_guesser`` tag.
301+
If you're using the
302+
:ref:`default services.yaml configuration <service-container-services-load-example>`,
303+
this is already done for you, thanks to :ref:`autoconfiguration <services-autoconfigure>`.
304+
299305
.. _`MIME`: https://en.wikipedia.org/wiki/MIME
300306
.. _`MIME types`: https://en.wikipedia.org/wiki/Media_type
301307
.. _`fileinfo extension`: https://www.php.net/fileinfo

0 commit comments

Comments
 (0)