Skip to content

Commit 5240c6f

Browse files
committed
Convert config/mime_type.xml into mime_type.php
1 parent 8692d14 commit 5240c6f

File tree

3 files changed

+22
-17
lines changed

3 files changed

+22
-17
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ public function load(array $configs, ContainerBuilder $container)
410410
]);
411411

412412
if (class_exists(MimeTypes::class)) {
413-
$loader->load('mime_type.xml');
413+
$phpLoader->load('mime_type.php');
414414
}
415415

416416
$container->registerForAutoconfiguration(Command::class)

Resources/config/mime_type.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
13+
14+
use Symfony\Component\Mime\MimeTypes;
15+
16+
return static function (ContainerConfigurator $container) {
17+
$container->services()
18+
->set('mime_types', MimeTypes::class)
19+
->call('setDefault', [service('mime_types')])
20+
;
21+
};

Resources/config/mime_type.xml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)