Permalink
Browse files

Merge branch '3.4'

* 3.4:
  [DI] Fix dumping with custom base class
  fixed typo
  [HttpFoundation] Add test
  [HttpFoundation] Fix session-related BC break
  [Process] Workaround PHP bug #75515 in ProcessTest::testSimpleInputStream()
  [FrameworkBundle] Wire the translation.reader service instead of deprecated translation.loader in commands
  fix method name
  • Loading branch information...
2 parents 55d1d00 + 578f167 commit ad1a3c096cd11c7bab5f0ae0e38a9805b235f4e6 @nicolas-grekas nicolas-grekas committed Nov 13, 2017
Showing with 8 additions and 3 deletions.
  1. +7 −2 Dumper/PhpDumper.php
  2. +1 −1 Tests/Fixtures/php/services1-1.php
View
@@ -127,7 +127,12 @@ public function dump(array $options = array())
$this->asFiles = $options['as_files'];
$this->hotPathTag = $options['hot_path_tag'];
$this->inlineRequires = $this->container->hasParameter($options['inline_class_loader_parameter']) && $this->container->getParameter($options['inline_class_loader_parameter']);
- $this->initializeMethodNamesMap($options['base_class']);
+
+ if (0 !== strpos($baseClass = $options['base_class'], '\\') && 'Container' !== $baseClass) {
+ $baseClass = sprintf('%s\%s', $options['namespace'] ? '\\'.$options['namespace'] : '', $baseClass);
+ }
+
+ $this->initializeMethodNamesMap('Container' === $baseClass ? Container::class : $baseClass);
$this->docStar = $options['debug'] ? '*' : '';
@@ -157,7 +162,7 @@ public function dump(array $options = array())
}
$code =
- $this->startClass($options['class'], $options['base_class']).
+ $this->startClass($options['class'], $baseClass).
$this->addServices().
$this->addDefaultParametersMethod().
$this->endClass()
@@ -16,7 +16,7 @@
*
* @final since Symfony 3.3
*/
-class Container extends AbstractContainer
+class Container extends \Symfony\Component\DependencyInjection\Dump\AbstractContainer
{
private $parameters;
private $targetDirs = array();

0 comments on commit ad1a3c0

Please sign in to comment.