From 782f2613cc31fb5a2c14983f2fd93df58d621aeb Mon Sep 17 00:00:00 2001 From: Matthew Thomas Date: Fri, 3 Aug 2018 10:55:13 +0100 Subject: [PATCH] opcode optimizations Using '\get_class(...)' would enable some of the opcode optimizations and result in fewer lookups. --- validation/custom_constraint.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validation/custom_constraint.rst b/validation/custom_constraint.rst index e456a6b7c5a..3ae4d1f855a 100644 --- a/validation/custom_constraint.rst +++ b/validation/custom_constraint.rst @@ -45,7 +45,7 @@ includes some simple default logic:: // in the base Symfony\Component\Validator\Constraint class public function validatedBy() { - return get_class($this).'Validator'; + return \get_class($this).'Validator'; } In other words, if you create a custom ``Constraint`` (e.g. ``MyConstraint``),