Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Console] Removed deprecated code #41352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions 6 src/Symfony/Component/Console/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
CHANGELOG
=========

6.0
---

* Removed `Helper::strlen`. Use `Helper::width()` or `Helper::length()` instead
* Removed `Helper::strlenWithoutDecoration`. Use `Helper::removeDecoration()` instead

5.3
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,10 @@
*/
class AddConsoleCommandPass implements CompilerPassInterface
{
private $commandLoaderServiceId;
private $commandTag;
private $noPreloadTag;
private $privateTagName;

public function __construct(string $commandLoaderServiceId = 'console.command_loader', string $commandTag = 'console.command', string $noPreloadTag = 'container.no_preload', string $privateTagName = 'container.private')
{
if (0 < \func_num_args()) {
trigger_deprecation('symfony/console', '5.3', 'Configuring "%s" is deprecated.', __CLASS__);
}

$this->commandLoaderServiceId = $commandLoaderServiceId;
$this->commandTag = $commandTag;
$this->noPreloadTag = $noPreloadTag;
$this->privateTagName = $privateTagName;
}
private string $commandLoaderServiceId = 'console.command_loader';
private string $commandTag = 'console.command';
private string $noPreloadTag = 'container.no_preload';
private string $privateTagName = 'container.private';

public function process(ContainerBuilder $container)
{
Expand Down
24 changes: 0 additions & 24 deletions 24 src/Symfony/Component/Console/Helper/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,6 @@ public function getHelperSet()
return $this->helperSet;
}

/**
* Returns the length of a string, using mb_strwidth if it is available.
*
* @deprecated since 5.3
*
* @return int The length of the string
*/
public static function strlen(?string $string)
{
trigger_deprecation('symfony/console', '5.3', 'Method "%s()" is deprecated and will be removed in Symfony 6.0. Use Helper::width() or Helper::length() instead.', __METHOD__);

return self::width($string);
}

/**
* Returns the width of a string, using mb_strwidth if it is available.
* The width is how many characters positions the string will use.
Expand Down Expand Up @@ -153,16 +139,6 @@ public static function formatMemory(int $memory)
return sprintf('%d B', $memory);
}

/**
* @deprecated since 5.3
*/
public static function strlenWithoutDecoration(OutputFormatterInterface $formatter, ?string $string)
{
trigger_deprecation('symfony/console', '5.3', 'Method "%s()" is deprecated and will be removed in Symfony 6.0. Use Helper::removeDecoration() instead.', __METHOD__);

return self::width(self::removeDecoration($formatter, $string));
}

public static function removeDecoration(OutputFormatterInterface $formatter, ?string $string)
{
$isDecorated = $formatter->isDecorated();
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.