Skip to content

Commit

Permalink
Fix dependencies (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored Feb 21, 2022
1 parent d9eb49f commit c72dede
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 110 deletions.
2 changes: 1 addition & 1 deletion .composer-root-version
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

export COMPOSER_ROOT_VERSION='0.16.99'
export COMPOSER_ROOT_VERSION='0.17.99'
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
build:
environment:
variables:
COMPOSER_ROOT_VERSION: '0.16.99'
COMPOSER_ROOT_VERSION: '0.17.99'

nodes:
analysis:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ e2e_014: $(PHPSCOPER)
# Having those composer files messes up the Box auto-loading detection. This
# is a very special case where there is no dependency and for users in practice
# it would be recommended to register the files themselves
rm fixtures/set004/composer.lock || true
rm -rf fixtures/set004/vendor || true
rm fixtures/set014/composer.lock || true
rm -rf fixtures/set014/vendor || true

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

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.1",
"humbug/box": "^3.15.0",
"humbug/box": "^3.16.0",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.0"
},
Expand Down
143 changes: 71 additions & 72 deletions composer.lock

Large diffs are not rendered by default.

18 changes: 0 additions & 18 deletions fixtures/set004/composer.lock

This file was deleted.

17 changes: 9 additions & 8 deletions src/Console/Command/AddPrefixCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use Fidry\Console\Command\CommandAwareness;
use Fidry\Console\Command\Configuration as CommandConfiguration;
use Fidry\Console\ExitCode;
use Fidry\Console\IO;
use Fidry\Console\Input\IO;
use Humbug\PhpScoper\Configuration\Configuration;
use Humbug\PhpScoper\Configuration\ConfigurationFactory;
use Humbug\PhpScoper\Console\ConfigLoader;
Expand Down Expand Up @@ -92,6 +92,7 @@ public function getConfiguration(): CommandConfiguration
'p',
InputOption::VALUE_REQUIRED,
'The namespace prefix to add.',
'',
),
new InputOption(
self::OUTPUT_DIR_OPT,
Expand Down Expand Up @@ -153,7 +154,7 @@ public function execute(IO $io): int
$config,
$paths,
$outputDir,
$io->getBooleanOption(self::STOP_ON_FAILURE_OPT),
$io->getOption(self::STOP_ON_FAILURE_OPT)->asBoolean(),
);

return ExitCode::SUCCESS;
Expand All @@ -165,7 +166,7 @@ public function execute(IO $io): int
private function getOutputDir(IO $io, string $cwd): string
{
return $this->canonicalizePath(
$io->getStringOption(self::OUTPUT_DIR_OPT),
$io->getOption(self::OUTPUT_DIR_OPT)->asString(),
$cwd,
);
}
Expand Down Expand Up @@ -201,7 +202,7 @@ private static function checkPathIsWriteable(string $path): void

private static function canDeleteOutputDir(IO $io, string $outputDir): bool
{
if ($io->getBooleanOption(self::FORCE_OPT)) {
if ($io->getOption(self::FORCE_OPT)->asBoolean()) {
return true;
}

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

return $configLoader->loadConfig(
$io,
$io->getStringOption(self::PREFIX_OPT),
$io->getBooleanOption(self::NO_CONFIG_OPT),
$io->getOption(self::PREFIX_OPT)->asString(),
$io->getOption(self::NO_CONFIG_OPT)->asBoolean(),
$this->getConfigFilePath($io, $cwd),
ConfigurationFactory::DEFAULT_FILE_NAME,
$this->init,
Expand All @@ -243,7 +244,7 @@ private function retrieveConfig(IO $io, array $paths, string $cwd): Configuratio
*/
private function getConfigFilePath(IO $io, string $cwd): ?string
{
$configFilePath = $io->getStringOption(self::CONFIG_FILE_OPT);
$configFilePath = (string) $io->getOption(self::CONFIG_FILE_OPT)->asNullableString();

return '' === $configFilePath ? null : $this->canonicalizePath($configFilePath, $cwd);
}
Expand All @@ -255,7 +256,7 @@ private function getPathArguments(IO $io, string $cwd): array
{
return array_map(
fn (string $path) => $this->canonicalizePath($path, $cwd),
$io->getStringArrayArgument(self::PATH_ARG),
$io->getArgument(self::PATH_ARG)->asNonEmptyStringList(),
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Console/Command/ChangeableDirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Humbug\PhpScoper\Console\Command;

use Fidry\Console\IO;
use Fidry\Console\Input\IO;
use InvalidArgumentException;
use Symfony\Component\Console\Exception\RuntimeException;
use Symfony\Component\Console\Input\InputOption;
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Command/InitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Fidry\Console\Command\Command;
use Fidry\Console\Command\Configuration;
use Fidry\Console\Command\Configuration as CommandConfiguration;
use Fidry\Console\IO;
use Fidry\Console\Input\IO;
use Symfony\Component\Console\Helper\FormatterHelper;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Filesystem\Filesystem;
Expand Down
4 changes: 2 additions & 2 deletions src/Console/Command/InspectSymbolCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Fidry\Console\Command\CommandRegistry;
use Fidry\Console\Command\Configuration as CommandConfiguration;
use Fidry\Console\ExitCode;
use Fidry\Console\IO;
use Fidry\Console\Input\IO;
use Humbug\PhpScoper\Configuration\Configuration;
use Humbug\PhpScoper\Configuration\ConfigurationFactory;
use Humbug\PhpScoper\Console\ConfigLoader;
Expand Down Expand Up @@ -197,7 +197,7 @@ private function retrieveConfig(IO $io, string $cwd): Configuration
*/
private function getConfigFilePath(IO $io, string $cwd): ?string
{
$configPath = trim($io->getStringOption(self::CONFIG_FILE_OPT));
$configPath = (string) $io->getOption(self::CONFIG_FILE_OPT)->asNullableString();

if ('' === $configPath) {
$configPath = ConfigurationFactory::DEFAULT_FILE_NAME;
Expand Down
2 changes: 1 addition & 1 deletion src/Console/ConfigLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Humbug\PhpScoper\Console;

use Fidry\Console\Command\CommandRegistry;
use Fidry\Console\IO;
use Fidry\Console\Input\IO;
use Humbug\PhpScoper\Configuration\Configuration;
use Humbug\PhpScoper\Configuration\ConfigurationFactory;
use Symfony\Component\Console\Exception\RuntimeException;
Expand Down
2 changes: 1 addition & 1 deletion src/Console/ConsoleScoper.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Humbug\PhpScoper\Console;

use Fidry\Console\Application\Application;
use Fidry\Console\IO;
use Fidry\Console\Input\IO;
use Humbug\PhpScoper\Autoload\ScoperAutoloadGenerator;
use Humbug\PhpScoper\Configuration\Configuration;
use Humbug\PhpScoper\Scoper\Scoper;
Expand Down
2 changes: 1 addition & 1 deletion src/Console/ScoperLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
namespace Humbug\PhpScoper\Console;

use Fidry\Console\Application\Application as FidryApplication;
use Fidry\Console\IO;
use Fidry\Console\Input\IO;
use Humbug\PhpScoper\Throwable\Exception\ParsingException;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Output\NullOutput;
Expand Down

0 comments on commit c72dede

Please sign in to comment.