lukaszwit / error-extractor
0.1.0
2017-08-23 19:36 UTC
Requires
- php: ^7.0
- symfony/form: ^3.0
- symfony/validator: ^3.0
Requires (Dev)
- phpunit/phpunit: ^6.0
- symfony/var-dumper: ^3.0
This package is not auto-updated.
Last update: 2024-12-22 04:27:28 UTC
README
composer require 'lukaszwit/error-extractor'
Usage
$validator = \Symfony\Component\Validator\Validation::createValidator(); $violations = $validator->validate('Bernhard', array( new \Symfony\Component\Validator\Constraints\Length(array('min' => 10)), )); $simpleViolations = \Lukaszwit\ErrorExtractor\ViolationSimplifier::simplify(...$violations);
Running tests
To run test without code coverage:
vendor/bin/phpunit --no-coverage
To run test with code coverage:
phpdbg -qrr ./vendor/bin/phpunit