private function loadPathMappings() { $this->overrideGraph = OverrideGraph::forPackages($this->packages); $this->conflictDetector = new PackageConflictDetector($this->overrideGraph); $this->mappings = new PathMappingCollection(); $this->mappingsByResource = new PathMappingCollection(); $this->conflicts = new ConflictCollection(); // Load mappings foreach ($this->packages as $package) { foreach ($package->getPackageFile()->getPathMappings() as $mapping) { $this->loadPathMapping($mapping, $package)->execute(); } } // Scan all paths for conflicts $this->updateConflicts($this->mappingsByResource->getRepositoryPaths())->execute(); }
private function loadPathMappings() { $this->overrideGraph = DependencyGraph::forModules($this->modules); $this->conflictDetector = new ModuleConflictDetector($this->overrideGraph); $this->mappings = new PathMappingCollection(); $this->mappingsByResource = new PathMappingCollection(); $this->conflicts = new ConflictCollection(); // Load mappings foreach ($this->modules as $module) { if (null === $module->getModuleFile()) { continue; } foreach ($module->getModuleFile()->getPathMappings() as $mapping) { $this->loadPathMapping($mapping, $module)->execute(); } } // Scan all paths for conflicts $this->updateConflicts($this->mappingsByResource->getRepositoryPaths())->execute(); }