Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Merged
merged 2 commits into from
Oct 31, 2013

Conversation

Tobion
Copy link
Contributor

@Tobion Tobion commented Oct 8, 2013

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!

@@ -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();
Copy link
Member

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.

Copy link
Contributor Author

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
@Tobion
Copy link
Contributor Author

Tobion commented Oct 11, 2013

Rebased

@Tobion
Copy link
Contributor Author

Tobion commented Oct 16, 2013

@fabpot ping

1 similar comment
@Tobion
Copy link
Contributor Author

Tobion commented Oct 31, 2013

@fabpot ping

fabpot added a commit that referenced this pull request Oct 31, 2013
…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
@fabpot fabpot merged commit 5798029 into symfony:master Oct 31, 2013
@Tobion Tobion deleted the console-parent-constructor branch October 31, 2013 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants