All the PHP files have the "@author" annotation to make clear which
people have contributed to that specific file, however, there is no such
thing in the PHPT files.
This commit will add the "CREDITS" section to the PHPT files. The list
of authors is created from the output of the `git blame` command.
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Instead of creating the Symfony constraints itself "Sf" accepts an
instance of "Symfony\Component\Validator\Constraint".
Creating objects inside a rule, specially from an external library,
makes the rule too complex and also limits the possibilities with the
"Sf" rule since Symfony allows users to create complex validations (even
thought their API is not as simple as ours).
This commit also simplifies the way the messages are passed from Symfony
to the "Sf" when only one constraint has failed; instead of passing
the message of the whole constraint violation list, only the fist
constraint violation message it passed.
The problem that this rule will always have is that when using "Not" to
invert the validation we have a way to get a proper message since
Symfony Validator only return the result of constraints that failed.
That's something the Respect\Validation does in a similar way and to
change it a lot has to be changed.
These changes were checked in "symfony/validator" 4.0 and the version
was added to the "composer.json" file.
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>