Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

Commitf21ee5f

Browse files
committed
Remove HelperSet::setCommand() and getCommand()
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent7a3ab9e commitf21ee5f

File tree

3 files changed

+1
-52
lines changed

3 files changed

+1
-52
lines changed

‎src/Symfony/Component/Console/CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ CHANGELOG
88
* Remove`Helper::strlen()`, use`Helper::width()` instead
99
* Remove`Helper::strlenWithoutDecoration()`, use`Helper::removeDecoration()` instead
1010
*`AddConsoleCommandPass` can not be configured anymore
11+
* Remove`HelperSet::setCommand()` and`getCommand()` without replacement
1112

1213
5.4
1314
---

‎src/Symfony/Component/Console/Helper/HelperSet.php‎

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class HelperSet implements \IteratorAggregate
2525
* @var Helper[]
2626
*/
2727
private$helpers = [];
28-
private$command;
2928

3029
/**
3130
* @param Helper[] $helpers An array of helper
@@ -69,28 +68,6 @@ public function get(string $name): HelperInterface
6968
return$this->helpers[$name];
7069
}
7170

72-
/**
73-
* @deprecated since Symfony 5.4
74-
*/
75-
publicfunctionsetCommand(Command$command =null)
76-
{
77-
trigger_deprecation('symfony/console','5.4','Method "%s()" is deprecated.',__METHOD__);
78-
79-
$this->command =$command;
80-
}
81-
82-
/**
83-
* Gets the command associated with this helper set.
84-
*
85-
* @deprecated since Symfony 5.4
86-
*/
87-
publicfunctiongetCommand():Command
88-
{
89-
trigger_deprecation('symfony/console','5.4','Method "%s()" is deprecated.',__METHOD__);
90-
91-
return$this->command;
92-
}
93-
9471
/**
9572
* @return \Traversable<string, Helper>
9673
*/

‎src/Symfony/Component/Console/Tests/Helper/HelperSetTest.php‎

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -74,35 +74,6 @@ public function testGet()
7474
}
7575
}
7676

77-
/**
78-
* @group legacy
79-
*/
80-
publicfunctiontestSetCommand()
81-
{
82-
$cmd_01 =newCommand('foo');
83-
$cmd_02 =newCommand('bar');
84-
85-
$helperset =newHelperSet();
86-
$helperset->setCommand($cmd_01);
87-
$this->assertEquals($cmd_01,$helperset->getCommand(),'->setCommand() stores given command');
88-
89-
$helperset =newHelperSet();
90-
$helperset->setCommand($cmd_01);
91-
$helperset->setCommand($cmd_02);
92-
$this->assertEquals($cmd_02,$helperset->getCommand(),'->setCommand() overwrites stored command with consecutive calls');
93-
}
94-
95-
/**
96-
* @group legacy
97-
*/
98-
publicfunctiontestGetCommand()
99-
{
100-
$cmd =newCommand('foo');
101-
$helperset =newHelperSet();
102-
$helperset->setCommand($cmd);
103-
$this->assertEquals($cmd,$helperset->getCommand(),'->getCommand() retrieves stored command');
104-
}
105-
10677
publicfunctiontestIteration()
10778
{
10879
$helperset =newHelperSet();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp