File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public function getDescription():string {
2424 return $ this ->description ;
2525 }
2626
27- public function install (string $ dir ):Process {
27+ public function createProject (string $ dir ):Process {
2828 return new Process (
2929 "composer " ,
3030 "create-project " ,
@@ -33,4 +33,14 @@ public function install(string $dir):Process {
3333 $ dir
3434 );
3535 }
36+
37+ public function updateDependencies (string $ dir ):Process {
38+ $ process = new Process (
39+ "composer " ,
40+ "update " ,
41+ );
42+ $ process ->setExecCwd ($ dir );
43+ return $ process ;
44+ }
45+
3646}
Original file line number Diff line number Diff line change @@ -51,9 +51,18 @@ public function run(?ArgumentValueList $arguments = null):void {
5151 $ this ->writeLine ("Creating project ' $ name' in namespace ' $ namespace' with blueprint ' $ selectedBlueprintTitle'... " );
5252 sleep (1 );
5353
54- $ process = $ selectedBlueprint ->install ($ name );
54+ $ process = $ selectedBlueprint ->createProject ($ name );
55+ $ process ->exec ();
56+
57+ do {
58+ $ this ->write ($ process ->getOutput ());
59+ $ this ->write ($ process ->getErrorOutput (), Stream::ERROR );
60+ usleep (100_000 );
61+ }
62+ while ($ process ->isRunning ());
63+
64+ $ process = $ selectedBlueprint ->updateDependencies ($ name );
5565 $ process ->exec ();
56- $ process ->setBlocking (false );
5766
5867 do {
5968 $ this ->write ($ process ->getOutput ());
You can’t perform that action at this time.
0 commit comments