Skip to content

Commit 19b9aea

Browse files
committed
Bump dependencies
1 parent 0a2e97e commit 19b9aea

12 files changed

+242
-212
lines changed

composer.lock

+202-196
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/Process/ProcessBuilderSpec.php

+11
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ public function getMatchers(): array
8484
{
8585
return [
8686
'beQuoted' => function ($subject, $string) {
87+
if ('\\' === DIRECTORY_SEPARATOR) {
88+
if ($subject !== $string) {
89+
throw new FailureException(sprintf(
90+
'Expected %s, got %s.',
91+
$string,
92+
$subject
93+
));
94+
}
95+
return true;
96+
}
97+
8798
$regex = sprintf('{^([\'"])%s\1$}', preg_quote($string));
8899
if (!preg_match($regex, $subject)) {
89100
throw new FailureException(sprintf(

spec/Process/ProcessFactorySpec.php

+11
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ public function getMatchers(): array
4242
{
4343
return [
4444
'beQuoted' => function ($subject, $string) {
45+
if ('\\' === DIRECTORY_SEPARATOR) {
46+
if ($subject !== $string) {
47+
throw new FailureException(sprintf(
48+
'Expected %s, got %s.',
49+
$string,
50+
$subject
51+
));
52+
}
53+
return true;
54+
}
55+
4556
$regex = sprintf('{^([\'"])%s\1$}', preg_quote($string));
4657
if (!preg_match($regex, $subject)) {
4758
throw new FailureException(sprintf(

src/Configuration/Loader/DistFileLoader.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ public function __construct(LoaderInterface $loader)
1818
$this->loader = $loader;
1919
}
2020

21-
public function load(mixed $resource, string $type = null): mixed
21+
public function load(mixed $resource, ?string $type = null): mixed
2222
{
2323
return $this->loader->load($resource, $type);
2424
}
2525

26-
public function supports(mixed $resource, string $type = null): bool
26+
public function supports(mixed $resource, ?string $type = null): bool
2727
{
2828
if (!\is_string($resource)) {
2929
return false;

src/Console/Command/ConfigureCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ protected function buildConfiguration(InputInterface $input, OutputInterface $ou
147147
];
148148
}
149149

150-
protected function createQuestionString(string $question, string $default = null, string $separator = ':'): string
150+
protected function createQuestionString(string $question, ?string $default = null, string $separator = ':'): string
151151
{
152152
return null !== $default ?
153153
sprintf('<fg=green>%s</fg=green> [<fg=yellow>%s</fg=yellow>]%s ', $question, $default, $separator) :

src/Event/Dispatcher/Bridge/SymfonyEventDispatcher.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct($eventDispatcher)
2424
$this->dispatcher = $eventDispatcher;
2525
}
2626

27-
public function dispatch(Event $event, string $name = null): void
27+
public function dispatch(Event $event, ?string $name = null): void
2828
{
2929
$interfacesImplemented = class_implements($this->dispatcher);
3030
if (in_array(SymfonyEventDispatcherContract::class, $interfacesImplemented, true)) {

src/Event/Dispatcher/EventDispatcherInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88

99
interface EventDispatcherInterface
1010
{
11-
public function dispatch(Event $event, string $name = null): void;
11+
public function dispatch(Event $event, ?string $name = null): void;
1212
}

src/Parser/Php/Configurator/TraverserConfigurator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function registerVisitorId(string $alias, string $visitorId): void
6161
/**
6262
* @throws \GrumPHP\Exception\RuntimeException
6363
*/
64-
public function registerStandardEnabledVisitor(string $alias, array $visitorOptions = null): void
64+
public function registerStandardEnabledVisitor(string $alias, ?array $visitorOptions = null): void
6565
{
6666
if (array_key_exists($alias, $this->standardEnabledVisitors)) {
6767
throw new RuntimeException(

src/Process/ProcessBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct(ExternalCommand $externalCommandLocator, IOInterface
4141
*/
4242
public function createArgumentsForCommand(
4343
string $command,
44-
callable $pathManipulator = null
44+
?callable $pathManipulator = null
4545
): ProcessArgumentsCollection {
4646
$executable = $this->externalCommandLocator->locate($command);
4747
$manipulatedExecutable = $pathManipulator ? $pathManipulator($executable) : $executable;

src/Runner/TaskRunnerContext.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class TaskRunnerContext
4343
*/
4444
public function __construct(
4545
ContextInterface $taskContext,
46-
TestSuiteInterface $testSuite = null,
46+
?TestSuiteInterface $testSuite = null,
4747
array $taskNames = []
4848
) {
4949
$this->taskContext = $taskContext;

test/E2E/AbstractE2ETestCase.php

+9-7
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ protected function initializeGitSubModule(string $gitPath, string $submodulePath
7373
$process = new Process(
7474
[
7575
$this->executableFinder->find('git'),
76+
'-c',
77+
'protocol.file.allow=always',
7678
'submodule',
7779
'add',
7880
'-f',
@@ -174,7 +176,7 @@ protected function mergeComposerConfig(string $composerFile, array $config, $rec
174176
$this->dumpFile($composerFile, json_encode($newSource, $flags));
175177
}
176178

177-
protected function ensureHooksExist(string $gitPath = null, string $containsPattern = '{grumphp}')
179+
protected function ensureHooksExist(?string $gitPath = null, string $containsPattern = '{grumphp}')
178180
{
179181
$gitPath = $gitPath ?: $this->rootDir;
180182
$hooks = ['pre-commit', 'commit-msg'];
@@ -346,7 +348,7 @@ protected function installComposer(string $path, array $arguments = [])
346348
$this->runCommand('install composer', $process);
347349
}
348350

349-
protected function commitAll(string $gitPath = null)
351+
protected function commitAll(?string $gitPath = null)
350352
{
351353
$gitPath = $gitPath ?: $this->rootDir;
352354
$git = $this->executableFinder->find('git');
@@ -362,7 +364,7 @@ protected function commitAll(string $gitPath = null)
362364
* --all: Tell the command to automatically stage files that have been modified and deleted,
363365
* but new files you have not told Git about are not affected.
364366
*/
365-
protected function commitModifiedAndDeleted(string $gitPath = null)
367+
protected function commitModifiedAndDeleted(?string $gitPath = null)
366368
{
367369
$gitPath = $gitPath ?: $this->rootDir;
368370
$git = $this->executableFinder->find('git');
@@ -382,7 +384,7 @@ protected function runGrumphp(string $projectPath, string $vendorPath = './vendo
382384
{
383385
$projectPath = $this->relativeRootPath($projectPath);
384386
$process = new Process(
385-
[$vendorPath.'/bin/grumphp', 'run', '-vvv'],
387+
[$this->executableFinder->find('php'), $vendorPath.'/bin/grumphp', 'run', '-vvv'],
386388
$projectPath
387389
);
388390

@@ -396,7 +398,7 @@ protected function runGrumphpWithConfig(string $projectPath, string $grumphpFile
396398
$projectPath = $this->relativeRootPath($projectPath);
397399
$this->runCommand('grumphp run with config',
398400
new Process(
399-
[$vendorPath.'/bin/grumphp', 'run', '-vvv', '--config='.$grumphpFile],
401+
[$this->executableFinder->find('php'), $vendorPath.'/bin/grumphp', 'run', '-vvv', '--config='.$grumphpFile],
400402
$projectPath
401403
)
402404
);
@@ -407,7 +409,7 @@ protected function runGrumphpInfo(string $projectPath, $vendorPath = './vendor')
407409
$projectPath = $this->relativeRootPath($projectPath);
408410
$this->runCommand('grumphp info',
409411
new Process(
410-
[$vendorPath.'/bin/grumphp'],
412+
[$this->executableFinder->find('php'), $vendorPath.'/bin/grumphp'],
411413
$projectPath
412414
)
413415
);
@@ -418,7 +420,7 @@ protected function initializeGrumphpGitHooksWithConfig(string $grumphpFile, $ven
418420
$this->runCommand(
419421
'grumphp git:init',
420422
new Process(
421-
[$vendorPath.'/bin/grumphp', 'git:init', '--config='.$grumphpFile],
423+
[$this->executableFinder->find('php'), $vendorPath.'/bin/grumphp', 'git:init', '--config='.$grumphpFile],
422424
$this->rootDir
423425
)
424426
);

test/E2E/GitHookParametersTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function it_can_specify_hook_exec_command_with_additional_arguments()
4848

4949
$this->installComposer($this->rootDir);
5050

51-
$hookPattern = sprintf('{[\'"]%s[\'"] [\'"]-d date\.timezone=Europe/Brussels[\'"]}', preg_quote($php));
51+
$hookPattern = sprintf('{([\'"]?)%s([\'"]?) [\'"]-d date\.timezone=Europe/Brussels[\'"]}', preg_quote($php));
5252
$this->ensureHooksExist($this->rootDir, $hookPattern);
5353

5454
$this->enableValidatePathsTask($grumphpFile, $this->rootDir);

0 commit comments

Comments
 (0)