respect-validation/composer.json
Henrique Moody 1da164a26e
Change how "Sf" rule works
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>
2018-08-22 17:46:21 +02:00

56 lines
1.8 KiB
JSON

{
"name": "respect/validation",
"description": "The most awesome validation engine ever created for PHP",
"keywords": ["respect", "validation", "validator"],
"type": "library",
"homepage": "http://respect.github.io/Validation/",
"license": "MIT",
"authors": [
{
"name": "Respect/Validation Contributors",
"homepage": "https://github.com/Respect/Validation/graphs/contributors"
}
],
"require": {
"php": ">=7.1",
"respect/stringifier": "^0.2.0",
"symfony/polyfill-mbstring": "^1.2"
},
"require-dev": {
"egulias/email-validator": "^2.0",
"friendsofphp/php-cs-fixer": "^2.8",
"malukenho/docheader": "^0.1.4",
"mikey179/vfsStream": "^1.6",
"phpunit/phpunit": "^6.4",
"symfony/validator": "^3.0||^4.0",
"zendframework/zend-validator": "^2.0"
},
"suggest": {
"ext-bcmath": "Arbitrary Precision Mathematics",
"ext-fileinfo": "File Information",
"ext-mbstring": "Multibyte String Functions",
"egulias/email-validator": "Strict (RFC compliant) email validation",
"symfony/validator": "Use Symfony validator through Respect\\Validation",
"zendframework/zend-validator": "Use Zend Framework validator through Respect\\Validation",
"friendsofphp/php-cs-fixer": "Fix PSR2 and other coding style issues"
},
"autoload": {
"psr-4": {
"Respect\\Validation\\": "library/"
}
},
"autoload-dev": {
"psr-4": {
"Respect\\Validation\\Test\\": "tests/library/"
}
},
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"scripts": {
"test": "./vendor/bin/phpunit"
}
}