8000 [Console] Add method `__toString()` to `InputInterface` by nicolas-grekas · Pull Request #44746 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Console] Add method __toString() to InputInterface #44746

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

Merged
merged 1 commit into from
Dec 21, 2021
Merged
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
5 changes: 5 additions & 0 deletions src/Symfony/Component/Console/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

6.1
---

* Add method `__toString()` to `InputInterface`

6.0
---

Expand Down
3 changes: 3 additions & 0 deletions src/Symfony/Component/Console/Input/InputInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
* InputInterface is the interface implemented by all input classes.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @method string __toString() Returns a stringified representation of the args passed to the command.
* InputArguments MUST be escaped as well as the InputOption values passed to the command.
*/
interface InputInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,9 @@ public function getParameterOption($values, $default = false, $onlyParams = fals
public function parse()
{
}

public function __toString(): string
{
return '';
}
}
0