Commit Graph

16873 Commits

Author SHA1 Message Date
Bernhard Schussek
3dc2b4d861 [Validator] Made "symfony/property-access" an optional dependency 2014-03-30 18:31:31 +02:00
Bernhard Schussek
c5629bb7ee [Validator] Added getObject() to ExecutionContextInterface 2014-03-30 18:31:00 +02:00
Bernhard Schussek
9b204c9354 [FrameworkBundle] Implemented configuration to select the desired Validator API 2014-03-30 18:31:00 +02:00
Bernhard Schussek
0946dbe7a0 [Validator] Adapted CHANGELOG 2014-03-30 18:30:09 +02:00
Bernhard Schussek
1b111d0e83 [Validator] Fixed typos pointed out by @cordoval 2014-03-30 18:30:09 +02:00
Bernhard Schussek
7bc952de55 [Validator] Improved inline documentation of RecursiveContextualValidator 2014-03-30 18:30:09 +02:00
Bernhard Schussek
166d71a7de [Validator] Removed unused property 2014-03-30 18:30:09 +02:00
Bernhard Schussek
90c27bb1e7 [Validator] Removed traverser implementation
The traverser is too slow compared to the current, recursive approach.
Testing showed a performance decrease of about 70% without a lot of
optimization potential.
2014-03-30 18:30:09 +02:00
Bernhard Schussek
3183aed7cd [Validator] Improved performance of cache key generation 2014-03-30 18:30:09 +02:00
Bernhard Schussek
029a71638e [Validator] Moved logic of replaceDefaultGroup() to validateNode() 2014-03-30 18:30:09 +02:00
Bernhard Schussek
2f23d9725b [Validator] Reduced number of method calls on the execution context 2014-03-30 18:30:09 +02:00
Bernhard Schussek
73c9cc5806 [Validator] Optimized performance by calling spl_object_hash() only once per object 2014-03-30 18:30:09 +02:00
Bernhard Schussek
94ef21e495 [Validator] Optimized use statements 2014-03-30 18:30:09 +02:00
Bernhard Schussek
1622eb3a98 [Validator] Fixed reference to removed class in ValidatorBuilder 2014-03-30 18:28:59 +02:00
Bernhard Schussek
be508e01dd [Validator] Merged DefaultGroupReplacingVisitor and ContextUpdateVisitor into NodeValidationVisitor 2014-03-30 18:28:59 +02:00
Bernhard Schussek
50bb84d06b [Validator] Optimized RecursiveContextualValidator 2014-03-30 18:28:59 +02:00
Bernhard Schussek
eed29d8ad3 [Validator] Improved performance of *ContextualValidator::validate() 2014-03-30 18:28:59 +02:00
Bernhard Schussek
5c479d803c [Validator] Simplified validateNodeForGroup 2014-03-30 18:28:59 +02:00
Bernhard Schussek
eeed509dfc [Validator] Improved phpdoc of RecursiveValidator 2014-03-30 18:28:59 +02:00
Bernhard Schussek
274d4e6195 [Validator] Changed ValidatorBuilder to always use LegacyExecutionContext
This is necessary because, until Symfony 3.0, constraint validators will continue
to rely on the old context methods in order to be backwards compatible.
2014-03-30 18:28:59 +02:00
Bernhard Schussek
38e26fbcaf [Validator] Decoupled RecursiveContextualValidator from Node 2014-03-30 18:28:59 +02:00
Bernhard Schussek
23534ca6ab [Validator] Added a recursive clone of the new implementation for speed comparison 2014-03-30 18:28:59 +02:00
Bernhard Schussek
f61d31e5fa [Validator] Fixed grammar 2014-03-30 18:28:58 +02:00
Bernhard Schussek
886e05e7ed [Validator] Removed unused use statement 2014-03-30 18:28:58 +02:00
Bernhard Schussek
93fdff764a [Validator] The supported API versions can now be passed to the ValidatorBuilder 2014-03-30 18:28:58 +02:00
Bernhard Schussek
987313d315 [Validator] Improved inline documentation of the violation builder 2014-03-30 18:28:58 +02:00
Bernhard Schussek
79387a7d5e [Validator] Improved inline documentation of the metadata classes 2014-03-30 18:28:58 +02:00
Bernhard Schussek
01ceeda376 [Validator] Improved test coverage of the Traverse constraint 2014-03-30 18:28:58 +02:00
Bernhard Schussek
9ca61df923 [Validator] Improved inline documentation of CascadingStrategy and TraversalStrategy 2014-03-30 18:28:58 +02:00
Bernhard Schussek
524a9538bc [Validator] Improved inline documentation of the validators 2014-03-30 18:28:58 +02:00
Bernhard Schussek
9986f03ce2 [Validator] Added inline documentation for the PropertyPath utility class 2014-03-30 18:28:58 +02:00
Bernhard Schussek
be7f055237 [Validator] Visitors may now abort the traversal by returning false from beforeTraversal() 2014-03-30 18:28:58 +02:00
Bernhard Schussek
299c2dca10 [Validator] Improved test coverage and prevented duplicate validation of constraints 2014-03-30 18:28:58 +02:00
Bernhard Schussek
186c115894 [Validator] Improved test coverage of NonRecursiveNodeTraverser 2014-03-30 18:28:58 +02:00
Bernhard Schussek
822fe4712f [Validator] Completed inline documentation of the Node classes and the NodeTraverser 2014-03-30 18:28:58 +02:00
Bernhard Schussek
dbce5a2f6a [Validator] Updated outdated doc blocks 2014-03-30 18:28:58 +02:00
Bernhard Schussek
8558377945 [Validator] Added deprecation notes 2014-03-30 18:28:57 +02:00
Bernhard Schussek
e8fa15b27c [Validator] Fixed the new validator API under PHP < 5.3.9 2014-03-30 18:28:57 +02:00
Bernhard Schussek
2936d10aa4 [Validator] Removed unused use statement 2014-03-30 18:28:57 +02:00
Bernhard Schussek
6fc6ecdd8e [Validator] Fixed tests under PHP<5.3.9
The new implementation is disabled on those PHP versions.
2014-03-30 18:28:57 +02:00
Bernhard Schussek
778ec2458b [Validator] Removed helper class Traversal 2014-03-30 18:28:57 +02:00
Bernhard Schussek
76d8c9a1f7 [Validator] Fixed typos 2014-03-30 18:28:57 +02:00
Bernhard Schussek
416137165e [Validator] Removed unused use statements 2014-03-30 18:28:57 +02:00
Bernhard Schussek
aeb68228b1 [Validator] Improved visitor names 2014-03-30 18:28:56 +02:00
Bernhard Schussek
08172bfe7b [Validator] Merged validate(), validateObject() and validateObjects() to simplify usage 2014-03-30 18:28:56 +02:00
Bernhard Schussek
51197f68a3 [Validator] Made traversal of Traversables consistent
If the traversal strategy is IMPLICIT (the default), the validator will now
traverse any object that implements \Traversable and any array
2014-03-30 18:28:56 +02:00
Bernhard Schussek
117b1b9a17 [Validator] Wrapped collections into CollectionNode instances 2014-03-30 18:28:56 +02:00
Bernhard Schussek
94583a9289 [Validator] Changed NodeTraverser to traverse nodes iteratively, not recursively
In this way, the deep method call chains are avoided. Also, it is possible to
avoid the many calls to leaveNode(), which are currently not really needed.
2014-03-30 18:28:56 +02:00
Bernhard Schussek
cf1281feef [Validator] Added "Visitor" suffix to all node visitors 2014-03-30 18:28:56 +02:00
Bernhard Schussek
230f2a72fa [Validator] Fixed exception message 2014-03-30 18:28:56 +02:00