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 70
70
use PhpSchool \PhpWorkshop \Output \OutputInterface ;
71
71
use PhpSchool \PhpWorkshop \Output \StdOutput ;
72
72
use PhpSchool \PhpWorkshop \Patch ;
73
+ use PhpSchool \PhpWorkshop \Process \DockerProcessFactory ;
73
74
use PhpSchool \PhpWorkshop \Process \HostProcessFactory ;
74
75
use PhpSchool \PhpWorkshop \Process \ProcessFactory ;
75
76
use PhpSchool \PhpWorkshop \Result \Cgi \CgiResult ;
208
209
},
209
210
210
211
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
+ };
212
222
},
213
223
214
224
//commands
You can’t perform that action at this time.
0 commit comments