Skip to content

Commit 7c73622

Browse files
committed
chore: Update .php-cs-fixer.php and composer-updater
- Update .php-cs-fixer.php - Add space before parenthesis in class_definition - Update composer-updater - Import InstalledVersions from Composer - Add use statement for ExecutableFinder - Increase timeout to 300 seconds
1 parent 1f57fca commit 7c73622

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.php-cs-fixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@
335335

336336
'class_definition' => [
337337
'inline_constructor_arguments' => false,
338+
'space_before_parenthesis' => true,
338339
],
339340

340341
// https://github.com/kubawerlos/php-cs-fixer-custom-fixers

composer-updater

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ declare(strict_types=1);
1111
* This source file is subject to the MIT license that is bundled.
1212
*/
1313

14+
use Composer\InstalledVersions;
1415
use Symfony\Component\Console\Input\ArgvInput;
1516
use Symfony\Component\Console\Input\InputInterface;
1617
use Symfony\Component\Console\Input\InputOption;
1718
use Symfony\Component\Console\Output\ConsoleOutput;
1819
use Symfony\Component\Console\Output\OutputInterface;
1920
use Symfony\Component\Console\SingleCommandApplication;
2021
use Symfony\Component\Console\Style\SymfonyStyle;
22+
use Symfony\Component\Process\ExecutableFinder;
2123
use Symfony\Component\Process\PhpExecutableFinder;
2224
use Symfony\Component\Process\Process;
2325

@@ -36,7 +38,7 @@ $status = (new SingleCommandApplication)
3638
assert($this instanceof SingleCommandApplication);
3739
assert((bool) $input->getOption('highest-php-binary'));
3840

39-
(new class(
41+
(new class (
4042
$input->getOption('composer-json-path') ?: __DIR__.'/composer.json',
4143
$input->getOption('highest-php-binary'),
4244
$input->getOption('composer-binary'),
@@ -152,7 +154,7 @@ $status = (new SingleCommandApplication)
152154
} else { // 单版本依赖
153155
if (
154156
$this->strIs('*|*', $dependencyVersion)
155-
|| ! ($version = Composer\InstalledVersions::getVersion($package))
157+
|| ! ($version = InstalledVersions::getVersion($package))
156158
) {
157159
continue;
158160
}
@@ -203,7 +205,7 @@ $status = (new SingleCommandApplication)
203205
return sprintf(
204206
'%s %s',
205207
$phpBinary ?? (new PhpExecutableFinder)->find(),
206-
$composerBinary ?? (new Symfony\Component\Process\ExecutableFinder)->find('composer')
208+
$composerBinary ?? (new ExecutableFinder)->find('composer')
207209
);
208210
}
209211

@@ -219,7 +221,7 @@ $status = (new SingleCommandApplication)
219221
?string $cwd = null,
220222
?array $env = null,
221223
$input = null,
222-
?float $timeout = 60
224+
?float $timeout = 300
223225
): Process {
224226
$process = is_string($command)
225227
? Process::fromShellCommandline($command, $cwd, $env, $input, $timeout)

0 commit comments

Comments
 (0)