Skip to content

Fixed bugs in names of classes and methods. #19405

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

Closed
wants to merge 5 commits into from
Closed

Fixed bugs in names of classes and methods. #19405

wants to merge 5 commits into from

Conversation

zomberg
Copy link
Contributor

@zomberg zomberg commented Jul 22, 2016

Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets ~
License MIT
Doc PR ~

It's related to case sensitive.

I changed only calls of names of called methods but not definition of methods because BC.

@zomberg zomberg changed the title Fixed bugs in names of classes and methods. [WIP] Fixed bugs in names of classes and methods. Jul 22, 2016
@zomberg
Copy link
Contributor Author

zomberg commented Jul 22, 2016

After fixing CS suggestion from fabbot.io I got new error.
Code suggested by fabbot.io:

$instance->setBar(($this->get('foo')->foo().(($this->hasParameter('foo')) ? ($this->getParameter('foo')) : ('default'))));

Code generated by PhpDumper:

$instance->setBar(($this->get("foo")->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));

I renamed 'hasparameter' -> 'hasParameter' and get CS notification from fabbot.io - remove space and change type of quotes.

So PhpDumper generates code which cannot get CS verification by fabbot.io. I see 3 ways:

  1. Revert changes related with fabbot.io CS.
  2. Fix CS for generating dump.
  3. Change fabbot.io

I think first is the best. What do you think the best way solve this problem?

@stof
Copy link
Member

stof commented Jul 22, 2016

you should ignore CS changes asked by fabbot when they are about fixture files (I thought fabbot was ignoring these files, but it seems it does not)

@zomberg
Copy link
Contributor Author

zomberg commented Jul 22, 2016

Thanks, @stof. Reverted CS fixes for fixture files.

@zomberg zomberg changed the title [WIP] Fixed bugs in names of classes and methods. Fixed bugs in names of classes and methods. Jul 23, 2016
@javiereguiluz
Copy link
Member

👍

Status: reviewed

@zomberg thanks for these fixes. I wasn't aware about how many of these errors were on the code!

@@ -38,8 +38,8 @@ private function addSessionTable($tableName)
{
$table = $this->createTable($tableName);
$table->addColumn('sess_id', 'string');
$table->addColumn('sess_data', 'text')->setNotNull(true);
$table->addColumn('sess_time', 'integer')->setNotNull(true)->setUnsigned(true);
$table->addColumn('sess_data', 'text')->setNotnull(true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather change the method name here, WDYT?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hum ok, it's in doctrine, not our code... then I prefer our way :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me Symfony way is better too. But I think that we must use it as in declaration.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We must not, at least not technically (proof: it works without any issue)
Did you try submitting on doctrine?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I will revert this change and create pull-request to Doctrine. Will it ok?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes for me

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted this renaming.

@nicolas-grekas
Copy link
Member

Thank you @zomberg.

nicolas-grekas added a commit that referenced this pull request Jul 26, 2016
This PR was squashed before being merged into the 2.7 branch (closes #19405).

Discussion
----------

Fixed bugs in names of classes and methods.

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | ~

It's related to case sensitive.

I changed only calls of names of called methods but not definition of methods because BC.

Commits
-------

c41aa03 Fixed bugs in names of classes and methods.
@zomberg zomberg deleted the bugs_in_case_sensitive_names branch July 26, 2016 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants