/** * Creates the environment. * * @param string|null $homeDir The path to the home * directory or `null` if * none exists. * @param string $rootDir The path to the project's * root directory. * @param Config $config The configuration. * @param RootPackageFile $rootPackageFile The root package file. * @param ConfigFile $configFile The configuration file or * `null` if none exists. * @param EventDispatcherInterface $dispatcher The event dispatcher. */ public function __construct($homeDir, $rootDir, Config $config, RootPackageFile $rootPackageFile, ConfigFile $configFile = null, EventDispatcherInterface $dispatcher = null) { Assert::directory($rootDir, 'The root directory %s is not a directory.'); parent::__construct($homeDir, $config, $configFile, $dispatcher); $this->rootDir = Path::canonicalize($rootDir); $this->rootPackageFile = $rootPackageFile; }