minor #37200 [FrameworkBundle] Convert config/mime_type.xml to .php (GromNaN)
This PR was merged into the 5.2-dev branch.
Discussion
----------
[FrameworkBundle] Convert config/mime_type.xml to .php
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Ref #37186
| License | MIT
Commits
-------
fa92490fcb
Convert config/mime_type.xml into mime_type.php
This commit is contained in:
commit
1b086eefb0
@ -410,7 +410,7 @@ class FrameworkExtension extends Extension
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
if (class_exists(MimeTypes::class)) {
|
if (class_exists(MimeTypes::class)) {
|
||||||
$loader->load('mime_type.xml');
|
$phpLoader->load('mime_type.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
$container->registerForAutoconfiguration(Command::class)
|
$container->registerForAutoconfiguration(Command::class)
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Symfony package.
|
||||||
|
*
|
||||||
|
* (c) Fabien Potencier <fabien@symfony.com>
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
|
||||||
|
|
||||||
|
use Symfony\Component\Mime\MimeTypes;
|
||||||
|
|
||||||
|
return static function (ContainerConfigurator $container) {
|
||||||
|
$container->services()
|
||||||
|
->set('mime_types', MimeTypes::class)
|
||||||
|
->call('setDefault', [service('mime_types')])
|
||||||
|
;
|
||||||
|
};
|
@ -1,16 +0,0 @@
|
|||||||
<?xml version="1.0" ?>
|
|
||||||
|
|
||||||
<container xmlns="http://symfony.com/schema/dic/services"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">
|
|
||||||
|
|
||||||
<services>
|
|
||||||
<defaults public="false" />
|
|
||||||
|
|
||||||
<service id="mime_types" class="Symfony\Component\Mime\MimeTypes">
|
|
||||||
<call method="setDefault">
|
|
||||||
<argument type="service" id="mime_types" />
|
|
||||||
</call>
|
|
||||||
</service>
|
|
||||||
</services>
|
|
||||||
</container>
|
|
Reference in New Issue
Block a user