-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Adding a deprecation note about DialogHelper #12737
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,14 +20,20 @@ | |
* @author Fabien Potencier <[email protected]> | ||
* | ||
* @deprecated Deprecated since version 2.5, to be removed in 3.0. | ||
* Use the question helper instead. | ||
* Use {@link \Symfony\Component\Console\Helper\QuestionHelper} instead. | ||
*/ | ||
class DialogHelper extends InputAwareHelper | ||
{ | ||
private $inputStream; | ||
private static $shell; | ||
private static $stty; | ||
|
||
public function __construct() | ||
{ | ||
trigger_error('DialogHelper is deprecated since version 2.5 and will be removed in 3.0. Use QuestionHelper instead.', E_USER_DEPRECATED); | ||
|
||
parent::__construct(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is throwing a PHP Fatal Error as there is no parent constructor. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've modified my code, but I don't know how to commit now. Could you please help me? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rodrigobb You will have to create a new pull request as this one has already been merged. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've created a new PR #12759. Could someone check everything is ok now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new PR doesn't appear to remove the constructor call that causes the fatal error There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK it does :-) GitHub doing odd things with the diff. |
||
} | ||
/** | ||
* Asks the user to select a value. | ||
* | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary to create constructor? Should be sufficient to add this after the class namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stack trace is more precise when done in the constructor (I think).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, could be. I just think we should do this consistently in all classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this really matters. And having only one notice instead of one per instance is good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicolas-grekas Right.
@rodrigobb Can you move the line to the beginning of the file? Just after the namespace declaration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done a commit and push but as the PR is closed it doesn't appear here. How should I do it?