Skip to content

Commit

Permalink
DerivativeContainerFactory - pass all arguments to the derived container
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Nov 2, 2021
1 parent e5f8e72 commit f28c7e9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
3 changes: 3 additions & 0 deletions conf/config.neon
Expand Up @@ -503,6 +503,9 @@ services:
analysedPathsFromConfig: %analysedPathsFromConfig%
usedLevel: %usedLevel%
generateBaselineFile: %generateBaselineFile%
cliAutoloadFile: %cliAutoloadFile%
singleReflectionFile: %singleReflectionFile%
singleReflectionInsteadOfFile: %singleReflectionInsteadOfFile%

-
class: PHPStan\DependencyInjection\Reflection\ClassReflectionExtensionRegistryProvider
Expand Down
19 changes: 17 additions & 2 deletions src/DependencyInjection/DerivativeContainerFactory.php
Expand Up @@ -25,6 +25,12 @@ class DerivativeContainerFactory

private ?string $generateBaselineFile;

private ?string $cliAutoloadFile;

private ?string $singleReflectionFile;

private ?string $singleReflectionInsteadOfFile;

/**
* @param string $currentWorkingDirectory
* @param string $tempDirectory
Expand All @@ -42,7 +48,10 @@ public function __construct(
array $composerAutoloaderProjectPaths,
array $analysedPathsFromConfig,
string $usedLevel,
?string $generateBaselineFile
?string $generateBaselineFile,
?string $cliAutoloadFile,
?string $singleReflectionFile,
?string $singleReflectionInsteadOfFile
)
{
$this->currentWorkingDirectory = $currentWorkingDirectory;
Expand All @@ -53,6 +62,9 @@ public function __construct(
$this->analysedPathsFromConfig = $analysedPathsFromConfig;
$this->usedLevel = $usedLevel;
$this->generateBaselineFile = $generateBaselineFile;
$this->cliAutoloadFile = $cliAutoloadFile;
$this->singleReflectionFile = $singleReflectionFile;
$this->singleReflectionInsteadOfFile = $singleReflectionInsteadOfFile;
}

/**
Expand All @@ -72,7 +84,10 @@ public function create(array $additionalConfigFiles): Container
$this->composerAutoloaderProjectPaths,
$this->analysedPathsFromConfig,
$this->usedLevel,
$this->generateBaselineFile
$this->generateBaselineFile,
$this->cliAutoloadFile,
$this->singleReflectionFile,
$this->singleReflectionInsteadOfFile
);
}

Expand Down

0 comments on commit f28c7e9

Please sign in to comment.