{"shas":[["2f78a44175ae445826060a719017e8ba2d6a3227","d167beb5181067052cda9015ee1ea354bc29b0fc@gmx.net","Changed recognition of constraints in annoations","Sebastian Hörl"],["462070058a8b9fd1bc355505c05a0f530baad3a4","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","merged branch blogsh/constraints (PR #1393)\n\nCommits\n-------\n\n2f78a44 Changed recognition of constraints in annoations\n\nDiscussion\n----------\n\n[Validator] Changed recognition of constraints in annotations\n\nI accidently added a constraint to a setter method of an entity:\n\n    /**\n     * @Assert\\MinLength(2)\n     */\n    public function setName($name)\n    { ... }\n\nThe result was that the framework generated the following exception:\n\n     Neither method getTName nor isTName exists in class Blogsh\\TestBundle\\Entity\\User\n\nThe problem is that ClassMetadata::addGetterConstraint is called even if the inspected method isn't a getter or an isser.The fix changes the behaviour so that an exception is thrown, saying that it is not valid to add a constraint there. I'm not sure whether this is the right way to handle that problem. It would also be possible to remove the exception and just ignore constraints added to inapplicable methods.\nHowever, the fix prevents the strange error messages from the user.","Fabien Potencier"],["1c36d5a5298b3c311f08f4348d9c4675733bb342","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","[Validator] tweaked previous merge","Fabien Potencier"]],"ref":"refs/heads/master","size":3,"head":"1c36d5a5298b3c311f08f4348d9c4675733bb342","push_id":34552402}