File tree 2 files changed +10
-4
lines changed
src/Symfony/Component/DependencyInjection
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -107,12 +107,18 @@ public function dump(array $options = array())
107
107
$ this ->targetDirRegex = null ;
108
108
$ options = array_merge (array (
109
109
'class ' => 'ProjectServiceContainer ' ,
110
- 'base_class ' => ' Container ' ,
110
+ 'base_class ' => null ,
111
111
'namespace ' => '' ,
112
112
'debug ' => true ,
113
113
), $ options );
114
114
115
- $ this ->initializeMethodNamesMap ($ options ['base_class ' ]);
115
+ if (!$ baseClass = $ options ['base_class ' ]) {
116
+ $ baseClass = 'Container ' ;
117
+ } elseif (0 !== strpos ($ baseClass , '\\' )) {
118
+ $ baseClass = sprintf ('%s\%s ' , $ options ['namespace ' ] ? '\\' .$ options ['namespace ' ] : '' , $ baseClass );
119
+ }
120
+
121
+ $ this ->initializeMethodNamesMap ('Container ' === $ baseClass ? Container::class : $ baseClass );
116
122
117
123
$ this ->docStar = $ options ['debug ' ] ? '* ' : '' ;
118
124
@@ -141,7 +147,7 @@ public function dump(array $options = array())
141
147
}
142
148
}
143
149
144
- $ code = $ this ->startClass ($ options ['class ' ], $ options [ ' base_class ' ] , $ options ['namespace ' ]);
150
+ $ code = $ this ->startClass ($ options ['class ' ], $ baseClass , $ options ['namespace ' ]);
145
151
146
152
if ($ this ->container ->isCompiled ()) {
147
153
$ code .= $ this ->addFrozenConstructor ();
Original file line number Diff line number Diff line change 16
16
*
17
17
* @final since Symfony 3.3
18
18
*/
19
- class Container extends AbstractContainer
19
+ class Container extends \ Symfony \ Component \ DependencyInjection \ Dump \ AbstractContainer
20
20
{
21
21
private $ parameters ;
22
22
private $ targetDirs = array ();
You can’t perform that action at this time.
0 commit comments