Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[PropertyInfo] Fix an error in PropertyInfoCacheExtractor#19437
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
dunglas commentedJul 26, 2016
👍 Can you add a non-regression test please? |
2e351de to70a8de2CompareGuilhemN commentedJul 26, 2016
@dunglas done :) |
theofidry commentedJul 27, 2016
Or any good static code analyzer for that matter :P |
GuilhemN commentedJul 27, 2016
@theofidry yes of course (but it is slower) :P |
GuilhemN commentedJul 27, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I found another bug but I don't know why it happens... Edit: Ok it happens when the extractor returns |
theofidry commentedJul 27, 2016
did you try to dump the value? |
theofidry commentedJul 27, 2016
@Ener-Getick any idea of what the isset was not working? |
GuilhemN commentedJul 27, 2016
@theofidry yes sorry i forgot to answer you as i updated my message... |
theofidry commentedJul 27, 2016
IIRC |
GuilhemN commentedJul 27, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@theofidry it is cached in the cross requests cache but it is not fetched in the array cache which is only here because it is faster than the first one. So it will be cached anyway the only thing changing are the performances. |
| privatefunctionassertIsString($string) | ||
| { | ||
| if (!is_string($string)) { | ||
| thrownew \Exception(sprintf('"%s" expects strings, given "%s".',__CLASS__,gettype($string))); |
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.
InvalidArgumentException?
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 doesn't matter that much as it's a fixture but it's indeed more adapted here.
updated :)
`null` values aren't cached because of the use of `isset`
GuilhemN commentedAug 10, 2016
Should I change something else ? |
dunglas commentedAug 11, 2016
Ok for me. I'll merge it when I'll be back from vacation. |
nicolas-grekas commentedAug 11, 2016
👍 |
fabpot commentedAug 15, 2016
Thank you @Ener-Getick. |
…(Ener-Getick)This PR was squashed before being merged into the 3.1 branch (closes#19437).Discussion----------[PropertyInfo] Fix an error in PropertyInfoCacheExtractor| Q | A| ------------- | ---| Branch? | 3.1| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR |An argument was forgotten in the ``PropertyInfoCacheExtractor`` class leading to exceptions such as```PHP Warning: ucfirst() expects parameter 1 to be string, array given in /home/guilhem/github/ast-test/vendor/symfony/symfony/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php on line 318```and making it unusable.ping@dunglasCommits-------d19b151 [PropertyInfo] Fix an error in PropertyInfoCacheExtractor
Uh oh!
There was an error while loading.Please reload this page.
An argument was forgotten in the
PropertyInfoCacheExtractorclass leading to exceptions such asand making it unusable.
ping@dunglas