|
13 | 13 |
|
14 | 14 | use Composer\Script\Event; |
15 | 15 | use Ramsey\Dev\LibraryStarterKit\Task\Build; |
16 | | -use ReflectionClass; |
17 | | -use ReflectionMethod; |
18 | | -use ReflectionNamedType; |
19 | 16 | use Symfony\Component\Console\Style\SymfonyStyle; |
20 | 17 | use Symfony\Component\Finder\Finder; |
21 | 18 | use Symfony\Component\Process\Process; |
22 | 19 | use Twig\Environment as TwigEnvironment; |
23 | 20 | use Twig\Loader\FilesystemLoader; |
24 | 21 | use Twig\TwigFilter; |
25 | 22 |
|
26 | | -use function array_map; |
27 | | -use function implode; |
28 | 23 | use function preg_replace; |
29 | 24 |
|
30 | 25 | use const DIRECTORY_SEPARATOR; |
@@ -114,23 +109,6 @@ public function getVerbosity(): int |
114 | 109 | */ |
115 | 110 | public function getProcess(array $command): Process |
116 | 111 | { |
117 | | - // Support backward-compatibility with older versions of symfony/process. |
118 | | - $reflectedProcess = new ReflectionClass(Process::class); |
119 | | - |
120 | | - /** @var ReflectionMethod $reflectedConstructor */ |
121 | | - $reflectedConstructor = $reflectedProcess->getConstructor(); |
122 | | - $reflectedConstructorType = $reflectedConstructor->getParameters()[0]->getType(); |
123 | | - |
124 | | - if ($reflectedConstructorType instanceof ReflectionNamedType) { |
125 | | - if ($reflectedConstructorType->getName() !== 'array') { |
126 | | - $command = implode(' ', array_map('escapeshellarg', $command)); // @codeCoverageIgnore |
127 | | - } |
128 | | - } |
129 | | - |
130 | | - /** |
131 | | - * @psalm-suppress PossiblyInvalidArgument |
132 | | - * @phpstan-ignore-next-line |
133 | | - */ |
134 | 112 | return new Process($command, $this->getProject()->getPath()); |
135 | 113 | } |
136 | 114 |
|
|
0 commit comments