From eba4b11624c6064550d06b4ecd776fc61f969ad8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Th=C3=A9o=20FIDRY?=
 <5175937+theofidry@users.noreply.github.com>
Date: Sun, 19 Nov 2023 00:13:18 +0100
Subject: [PATCH] chore: Migrate to FidryConsole 0.6 (#903)

---
 composer.json                                 |   2 +-
 composer.lock                                 | 243 +++++++++---------
 src/Console/Command/AddPrefixCommand.php      |  18 +-
 src/Console/Command/ChangeableDirectory.php   |   4 +-
 src/Console/Command/InitCommand.php           |   4 +-
 src/Console/Command/InspectCommand.php        |  10 +-
 src/Console/Command/InspectSymbolCommand.php  |  10 +-
 src/Console/ConfigLoader.php                  |   2 +-
 src/Console/ConsoleScoper.php                 |   2 +-
 src/Console/ScoperLogger.php                  |   2 +-
 .../Console/Command/AddPrefixCommandTest.php  |   4 +-
 tests/Console/Command/AppIntegrationTest.php  |   4 +-
 .../InspectSymbolCommandIntegrationTest.php   |   2 +-
 13 files changed, 154 insertions(+), 153 deletions(-)

diff --git a/composer.json b/composer.json
index cd7f62a02..a5bd33488 100644
--- a/composer.json
+++ b/composer.json
@@ -18,7 +18,7 @@
     ],
     "require": {
         "php": "^8.2",
-        "fidry/console": "^0.5.0",
+        "fidry/console": "^0.6.6",
         "fidry/filesystem": "^1.1",
         "jetbrains/phpstorm-stubs": "^v2022.2",
         "nikic/php-parser": "^4.12",
diff --git a/composer.lock b/composer.lock
index e7cbee4cb..808bdf7f2 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,48 +4,49 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "7a5cea95235ea68753cb46c0b74459d9",
+    "content-hash": "e90ae077b5b70be5ff9b142a2d3cc9d0",
     "packages": [
         {
             "name": "fidry/console",
-            "version": "0.5.5",
+            "version": "0.6.8",
             "source": {
                 "type": "git",
                 "url": "https://github.com/theofidry/console.git",
-                "reference": "bc1fe03f600c63f12ec0a39c6b746c1a1fb77bf7"
+                "reference": "f77b0abe54fd6fea6ce8733c98817d82c07b6b8e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/theofidry/console/zipball/bc1fe03f600c63f12ec0a39c6b746c1a1fb77bf7",
-                "reference": "bc1fe03f600c63f12ec0a39c6b746c1a1fb77bf7",
+                "url": "https://api.github.com/repos/theofidry/console/zipball/f77b0abe54fd6fea6ce8733c98817d82c07b6b8e",
+                "reference": "f77b0abe54fd6fea6ce8733c98817d82c07b6b8e",
                 "shasum": ""
             },
             "require": {
-                "php": "^7.4.0 || ^8.0.0",
-                "symfony/console": "^4.4 || ^5.4 || ^6.1",
-                "symfony/event-dispatcher-contracts": "^1.0 || ^2.5 || ^3.0",
-                "symfony/service-contracts": "^1.0 || ^2.5 || ^3.0",
-                "thecodingmachine/safe": "^1.3 || ^2.0",
+                "php": "^8.2",
+                "psr/log": "^3.0",
+                "symfony/console": "^6.3",
+                "symfony/event-dispatcher-contracts": "^2.5 || ^3.0",
+                "symfony/service-contracts": "^2.5 || ^3.0",
+                "thecodingmachine/safe": "^2.0",
                 "webmozart/assert": "^1.11"
             },
             "conflict": {
-                "symfony/dependency-injection": "<5.3.0",
-                "symfony/framework-bundle": "<5.3.0",
-                "symfony/http-kernel": "<5.3.0"
+                "symfony/dependency-injection": "<6.3.0",
+                "symfony/framework-bundle": "<6.3.0",
+                "symfony/http-kernel": "<6.3.0"
             },
             "require-dev": {
-                "bamarni/composer-bin-plugin": "^1.4",
-                "composer/semver": "^3.3",
-                "ergebnis/composer-normalize": "^2.28",
-                "infection/infection": "^0.26",
+                "bamarni/composer-bin-plugin": "^1.8.2",
+                "composer/semver": "^3.3.2",
+                "ergebnis/composer-normalize": "^2.33",
+                "fidry/makefile": "^0.2.1 || ^1.0.0",
+                "infection/infection": "^0.27",
                 "phpspec/prophecy-phpunit": "^2.0",
-                "phpunit/phpunit": "^9.4.3",
-                "symfony/dependency-injection": "^4.4 || ^5.4 || ^6.1",
-                "symfony/framework-bundle": "^4.4 || ^5.4 || ^6.1",
-                "symfony/http-kernel": "^4.4 || ^5.4 || ^6.1",
-                "symfony/phpunit-bridge": "^4.4.47 || ^5.4 || ^6.0",
-                "symfony/yaml": "^4.4 || ^5.4 || ^6.1",
-                "webmozarts/strict-phpunit": "^7.3"
+                "phpunit/phpunit": "^10.2",
+                "symfony/dependency-injection": "^6.3",
+                "symfony/flex": "^2.4.0",
+                "symfony/framework-bundle": "^6.3",
+                "symfony/http-kernel": "^6.3",
+                "symfony/yaml": "^6.3"
             },
             "type": "library",
             "extra": {
@@ -80,7 +81,7 @@
             ],
             "support": {
                 "issues": "https://github.com/theofidry/console/issues",
-                "source": "https://github.com/theofidry/console/tree/0.5.5"
+                "source": "https://github.com/theofidry/console/tree/0.6.8"
             },
             "funding": [
                 {
@@ -88,7 +89,7 @@
                     "type": "github"
                 }
             ],
-            "time": "2022-12-18T10:49:34+00:00"
+            "time": "2023-11-18T22:57:23+00:00"
         },
         {
             "name": "fidry/filesystem",
@@ -366,18 +367,68 @@
             },
             "time": "2019-01-08T18:20:26+00:00"
         },
+        {
+            "name": "psr/log",
+            "version": "3.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/php-fig/log.git",
+                "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
+                "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=8.0.0"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-master": "3.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Psr\\Log\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "PHP-FIG",
+                    "homepage": "https://www.php-fig.org/"
+                }
+            ],
+            "description": "Common interface for logging libraries",
+            "homepage": "https://github.com/php-fig/log",
+            "keywords": [
+                "log",
+                "psr",
+                "psr-3"
+            ],
+            "support": {
+                "source": "https://github.com/php-fig/log/tree/3.0.0"
+            },
+            "time": "2021-07-14T16:46:02+00:00"
+        },
         {
             "name": "symfony/console",
-            "version": "v6.3.4",
+            "version": "v6.3.8",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/console.git",
-                "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6"
+                "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/console/zipball/eca495f2ee845130855ddf1cf18460c38966c8b6",
-                "reference": "eca495f2ee845130855ddf1cf18460c38966c8b6",
+                "url": "https://api.github.com/repos/symfony/console/zipball/0d14a9f6d04d4ac38a8cea1171f4554e325dae92",
+                "reference": "0d14a9f6d04d4ac38a8cea1171f4554e325dae92",
                 "shasum": ""
             },
             "require": {
@@ -438,7 +489,7 @@
                 "terminal"
             ],
             "support": {
-                "source": "https://github.com/symfony/console/tree/v6.3.4"
+                "source": "https://github.com/symfony/console/tree/v6.3.8"
             },
             "funding": [
                 {
@@ -454,11 +505,11 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-08-16T10:10:12+00:00"
+            "time": "2023-10-31T08:09:35+00:00"
         },
         {
             "name": "symfony/deprecation-contracts",
-            "version": "v3.3.0",
+            "version": "v3.4.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/deprecation-contracts.git",
@@ -505,7 +556,7 @@
             "description": "A generic function and convention to trigger deprecation notices",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0"
+                "source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0"
             },
             "funding": [
                 {
@@ -525,7 +576,7 @@
         },
         {
             "name": "symfony/event-dispatcher-contracts",
-            "version": "v3.3.0",
+            "version": "v3.4.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/event-dispatcher-contracts.git",
@@ -581,7 +632,7 @@
                 "standards"
             ],
             "support": {
-                "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.0"
+                "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.4.0"
             },
             "funding": [
                 {
@@ -1058,16 +1109,16 @@
         },
         {
             "name": "symfony/service-contracts",
-            "version": "v3.3.0",
+            "version": "v3.4.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/service-contracts.git",
-                "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4"
+                "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4",
-                "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4",
+                "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b3313c2dbffaf71c8de2934e2ea56ed2291a3838",
+                "reference": "b3313c2dbffaf71c8de2934e2ea56ed2291a3838",
                 "shasum": ""
             },
             "require": {
@@ -1120,7 +1171,7 @@
                 "standards"
             ],
             "support": {
-                "source": "https://github.com/symfony/service-contracts/tree/v3.3.0"
+                "source": "https://github.com/symfony/service-contracts/tree/v3.4.0"
             },
             "funding": [
                 {
@@ -1136,20 +1187,20 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-05-23T14:45:45+00:00"
+            "time": "2023-07-30T20:28:31+00:00"
         },
         {
             "name": "symfony/string",
-            "version": "v6.3.5",
+            "version": "v6.3.8",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/string.git",
-                "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339"
+                "reference": "13880a87790c76ef994c91e87efb96134522577a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/string/zipball/13d76d0fb049051ed12a04bef4f9de8715bea339",
-                "reference": "13d76d0fb049051ed12a04bef4f9de8715bea339",
+                "url": "https://api.github.com/repos/symfony/string/zipball/13880a87790c76ef994c91e87efb96134522577a",
+                "reference": "13880a87790c76ef994c91e87efb96134522577a",
                 "shasum": ""
             },
             "require": {
@@ -1206,7 +1257,7 @@
                 "utf8"
             ],
             "support": {
-                "source": "https://github.com/symfony/string/tree/v6.3.5"
+                "source": "https://github.com/symfony/string/tree/v6.3.8"
             },
             "funding": [
                 {
@@ -1222,7 +1273,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-09-18T10:38:32+00:00"
+            "time": "2023-11-09T08:28:21+00:00"
         },
         {
             "name": "thecodingmachine/safe",
@@ -3032,16 +3083,16 @@
         },
         {
             "name": "laravel/serializable-closure",
-            "version": "v1.3.2",
+            "version": "v1.3.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laravel/serializable-closure.git",
-                "reference": "076fe2cf128bd54b4341cdc6d49b95b34e101e4c"
+                "reference": "3dbf8a8e914634c48d389c1234552666b3d43754"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/076fe2cf128bd54b4341cdc6d49b95b34e101e4c",
-                "reference": "076fe2cf128bd54b4341cdc6d49b95b34e101e4c",
+                "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754",
+                "reference": "3dbf8a8e914634c48d389c1234552666b3d43754",
                 "shasum": ""
             },
             "require": {
@@ -3088,7 +3139,7 @@
                 "issues": "https://github.com/laravel/serializable-closure/issues",
                 "source": "https://github.com/laravel/serializable-closure"
             },
-            "time": "2023-10-17T13:38:16+00:00"
+            "time": "2023-11-08T14:08:06+00:00"
         },
         {
             "name": "localheinz/diff",
@@ -3729,16 +3780,16 @@
         },
         {
             "name": "phpstan/phpdoc-parser",
-            "version": "1.24.2",
+            "version": "1.24.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpstan/phpdoc-parser.git",
-                "reference": "bcad8d995980440892759db0c32acae7c8e79442"
+                "reference": "12f01d214f1c73b9c91fdb3b1c415e4c70652083"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442",
-                "reference": "bcad8d995980440892759db0c32acae7c8e79442",
+                "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/12f01d214f1c73b9c91fdb3b1c415e4c70652083",
+                "reference": "12f01d214f1c73b9c91fdb3b1c415e4c70652083",
                 "shasum": ""
             },
             "require": {
@@ -3770,9 +3821,9 @@
             "description": "PHPDoc parser with support for nullable, intersection and generic types",
             "support": {
                 "issues": "https://github.com/phpstan/phpdoc-parser/issues",
-                "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.2"
+                "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.3"
             },
-            "time": "2023-09-26T12:28:12+00:00"
+            "time": "2023-11-18T20:15:32+00:00"
         },
         {
             "name": "phpunit/php-code-coverage",
@@ -4196,56 +4247,6 @@
             ],
             "time": "2023-09-19T05:39:22+00:00"
         },
-        {
-            "name": "psr/log",
-            "version": "3.0.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/php-fig/log.git",
-                "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001",
-                "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=8.0.0"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "3.x-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "Psr\\Log\\": "src"
-                }
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "PHP-FIG",
-                    "homepage": "https://www.php-fig.org/"
-                }
-            ],
-            "description": "Common interface for logging libraries",
-            "homepage": "https://github.com/php-fig/log",
-            "keywords": [
-                "log",
-                "psr",
-                "psr-3"
-            ],
-            "support": {
-                "source": "https://github.com/php-fig/log/tree/3.0.0"
-            },
-            "time": "2021-07-14T16:46:02+00:00"
-        },
         {
             "name": "sebastian/cli-parser",
             "version": "1.0.1",
@@ -5420,16 +5421,16 @@
         },
         {
             "name": "symfony/var-dumper",
-            "version": "v6.3.6",
+            "version": "v6.3.8",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/var-dumper.git",
-                "reference": "999ede244507c32b8e43aebaa10e9fce20de7c97"
+                "reference": "81acabba9046550e89634876ca64bfcd3c06aa0a"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/var-dumper/zipball/999ede244507c32b8e43aebaa10e9fce20de7c97",
-                "reference": "999ede244507c32b8e43aebaa10e9fce20de7c97",
+                "url": "https://api.github.com/repos/symfony/var-dumper/zipball/81acabba9046550e89634876ca64bfcd3c06aa0a",
+                "reference": "81acabba9046550e89634876ca64bfcd3c06aa0a",
                 "shasum": ""
             },
             "require": {
@@ -5484,7 +5485,7 @@
                 "dump"
             ],
             "support": {
-                "source": "https://github.com/symfony/var-dumper/tree/v6.3.6"
+                "source": "https://github.com/symfony/var-dumper/tree/v6.3.8"
             },
             "funding": [
                 {
@@ -5500,20 +5501,20 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-10-12T18:45:56+00:00"
+            "time": "2023-11-08T10:42:36+00:00"
         },
         {
             "name": "symfony/yaml",
-            "version": "v6.3.3",
+            "version": "v6.3.8",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/yaml.git",
-                "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add"
+                "reference": "3493af8a8dad7fa91c77fa473ba23ecd95334a92"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/yaml/zipball/e23292e8c07c85b971b44c1c4b87af52133e2add",
-                "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add",
+                "url": "https://api.github.com/repos/symfony/yaml/zipball/3493af8a8dad7fa91c77fa473ba23ecd95334a92",
+                "reference": "3493af8a8dad7fa91c77fa473ba23ecd95334a92",
                 "shasum": ""
             },
             "require": {
@@ -5556,7 +5557,7 @@
             "description": "Loads and dumps YAML files",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/yaml/tree/v6.3.3"
+                "source": "https://github.com/symfony/yaml/tree/v6.3.8"
             },
             "funding": [
                 {
@@ -5572,7 +5573,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2023-07-31T07:08:24+00:00"
+            "time": "2023-11-06T10:58:05+00:00"
         },
         {
             "name": "theseer/tokenizer",
diff --git a/src/Console/Command/AddPrefixCommand.php b/src/Console/Command/AddPrefixCommand.php
index 71851c95b..0896eae00 100644
--- a/src/Console/Command/AddPrefixCommand.php
+++ b/src/Console/Command/AddPrefixCommand.php
@@ -20,7 +20,7 @@
 use Fidry\Console\Command\CommandAwareness;
 use Fidry\Console\Command\Configuration as CommandConfiguration;
 use Fidry\Console\ExitCode;
-use Fidry\Console\Input\IO;
+use Fidry\Console\IO;
 use Humbug\PhpScoper\Configuration\Configuration;
 use Humbug\PhpScoper\Configuration\ConfigurationFactory;
 use Humbug\PhpScoper\Console\ConfigLoader;
@@ -165,8 +165,8 @@ public function execute(IO $io): int
 
     private static function getStopOnFailure(IO $io): bool
     {
-        $stopOnFailure = $io->getOption(self::STOP_ON_FAILURE_OPT)->asBoolean();
-        $continueOnFailure = $io->getOption(self::CONTINUE_ON_FAILURE_OPT)->asBoolean();
+        $stopOnFailure = $io->getTypedOption(self::STOP_ON_FAILURE_OPT)->asBoolean();
+        $continueOnFailure = $io->getTypedOption(self::CONTINUE_ON_FAILURE_OPT)->asBoolean();
 
         if ($stopOnFailure) {
             $io->info(
@@ -196,7 +196,7 @@ private static function getStopOnFailure(IO $io): bool
      */
     private function getOutputDir(IO $io, Configuration $configuration): string
     {
-        $commandOutputDir = $io->getOption(self::OUTPUT_DIR_OPT)->asString();
+        $commandOutputDir = $io->getTypedOption(self::OUTPUT_DIR_OPT)->asString();
 
         if ('' !== $commandOutputDir) {
             return $commandOutputDir;
@@ -236,7 +236,7 @@ private static function checkPathIsWriteable(string $path): void
 
     private static function canDeleteOutputDir(IO $io, string $outputDir): bool
     {
-        if ($io->getOption(self::FORCE_OPT)->asBoolean()) {
+        if ($io->getTypedOption(self::FORCE_OPT)->asBoolean()) {
             return true;
         }
 
@@ -263,8 +263,8 @@ private function retrieveConfig(IO $io, array $paths, string $cwd): Configuratio
 
         return $configLoader->loadConfig(
             $io,
-            $io->getOption(self::PREFIX_OPT)->asString(),
-            $io->getOption(self::NO_CONFIG_OPT)->asBoolean(),
+            $io->getTypedOption(self::PREFIX_OPT)->asString(),
+            $io->getTypedOption(self::NO_CONFIG_OPT)->asBoolean(),
             $this->getConfigFilePath($io, $cwd),
             ConfigurationFactory::DEFAULT_FILE_NAME,
             $this->init,
@@ -278,7 +278,7 @@ private function retrieveConfig(IO $io, array $paths, string $cwd): Configuratio
      */
     private function getConfigFilePath(IO $io, string $cwd): ?string
     {
-        $configFilePath = (string) $io->getOption(self::CONFIG_FILE_OPT)->asNullableString();
+        $configFilePath = (string) $io->getTypedOption(self::CONFIG_FILE_OPT)->asNullableString();
 
         return '' === $configFilePath ? null : $this->canonicalizePath($configFilePath, $cwd);
     }
@@ -290,7 +290,7 @@ private function getPathArguments(IO $io, string $cwd): array
     {
         return array_map(
             fn (string $path) => $this->canonicalizePath($path, $cwd),
-            $io->getArgument(self::PATH_ARG)->asNonEmptyStringList(),
+            $io->getTypedArgument(self::PATH_ARG)->asNonEmptyStringList(),
         );
     }
 
diff --git a/src/Console/Command/ChangeableDirectory.php b/src/Console/Command/ChangeableDirectory.php
index 10d527522..a91ffaaf1 100644
--- a/src/Console/Command/ChangeableDirectory.php
+++ b/src/Console/Command/ChangeableDirectory.php
@@ -14,7 +14,7 @@
 
 namespace Humbug\PhpScoper\Console\Command;
 
-use Fidry\Console\Input\IO;
+use Fidry\Console\IO;
 use Humbug\PhpScoper\NotInstantiable;
 use InvalidArgumentException;
 use Symfony\Component\Console\Exception\RuntimeException;
@@ -47,7 +47,7 @@ public static function createOption(): InputOption
 
     public static function changeWorkingDirectory(IO $io): void
     {
-        $workingDir = $io->getOption(self::WORKING_DIR_OPT)->asNullableString();
+        $workingDir = $io->getTypedOption(self::WORKING_DIR_OPT)->asNullableString();
 
         if (null === $workingDir) {
             return;
diff --git a/src/Console/Command/InitCommand.php b/src/Console/Command/InitCommand.php
index cc759fcbb..825f6986f 100644
--- a/src/Console/Command/InitCommand.php
+++ b/src/Console/Command/InitCommand.php
@@ -16,7 +16,7 @@
 
 use Fidry\Console\Command\Command;
 use Fidry\Console\Command\Configuration as CommandConfiguration;
-use Fidry\Console\Input\IO;
+use Fidry\Console\IO;
 use Symfony\Component\Console\Helper\FormatterHelper;
 use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Filesystem\Filesystem;
@@ -100,7 +100,7 @@ public function execute(IO $io): int
 
     private function retrieveConfig(IO $io): ?string
     {
-        $configFile = $io->getOption(self::CONFIG_FILE_OPT)->asNullableNonEmptyString();
+        $configFile = $io->getTypedOption(self::CONFIG_FILE_OPT)->asNullableNonEmptyString();
 
         $configFile = (null === $configFile)
             ? $this->makeAbsolutePath(self::CONFIG_FILE_DEFAULT)
diff --git a/src/Console/Command/InspectCommand.php b/src/Console/Command/InspectCommand.php
index 5a2d578d4..7b4b84797 100644
--- a/src/Console/Command/InspectCommand.php
+++ b/src/Console/Command/InspectCommand.php
@@ -19,7 +19,7 @@
 use Fidry\Console\Command\CommandAwareness;
 use Fidry\Console\Command\Configuration as CommandConfiguration;
 use Fidry\Console\ExitCode;
-use Fidry\Console\Input\IO;
+use Fidry\Console\IO;
 use Humbug\PhpScoper\Configuration\Configuration;
 use Humbug\PhpScoper\Configuration\ConfigurationFactory;
 use Humbug\PhpScoper\Console\ConfigLoader;
@@ -140,8 +140,8 @@ private function retrieveConfig(IO $io, array $paths, string $cwd): Configuratio
 
         return $configLoader->loadConfig(
             $io,
-            $io->getOption(self::PREFIX_OPT)->asString(),
-            $io->getOption(self::NO_CONFIG_OPT)->asBoolean(),
+            $io->getTypedOption(self::PREFIX_OPT)->asString(),
+            $io->getTypedOption(self::NO_CONFIG_OPT)->asBoolean(),
             $this->getConfigFilePath($io, $cwd),
             ConfigurationFactory::DEFAULT_FILE_NAME,
             false,
@@ -155,7 +155,7 @@ private function retrieveConfig(IO $io, array $paths, string $cwd): Configuratio
      */
     private function getConfigFilePath(IO $io, string $cwd): ?string
     {
-        $configFilePath = (string) $io->getOption(self::CONFIG_FILE_OPT)->asNullableString();
+        $configFilePath = (string) $io->getTypedOption(self::CONFIG_FILE_OPT)->asNullableString();
 
         return '' === $configFilePath ? null : $this->canonicalizePath($configFilePath, $cwd);
     }
@@ -166,7 +166,7 @@ private function getConfigFilePath(IO $io, string $cwd): ?string
     private function getFilePath(IO $io, string $cwd): string
     {
         return $this->canonicalizePath(
-            $io->getArgument(self::FILE_PATH_ARG)->asNonEmptyString(),
+            $io->getTypedArgument(self::FILE_PATH_ARG)->asNonEmptyString(),
             $cwd,
         );
     }
diff --git a/src/Console/Command/InspectSymbolCommand.php b/src/Console/Command/InspectSymbolCommand.php
index 5c3e16eb9..d526e9565 100644
--- a/src/Console/Command/InspectSymbolCommand.php
+++ b/src/Console/Command/InspectSymbolCommand.php
@@ -18,7 +18,7 @@
 use Fidry\Console\Command\CommandRegistry;
 use Fidry\Console\Command\Configuration as CommandConfiguration;
 use Fidry\Console\ExitCode;
-use Fidry\Console\Input\IO;
+use Fidry\Console\IO;
 use Humbug\PhpScoper\Configuration\Configuration;
 use Humbug\PhpScoper\Configuration\ConfigurationFactory;
 use Humbug\PhpScoper\Console\ConfigLoader;
@@ -108,7 +108,7 @@ public function execute(IO $io): int
         // working directory
         $cwd = getcwd();
 
-        $symbol = $io->getArgument(self::SYMBOL_ARG)->asString();
+        $symbol = $io->getTypedArgument(self::SYMBOL_ARG)->asString();
         $symbolType = self::getSymbolType($io);
         $config = $this->retrieveConfig($io, $cwd);
 
@@ -130,7 +130,7 @@ public function execute(IO $io): int
     // TODO: https://github.com/theofidry/console/issues/99
     private static function getSymbolType(IO $io): SymbolType
     {
-        $symbolType = $io->getArgument(self::SYMBOL_TYPE_ARG)->asString();
+        $symbolType = $io->getTypedArgument(self::SYMBOL_TYPE_ARG)->asString();
 
         return SymbolType::from($symbolType);
     }
@@ -144,7 +144,7 @@ private function retrieveConfig(IO $io, string $cwd): Configuration
         );
 
         $configFilePath = $this->getConfigFilePath($io, $cwd);
-        $noConfig = $io->getOption(self::NO_CONFIG_OPT)->asBoolean();
+        $noConfig = $io->getTypedOption(self::NO_CONFIG_OPT)->asBoolean();
 
         if (null === $configFilePath) {
             // Unlike when scoping, we do not want a config file to be created
@@ -175,7 +175,7 @@ private function retrieveConfig(IO $io, string $cwd): Configuration
      */
     private function getConfigFilePath(IO $io, string $cwd): ?string
     {
-        $configPath = (string) $io->getOption(self::CONFIG_FILE_OPT)->asNullableString();
+        $configPath = (string) $io->getTypedOption(self::CONFIG_FILE_OPT)->asNullableString();
 
         if ('' === $configPath) {
             $configPath = ConfigurationFactory::DEFAULT_FILE_NAME;
diff --git a/src/Console/ConfigLoader.php b/src/Console/ConfigLoader.php
index 7fc14d5a0..acb7efd1f 100644
--- a/src/Console/ConfigLoader.php
+++ b/src/Console/ConfigLoader.php
@@ -15,7 +15,7 @@
 namespace Humbug\PhpScoper\Console;
 
 use Fidry\Console\Command\CommandRegistry;
-use Fidry\Console\Input\IO;
+use Fidry\Console\IO;
 use Humbug\PhpScoper\Configuration\Configuration;
 use Humbug\PhpScoper\Configuration\ConfigurationFactory;
 use Symfony\Component\Console\Exception\RuntimeException;
diff --git a/src/Console/ConsoleScoper.php b/src/Console/ConsoleScoper.php
index 5e484a05e..f3a853d40 100644
--- a/src/Console/ConsoleScoper.php
+++ b/src/Console/ConsoleScoper.php
@@ -15,7 +15,7 @@
 namespace Humbug\PhpScoper\Console;
 
 use Fidry\Console\Application\Application;
-use Fidry\Console\Input\IO;
+use Fidry\Console\IO;
 use Humbug\PhpScoper\Autoload\ComposerFileHasher;
 use Humbug\PhpScoper\Autoload\ScoperAutoloadGenerator;
 use Humbug\PhpScoper\Configuration\Configuration;
diff --git a/src/Console/ScoperLogger.php b/src/Console/ScoperLogger.php
index c8876fc4e..19c7d3653 100644
--- a/src/Console/ScoperLogger.php
+++ b/src/Console/ScoperLogger.php
@@ -15,7 +15,7 @@
 namespace Humbug\PhpScoper\Console;
 
 use Fidry\Console\Application\Application as FidryApplication;
-use Fidry\Console\Input\IO;
+use Fidry\Console\IO;
 use Humbug\PhpScoper\Throwable\Exception\ParsingException;
 use Symfony\Component\Console\Helper\ProgressBar;
 use Symfony\Component\Console\Output\NullOutput;
diff --git a/tests/Console/Command/AddPrefixCommandTest.php b/tests/Console/Command/AddPrefixCommandTest.php
index 7747d869a..7c9085b3b 100644
--- a/tests/Console/Command/AddPrefixCommandTest.php
+++ b/tests/Console/Command/AddPrefixCommandTest.php
@@ -14,8 +14,8 @@
 
 namespace Humbug\PhpScoper\Console\Command;
 
-use Fidry\Console\Application\SymfonyApplication;
-use Fidry\Console\Command\SymfonyCommand;
+use Fidry\Console\Bridge\Application\SymfonyApplication;
+use Fidry\Console\Bridge\Command\SymfonyCommand;
 use Fidry\FileSystem\FS;
 use Humbug\PhpScoper\Configuration\ConfigurationFactory;
 use Humbug\PhpScoper\Configuration\RegexChecker;
diff --git a/tests/Console/Command/AppIntegrationTest.php b/tests/Console/Command/AppIntegrationTest.php
index a7e9e7779..cf0701192 100644
--- a/tests/Console/Command/AppIntegrationTest.php
+++ b/tests/Console/Command/AppIntegrationTest.php
@@ -14,8 +14,8 @@
 
 namespace Humbug\PhpScoper\Console\Command;
 
-use Fidry\Console\Application\SymfonyApplication;
-use Fidry\Console\Command\SymfonyCommand;
+use Fidry\Console\Bridge\Application\SymfonyApplication;
+use Fidry\Console\Bridge\Command\SymfonyCommand;
 use Humbug\PhpScoper\Configuration\ConfigurationFactory;
 use Humbug\PhpScoper\Configuration\RegexChecker;
 use Humbug\PhpScoper\Configuration\SymbolsConfigurationFactory;
diff --git a/tests/Console/Command/InspectSymbolCommandIntegrationTest.php b/tests/Console/Command/InspectSymbolCommandIntegrationTest.php
index a40214847..f7230da9b 100644
--- a/tests/Console/Command/InspectSymbolCommandIntegrationTest.php
+++ b/tests/Console/Command/InspectSymbolCommandIntegrationTest.php
@@ -14,7 +14,7 @@
 
 namespace Humbug\PhpScoper\Console\Command;
 
-use Fidry\Console\Application\SymfonyApplication;
+use Fidry\Console\Bridge\Application\SymfonyApplication;
 use Fidry\Console\DisplayNormalizer;
 use Humbug\PhpScoper\Console\Application;
 use Humbug\PhpScoper\Container;