-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] make parent constructor test more reliable #9244
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
Conversation
@@ -80,9 +80,6 @@ public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN') | |||
{ | |||
$this->name = $name; | |||
$this->version = $version; | |||
$this->catchExceptions = true; | |||
$this->autoExit = true; | |||
$this->commands = array(); |
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 changes related to moving the default values from the constructor to the properties should be reverted as it's not related to this PR and it's not consistent with the framework way of doing things.
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.
It's related because the original implementation is broken with this change. So it shows that the original implementation is not reliable.
Also in almost all other classes in symfony we initiliaze booleans and arrays at the property definitions. Just look in the routing or form component. You must have confused something here.
it also fixes the test since f2b60e9 and improves phpdoc
using possesive quantifier
Rebased |
@fabpot ping |
1 similar comment
@fabpot ping |
…ion) This PR was merged into the master branch. Discussion ---------- [Console] make parent constructor test more reliable | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Fixes | #9186 , f2b60e9 | Tests pass? | yes | license? | MIT It also fixes the test since f2b60e9 and improves phpdoc The second commit improves regex performance to validate name (using possesive quantifier). I did some basic performance tests http://3v4l.org/PuvuL The new regex only takes 1/3 of the time compared to the old one! Commits ------- 5798029 [Console] improve regex performance to validate name 22b09ce [Console] make parent constructor test more reliable
It also fixes the test since f2b60e9 and improves phpdoc
The second commit improves regex performance to validate name (using possesive quantifier).
I did some basic performance tests http://3v4l.org/PuvuL
The new regex only takes 1/3 of the time compared to the old one!