File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 7070use PhpSchool \PhpWorkshop \Output \OutputInterface ;
7171use PhpSchool \PhpWorkshop \Output \StdOutput ;
7272use PhpSchool \PhpWorkshop \Patch ;
73+ use PhpSchool \PhpWorkshop \Process \DockerProcessFactory ;
7374use PhpSchool \PhpWorkshop \Process \HostProcessFactory ;
7475use PhpSchool \PhpWorkshop \Process \ProcessFactory ;
7576use PhpSchool \PhpWorkshop \Result \Cgi \CgiResult ;
208209 },
209210
210211 ProcessFactory::class => function (ContainerInterface $ c ) {
211- return new HostProcessFactory ();
212+ $ processFactory = $ _ENV ['process_factory ' ] ?? null ;
213+
214+ return match ($ processFactory ) {
215+ 'docker ' => new DockerProcessFactory (
216+ $ c ->get ('basePath ' ),
217+ $ c ->get ('appName ' ),
218+ $ c ->get ('phpschoolGlobalDir ' ) . '/composer-cache ' ,
219+ ),
220+ default => new HostProcessFactory (),
221+ };
212222 },
213223
214224 //commands
You can’t perform that action at this time.
0 commit comments