File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/Adapters/Symfony/Component/Process Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -79,4 +79,22 @@ public function createNewConsole(): void
79
79
$ options ['bypass_shell ' ] = true ;
80
80
$ optionsReflectionProperty ->setValue ($ this , $ options );
81
81
}
82
+
83
+ /**
84
+ * @param array<mixed> $arguments
85
+ */
86
+ public static function __callStatic (string $ name , array $ arguments ):mixed
87
+ {
88
+ if ($ name === 'fromShellCommandline ' ) {
89
+ $ command = array_shift ($ arguments );
90
+ $ process = new self ([], ...$ arguments ); // @phpstan-ignore-line
91
+ $ processCommandLineProperty = new \ReflectionProperty (SymfonyProcess::class, 'commandline ' );
92
+ $ processCommandLineProperty ->setAccessible (true );
93
+ $ processCommandLineProperty ->setValue ($ process , $ command );
94
+
95
+ return $ process ;
96
+ }
97
+
98
+ return null ;
99
+ }
82
100
}
You can’t perform that action at this time.
0 commit comments