Skip to content

Commit

Permalink
DerivativeContainerFactory - fix missing parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Feb 21, 2020
1 parent f4e7ce8 commit b5ed37b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
3 changes: 3 additions & 0 deletions conf/config.neon
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ services:
tempDirectory: %tempDir%
additionalConfigFiles: %additionalConfigFiles%
analysedPaths: %analysedPaths%
composerAutoloaderProjectPaths: %composerAutoloaderProjectPaths%
analysedPathsFromConfig: %analysedPathsFromConfig%
allConfigFiles: %allConfigFiles%

-
class: PHPStan\DependencyInjection\Reflection\ClassReflectionExtensionRegistryProvider
Expand Down
25 changes: 23 additions & 2 deletions src/DependencyInjection/DerivativeContainerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,41 @@ class DerivativeContainerFactory
/** @var string[] */
private $analysedPaths;

/** @var string[] */
private $composerAutoloaderProjectPaths;

/** @var string[] */
private $analysedPathsFromConfig;

/** @var string[] */
private $allConfigFiles;

/**
* @param string $currentWorkingDirectory
* @param string $tempDirectory
* @param string[] $additionalConfigFiles
* @param string[] $analysedPaths
* @param string[] $composerAutoloaderProjectPaths
* @param string[] $analysedPathsFromConfig
* @param string[] $allConfigFiles
*/
public function __construct(
string $currentWorkingDirectory,
string $tempDirectory,
array $additionalConfigFiles,
array $analysedPaths
array $analysedPaths,
array $composerAutoloaderProjectPaths,
array $analysedPathsFromConfig,
array $allConfigFiles
)
{
$this->currentWorkingDirectory = $currentWorkingDirectory;
$this->tempDirectory = $tempDirectory;
$this->additionalConfigFiles = $additionalConfigFiles;
$this->analysedPaths = $analysedPaths;
$this->composerAutoloaderProjectPaths = $composerAutoloaderProjectPaths;
$this->analysedPathsFromConfig = $analysedPathsFromConfig;
$this->allConfigFiles = $allConfigFiles;
}

/**
Expand All @@ -49,7 +67,10 @@ public function create(array $additionalConfigFiles): Container
return $containerFactory->create(
$this->tempDirectory,
array_merge($this->additionalConfigFiles, $additionalConfigFiles),
$this->analysedPaths
$this->analysedPaths,
$this->composerAutoloaderProjectPaths,
$this->analysedPathsFromConfig,
$this->allConfigFiles
);
}

Expand Down

0 comments on commit b5ed37b

Please sign in to comment.