symfony/symfony — pull request #4573 by Gator92 (2012-06-14 01:21:56+00:00)
Title: [WIP][Validator][Tests][Constraints] invalid value passed

Bug fix: not sure
Feature addition: no
Backwards compatibility break: not sure
Symfony2 tests pass: no
Fixes the following tickets: 4398
Todo: -
License of the code: MIT
Documentation PR: -

This is regarding the proposed bug for an invalid value of a given constraint (Max Length) not being passed to the constraint violation object (similar code can be found in other constraints as well). At first glance, it did seem that the original value would not being passed to the violation object as documented. We set up a quick test, to verify this - and it does fail. The constraint violation object does contain null, instead of the passed property value. If this is not desired behavior, fixing the constraint would be rather trivial. However, I'd propose making a TestExecutionContext object of the "real execution context" illustrated in the constraint test diff, so that future and existing constraints could be more finely tested.