You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the Validator as a stand-alone component (ie I'm not using the full Symfony framework).
On the Loading Resources page it says I can use Annotation mapping by simply calling enableAnnotationMapping().
I was getting an error The annotation "@Symfony\Component\Validator\Constraints\NotBlank" in property MyClasss::$myProperty does not exist, or could not be auto-loaded.
I tried adding the telling the registry about the Symfony\Component\Validator\Constraints namespace and directory but had no luck as it looks for $dir/Symfony/Component/Validator/Constraints/NotBlank.php instead of $dir/NotBlank.php.
I ended up telling the AnnotationRegistry about my autoloaders:
I'm using the Validator as a stand-alone component (ie I'm not using the full Symfony framework).
On the Loading Resources page it says I can use Annotation mapping by simply calling
enableAnnotationMapping()
.I was getting an error
The annotation "@Symfony\Component\Validator\Constraints\NotBlank" in property MyClasss::$myProperty does not exist, or could not be auto-loaded.
I tried adding the telling the registry about the
Symfony\Component\Validator\Constraints
namespace and directory but had no luck as it looks for$dir/Symfony/Component/Validator/Constraints/NotBlank.php
instead of$dir/NotBlank.php
.I ended up telling the
AnnotationRegistry
about my autoloaders:Should this be added to the documentation or am I doing something wrong?
The text was updated successfully, but these errors were encountered: