我通过JMS序列化器配置了验证组,它可以与批注一起正常工作,但XML配置不起作用
Inside app/config/config.yml:
jms_serializer:
metadata:
cache: file
debug: "%kernel.debug%"
file_cache:
dir: "%kernel.cache_dir%/serializer"
directories:
JustinCaptureCoreBundle:
namespace_prefix: 'Justin\Bundle\Capture\CoreBundle\Entity\User'
path: '@JustinCaptureCoreBundle/Resources/config/serializer'
handlers:
datetime:
default_format: "c"
default_timezone: "UTC"
我没有错误,但是未显示下面定义的属性 资源/配置/序列化器/User.yml:
JustinCaptureCoreBundle:
exclusion_policy: none
properties:
id:
type: integer
username:
type: string
groups: ['ws_getusers']