File tree 2 files changed +5
-6
lines changed
2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -73,11 +73,6 @@ public function boot()
73
73
if ($ trustedHosts = $ this ->container ->getParameter ('kernel.trusted_hosts ' )) {
74
74
Request::setTrustedHosts ($ trustedHosts );
75
75
}
76
-
77
- if ($ this ->container ->has ('mime_types ' )) {
78
- $ mt = $ this ->container ->get ('mime_types ' );
79
- $ mt ->setDefault ($ mt );
80
- }
81
76
}
82
77
83
78
public function build (ContainerBuilder $ container )
Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ public function __construct(array $map = [])
45
45
}
46
46
$ this ->registerGuesser (new FileBinaryMimeTypeGuesser ());
47
47
$ this ->registerGuesser (new FileinfoMimeTypeGuesser ());
48
+
49
+ if (null === self ::$ default ) {
50
+ self ::$ default = $ this ;
51
+ }
48
52
}
49
53
50
54
public static function setDefault (self $ default )
@@ -54,7 +58,7 @@ public static function setDefault(self $default)
54
58
55
59
public static function getDefault (): self
56
60
{
57
- return self ::$ default ?? self :: $ default = new self () ;
61
+ return self ::$ default ;
58
62
}
59
63
60
64
/**
You can’t perform that action at this time.
0 commit comments