Skip to content

Commit c72dede

Browse files
authored
Fix dependencies (#664)
1 parent d9eb49f commit c72dede

File tree

13 files changed

+92
-110
lines changed

13 files changed

+92
-110
lines changed

.composer-root-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22

3-
export COMPOSER_ROOT_VERSION='0.16.99'
3+
export COMPOSER_ROOT_VERSION='0.17.99'

.scrutinizer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
build:
22
environment:
33
variables:
4-
COMPOSER_ROOT_VERSION: '0.16.99'
4+
COMPOSER_ROOT_VERSION: '0.17.99'
55

66
nodes:
77
analysis:

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ e2e_014: $(PHPSCOPER)
140140
# Having those composer files messes up the Box auto-loading detection. This
141141
# is a very special case where there is no dependency and for users in practice
142142
# it would be recommended to register the files themselves
143-
rm fixtures/set004/composer.lock || true
144-
rm -rf fixtures/set004/vendor || true
143+
rm fixtures/set014/composer.lock || true
144+
rm -rf fixtures/set014/vendor || true
145145

146146
$(PHPBIN) $(BOX) compile --no-parallel --working-dir fixtures/set014
147147

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
"require-dev": {
3636
"bamarni/composer-bin-plugin": "^1.1",
37-
"humbug/box": "^3.15.0",
37+
"humbug/box": "^3.16.0",
3838
"phpspec/prophecy-phpunit": "^2.0",
3939
"phpunit/phpunit": "^9.0"
4040
},

composer.lock

Lines changed: 71 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fixtures/set004/composer.lock

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/Console/Command/AddPrefixCommand.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
use Fidry\Console\Command\CommandAwareness;
2121
use Fidry\Console\Command\Configuration as CommandConfiguration;
2222
use Fidry\Console\ExitCode;
23-
use Fidry\Console\IO;
23+
use Fidry\Console\Input\IO;
2424
use Humbug\PhpScoper\Configuration\Configuration;
2525
use Humbug\PhpScoper\Configuration\ConfigurationFactory;
2626
use Humbug\PhpScoper\Console\ConfigLoader;
@@ -92,6 +92,7 @@ public function getConfiguration(): CommandConfiguration
9292
'p',
9393
InputOption::VALUE_REQUIRED,
9494
'The namespace prefix to add.',
95+
'',
9596
),
9697
new InputOption(
9798
self::OUTPUT_DIR_OPT,
@@ -153,7 +154,7 @@ public function execute(IO $io): int
153154
$config,
154155
$paths,
155156
$outputDir,
156-
$io->getBooleanOption(self::STOP_ON_FAILURE_OPT),
157+
$io->getOption(self::STOP_ON_FAILURE_OPT)->asBoolean(),
157158
);
158159

159160
return ExitCode::SUCCESS;
@@ -165,7 +166,7 @@ public function execute(IO $io): int
165166
private function getOutputDir(IO $io, string $cwd): string
166167
{
167168
return $this->canonicalizePath(
168-
$io->getStringOption(self::OUTPUT_DIR_OPT),
169+
$io->getOption(self::OUTPUT_DIR_OPT)->asString(),
169170
$cwd,
170171
);
171172
}
@@ -201,7 +202,7 @@ private static function checkPathIsWriteable(string $path): void
201202

202203
private static function canDeleteOutputDir(IO $io, string $outputDir): bool
203204
{
204-
if ($io->getBooleanOption(self::FORCE_OPT)) {
205+
if ($io->getOption(self::FORCE_OPT)->asBoolean()) {
205206
return true;
206207
}
207208

@@ -228,8 +229,8 @@ private function retrieveConfig(IO $io, array $paths, string $cwd): Configuratio
228229

229230
return $configLoader->loadConfig(
230231
$io,
231-
$io->getStringOption(self::PREFIX_OPT),
232-
$io->getBooleanOption(self::NO_CONFIG_OPT),
232+
$io->getOption(self::PREFIX_OPT)->asString(),
233+
$io->getOption(self::NO_CONFIG_OPT)->asBoolean(),
233234
$this->getConfigFilePath($io, $cwd),
234235
ConfigurationFactory::DEFAULT_FILE_NAME,
235236
$this->init,
@@ -243,7 +244,7 @@ private function retrieveConfig(IO $io, array $paths, string $cwd): Configuratio
243244
*/
244245
private function getConfigFilePath(IO $io, string $cwd): ?string
245246
{
246-
$configFilePath = $io->getStringOption(self::CONFIG_FILE_OPT);
247+
$configFilePath = (string) $io->getOption(self::CONFIG_FILE_OPT)->asNullableString();
247248

248249
return '' === $configFilePath ? null : $this->canonicalizePath($configFilePath, $cwd);
249250
}
@@ -255,7 +256,7 @@ private function getPathArguments(IO $io, string $cwd): array
255256
{
256257
return array_map(
257258
fn (string $path) => $this->canonicalizePath($path, $cwd),
258-
$io->getStringArrayArgument(self::PATH_ARG),
259+
$io->getArgument(self::PATH_ARG)->asNonEmptyStringList(),
259260
);
260261
}
261262

src/Console/Command/ChangeableDirectory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
namespace Humbug\PhpScoper\Console\Command;
1616

17-
use Fidry\Console\IO;
17+
use Fidry\Console\Input\IO;
1818
use InvalidArgumentException;
1919
use Symfony\Component\Console\Exception\RuntimeException;
2020
use Symfony\Component\Console\Input\InputOption;

src/Console/Command/InitCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Fidry\Console\Command\Command;
1818
use Fidry\Console\Command\Configuration;
1919
use Fidry\Console\Command\Configuration as CommandConfiguration;
20-
use Fidry\Console\IO;
20+
use Fidry\Console\Input\IO;
2121
use Symfony\Component\Console\Helper\FormatterHelper;
2222
use Symfony\Component\Console\Input\InputOption;
2323
use Symfony\Component\Filesystem\Filesystem;

src/Console/Command/InspectSymbolCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use Fidry\Console\Command\CommandRegistry;
1919
use Fidry\Console\Command\Configuration as CommandConfiguration;
2020
use Fidry\Console\ExitCode;
21-
use Fidry\Console\IO;
21+
use Fidry\Console\Input\IO;
2222
use Humbug\PhpScoper\Configuration\Configuration;
2323
use Humbug\PhpScoper\Configuration\ConfigurationFactory;
2424
use Humbug\PhpScoper\Console\ConfigLoader;
@@ -197,7 +197,7 @@ private function retrieveConfig(IO $io, string $cwd): Configuration
197197
*/
198198
private function getConfigFilePath(IO $io, string $cwd): ?string
199199
{
200-
$configPath = trim($io->getStringOption(self::CONFIG_FILE_OPT));
200+
$configPath = (string) $io->getOption(self::CONFIG_FILE_OPT)->asNullableString();
201201

202202
if ('' === $configPath) {
203203
$configPath = ConfigurationFactory::DEFAULT_FILE_NAME;

0 commit comments

Comments
 (0)