diff --git a/system/CLI/BaseCommand.php b/system/CLI/BaseCommand.php index 57df52d47f55..6becf7f28435 100644 --- a/system/CLI/BaseCommand.php +++ b/system/CLI/BaseCommand.php @@ -193,26 +193,6 @@ public function setPad(string $item, int $max, int $extra = 2, int $indent = 0): return str_pad(str_repeat(' ', $indent) . $item, $max); } - /** - * Get pad for $key => $value array output - * - * @param array $array - * - * @deprecated Use setPad() instead. - * - * @codeCoverageIgnore - */ - public function getPad(array $array, int $pad): int - { - $max = 0; - - foreach (array_keys($array) as $key) { - $max = max($max, strlen($key)); - } - - return $max + $pad; - } - /** * Makes it simple to access our protected properties. * diff --git a/system/CLI/CLI.php b/system/CLI/CLI.php index b7c9ed64e2de..592e2f30135c 100644 --- a/system/CLI/CLI.php +++ b/system/CLI/CLI.php @@ -32,25 +32,10 @@ */ class CLI { - /** - * Is the readline library on the system? - * - * @var bool - * - * @deprecated 4.4.2 Should be protected, and no longer used. - * @TODO Fix to camelCase in the next major version. - */ - public static $readline_support = false; - /** * The message displayed at prompts. - * - * @var string - * - * @deprecated 4.4.2 Should be protected. - * @TODO Fix to camelCase in the next major version. */ - public static $wait_msg = 'Press any key to continue...'; + protected static string $waitMsg = 'Press any key to continue...'; /** * Has the class already been initialized? @@ -159,11 +144,6 @@ class CLI public static function init() { if (is_cli()) { - // Readline is an extension for PHP that makes interactivity with PHP - // much more bash-like. - // http://www.php.net/manual/en/readline.installation.php - static::$readline_support = extension_loaded('readline'); - // clear segments & options to keep testing clean static::$segments = []; static::$options = []; @@ -522,21 +502,11 @@ public static function wait(int $seconds, bool $countdown = false) } elseif ($seconds > 0) { sleep($seconds); } else { - static::write(static::$wait_msg); + static::write(static::$waitMsg); static::$io->input(); } } - /** - * if operating system === windows - * - * @deprecated 4.3.0 Use `is_windows()` instead - */ - public static function isWindows(): bool - { - return is_windows(); - } - /** * Enter a number of empty lines * diff --git a/system/CLI/GeneratorTrait.php b/system/CLI/GeneratorTrait.php index 62f5ceec09ae..731347df1e87 100644 --- a/system/CLI/GeneratorTrait.php +++ b/system/CLI/GeneratorTrait.php @@ -100,18 +100,6 @@ trait GeneratorTrait */ private $params = []; - /** - * Execute the command. - * - * @param array $params - * - * @deprecated use generateClass() instead - */ - protected function execute(array $params): void - { - $this->generateClass($params); - } - /** * Generates a class file from an existing template. * diff --git a/user_guide_src/source/changelogs/v4.8.0.rst b/user_guide_src/source/changelogs/v4.8.0.rst index 95e306063380..6aedf9524240 100644 --- a/user_guide_src/source/changelogs/v4.8.0.rst +++ b/user_guide_src/source/changelogs/v4.8.0.rst @@ -55,6 +55,12 @@ Removed Deprecated Items - ``CodeIgniter\Cache\Handlers\FileHandler::deleteFile()`` - ``CodeIgniter\Cache\Handlers\FileHandler::getDirFileInfo()`` - ``CodeIgniter\Cache\Handlers\FileHandler::getFileInfo()`` +- **CLI:** Removed the following properties and methods deprecated: + - ``CodeIgniter\CLI\BaseCommand::getPad()`` + - ``CodeIgniter\CLI\CLI::$readline_support`` + - ``CodeIgniter\CLI\CLI::$wait_msg`` + - ``CodeIgniter\CLI\CLI::isWindows()`` + - ``CodeIgniter\CLI\GeneratorTrait::execute()`` - **CodeIgniter:** Removed the following properties and methods deprecated: - ``CodeIgniter\CodeIgniter::$cacheTTL`` - ``CodeIgniter\CodeIgniter::$returnResponse`` diff --git a/user_guide_src/source/cli/cli_commands.rst b/user_guide_src/source/cli/cli_commands.rst index ddf8521c8332..dc45419d7d97 100644 --- a/user_guide_src/source/cli/cli_commands.rst +++ b/user_guide_src/source/cli/cli_commands.rst @@ -141,13 +141,3 @@ be familiar with when creating your own commands. It also has a :doc:`Logger $value array. - :param integer $pad: The pad spaces. - - A method to calculate padding for ``$key => $value`` array output. The padding can be used to output a will formatted table in CLI.