-
-
Notifications
You must be signed in to change notification settings - Fork 85
#71 Null value matching problem #75
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
#71 Null value matching problem #75
Conversation
0a117a1
to
9518da0
Compare
@norzechowicz if we want to fix nullable value then we cannot rely on What do you think? Have you got any advices? |
@@ -203,6 +203,7 @@ private function getPropertyAccessor() | |||
} | |||
|
|||
$accessorBuilder = PropertyAccess::createPropertyAccessorBuilder(); | |||
$accessorBuilder->enableExceptionOnInvalidIndex(); |
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.
why u enabled that option?
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.
if exceptionOnInvalidIndex
is disabled then isReadable
method returns true
for unexisting properties of array, but if this option is enabled isReadable
method catches all exceptions (eg InvalidIndex) and returns false
. That's why I enabled exceptions.
Unfortunately this method was added in 2.5
e.g.
https://github.com/symfony/property-access/blob/2.5/PropertyAccessor.php#L134
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.
Well in that case I guess you can just update dependency to 2.5^
in this PR (it will be tagged as 2.0 anyway). Recommended solution for versions 1.0
and 1.1
will be update to 2.0
for now, and maybe somebody will find a way to fix it also there.
I've prepared compatible version with @norzechowicz cr ping |
wow cool! Could you please squash those commits into one? I would need to cherry pick them to version 1.1 and 1.0 also probably. |
25d7696
to
d7fdd51
Compare
@norzechowicz done |
@partikus thanks! I will merge it later, after that I will merge OR operator and then I will release rc2. 👍 |
@norzechowicz good news, thanks! |
#71 Null value matching problem
@norzechowicz code review please