-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Allow Upper Case property names #22265
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
ReflectionExtractor::getProperties() returns $id instead of $Id. It is bad naming convention, but is possible ``` class Entity { protected $Id; public function getId() { return $this->Id; } } ``` symfony/symfony#22265
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.
👍
Can you cover this with an unit test? |
Added phpunit tests You need manually rerun build checks:
|
small rebase needed |
should be merged on 2.7, isn't it? |
👍 |
Symfony 2.7+ So what to do now? It will be automatically merged into Symfony 3 too? |
@insekticid That's correct. We are merging bug fixes in the lowest branch where the bug exist and then merge it back to all other branches (2.8, 3.2, and master right now). Can you change the target of the PR and rebase it? Thanks. |
ReflectionExtractor::getProperties() returns $id instead of $Id. It is bad naming convention, but is possible ``` class Entity { protected $Id; public function getId() { return $this->Id; } } ``` # Conflicts: # src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php # src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.php
@fabpot PropertyInfo exists since Sf 2.8 so I remade patch-1 for remotes/origin/2.8 |
@insekticid You forgot to change the branch of the PR |
@fabpot where? in commit message? |
Thank you @insekticid. |
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #22265). Discussion ---------- Allow Upper Case property names ReflectionExtractor::getProperties() returns $id instead of $Id. It is bad naming convention, but is possible ``` class Entity { protected $Id; public function getId() { return $this->Id; } } ``` | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | no | License | MIT api-platform/core#1026 Commits ------- 2fe1631 Allow Upper Case property names
Nevermind, I've done the switch when merging. FYI, that's just after the PR title, the branch you asked this PR to be merged in. |
@fabpot aha, so next time a I should close old (this) pull req. and made new one to 2.8 branch? edit: found it :) Simply Edit this pull |
No need to close it. You can now (that was changed recentyl on Github) update the target on a PR. |
…ticid) This PR was merged into the 2.8 branch. Discussion ---------- Allow Upper Case property names in ObjectNormalizer | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | #22547 | License | MIT Same problem that has been fixed here #22265 and here api-platform/core#1037 ObjectNormalizer returns $id instead of $Id. It is bad naming convention, but is possible ```php class Entity { protected $Id; public function getId() { return $this->Id; } } ``` Commits ------- b2b4faa Allow Upper Case property names in ObjectNormalizer
| Q | A | ---------------- | ----- | Bug report? | yes | Feature request? | no | BC Break report? | yes | RFC? | no | Symfony version | 2.8.19 Same problem that has been fixed here symfony/symfony#22265 and here api-platform/core#1037 ObjectNormalizer returns $id instead of $Id. It is bad naming convention, but is possible ```php class Entity { protected $Id; public function getId() { return $this->Id; } } ```
…ticid) This PR was merged into the 2.8 branch. Discussion ---------- Allow Upper Case property names in ObjectNormalizer | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | #22547 | License | MIT Same problem that has been fixed here symfony/symfony#22265 and here api-platform/core#1037 ObjectNormalizer returns $id instead of $Id. It is bad naming convention, but is possible ```php class Entity { protected $Id; public function getId() { return $this->Id; } } ``` Commits ------- b2b4faa3c0 Allow Upper Case property names in ObjectNormalizer
ReflectionExtractor::getProperties() returns $id instead of $Id. It is bad naming convention, but is possible
api-platform/core#1026