我创建了一个 symfony 包,在创建它时可以使用,但是当我将它移到其他地方时,它给了我以下错误:
致命错误:在线 /home/nagel/sites/battlemamono/vendor/symfony/symfony/src/Symfony/Component/Validator/Mapping/Loader/AbstractLoader.php 中找不到类“Symfony\Component\Validator\Constraints\type” 63
这是一个验证器错误,我拥有的唯一验证器是:
Battlemamono\DatabaseBundle\Entity\Mamono:
constraints:
- Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity:
fields: name
message: A mamono with this name already exists.
groups: [creation]
properties:
id:
- type: integer
name:
- NotBlank: ~
- MaxLength: 30
- type: string
family1:
- NotBlank: ~
- MaxLength: 30
- type: string
- Choice : { callback: getFamily }
family2:
- MaxLength: 30
- type: string
- Choice : { callback: getFamily }
element1:
- NotBlank: ~
- MaxLength: 30
- type: string
- Choice : { callback: getElements }
element2:
- MaxLength: 30
- type: string
- Choice : { callback: getElements }
disposition:
- NotBlank: ~
- MaxLength: 100
- type: string
diet:
- NotBlank: ~
- MaxLength: 100
- type: string
previousForm:
- MaxLength: 30
- type: string
nextForm:
- MaxLength: 30
- type: string
evolution:
- MaxLength: 30
- type: string
evolutionLove:
- type: bool
tags:
- type: string
- MaxLength: 100
description:
- type: string
- NotBlank: ~
我不知道它为什么这样做。