File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ public static function begin(
177177 $ paths = array_map (static fn (string $ path ): string => $ currentWorkingDirectoryFileHelper ->normalizePath ($ currentWorkingDirectoryFileHelper ->absolutizePath ($ path )), $ paths );
178178
179179 $ analysedPathsFromConfig = [];
180- $ containerFactory = new ContainerFactory ($ currentWorkingDirectory );
180+ $ containerFactory = new ContainerFactory ($ currentWorkingDirectory, true );
181181 $ projectConfig = null ;
182182 if ($ projectConfigFile !== null ) {
183183 if (!is_file ($ projectConfigFile )) {
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class ContainerFactory
4949 private string $ configDirectory ;
5050
5151 /** @api */
52- public function __construct (private string $ currentWorkingDirectory )
52+ public function __construct (private string $ currentWorkingDirectory, private bool $ checkDuplicateFiles = false )
5353 {
5454 $ this ->fileHelper = new FileHelper ($ currentWorkingDirectory );
5555
@@ -235,6 +235,10 @@ private function detectDuplicateIncludedFiles(
235235 return $ normalized ;
236236 }
237237
238+ if (!$ this ->checkDuplicateFiles ) {
239+ return $ normalized ;
240+ }
241+
238242 $ duplicateFiles = array_unique (array_diff_key ($ normalized , $ deduplicated ));
239243
240244 throw new DuplicateIncludedFilesException ($ duplicateFiles );
You can’t perform that action at this time.
0 commit comments