2017 © Pedro Peláez
 

library assert-constraint

Symfony validator constraints using beberlei/assert

image

myschoolmanagement/assert-constraint

Symfony validator constraints using beberlei/assert

  • Thursday, October 12, 2017
  • by iainmckay
  • Repository
  • 7 Watchers
  • 0 Stars
  • 35 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 13 % Grown

The README.md

Assert bridge for Symfony

Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

This is a simple bridge for using beberlei/assert assertions as constraints for the Symfony Validator component., (*2)

Installation

Using Composer:, (*3)

composer require myschoolmanagement/assert-constraint

Configuration

If you are using your own Assertion class or your own Exception class then you must configure these by setting AssertionConstraint\AssertionValidator::$assertClass and AssertionConstraint\AssertionValidator::$assertExceptionClass. These are both static properties., (*4)

Generating new constraints

There is a helper for generating the constraint classes in bin. This is also copied to vendor/bin., (*5)

Prototype

Usage: generate-constraints.php <path-to-class-file> <fqdn class> <output-namespace> <directory-to-output-classes>

Example Usage:

php vendor/bin/generate-constraints.php vendor/beberlei/assert/lib/Assert/Assertion.php Assert\\Assertion MyBundle\\Constraint src/MyBundle/Constraint

This will detect all the assertions on the Assert\Assertion class and output constraint files in src/MyBundle/Constraint in the MyBundle\Constraint namespace., (*6)

The generator will give best effort to detect the assertion parameters and add those to the constraint class so they can be configured through the annotation., (*7)

The Versions

12/10 2017

0.3.3

0.3.3.0

Symfony validator constraints using beberlei/assert

  Sources   Download

MIT

The Requires

 

by Iain Mckay

validation symfony assert assertion

11/10 2017

dev-master

9999999-dev

Symfony validator constraints using beberlei/assert

  Sources   Download

MIT

The Requires

 

by Iain Mckay

validation symfony assert assertion

11/10 2017

0.3.2

0.3.2.0

Symfony validator constraints using beberlei/assert

  Sources   Download

MIT

The Requires

 

by Iain Mckay

validation symfony assert assertion

14/12 2016

0.3.1

0.3.1.0

Symfony validator constraints using beberlei/assert

  Sources   Download

MIT

The Requires

 

by Iain Mckay

validation symfony assert assertion

14/12 2016

0.3.0

0.3.0.0

Symfony validator constraints using beberlei/assert

  Sources   Download

MIT

The Requires

 

by Iain Mckay

validation symfony assert assertion

12/05 2016

0.2.0

0.2.0.0

Symfony validator constraints using beberlei/assert

  Sources   Download

MIT

The Requires

 

by Iain Mckay

validation symfony assert assertion

21/04 2016

0.1.0

0.1.0.0

Symfony validator constraints using beberlei/assert

  Sources   Download

MIT

The Requires

 

by Iain Mckay

validation symfony assert assertion