orm icon indicating copy to clipboard operation
orm copied to clipboard

Conflict with symfony/validator,Semantical Error

Open visonforcoding opened this issue 3 years ago • 3 comments

Package version, Laravel version

laravel-doctrine/orm": "^1.6",

"laravel/lumen-framework": "^7.2",

Expected behaviour

use Symfony\Component\Validator\Constraints as Assert;

class PushInfo
{
    /**
     * 
     * @var string
     * @Assert\NotBlank()
     */
    protected $bizId;
}

$va = sfvalidation();
        $errors = $va->validate($pushInfo);

can work

Actual behaviour

i got a exception [Semantical Error] The annotation \"@Symfony\\Component\\Validator\\Constraints\\NotBlank\" in property App\\Utils\\HllPush\\PushInfo::$bizId was never imported. Did you maybe forget to add a \"use\" statement for this annotation?

Steps to reproduce the behaviour

when i delete DoctrineServiceProvider

image

it can work right!

visonforcoding avatar Mar 03 '22 02:03 visonforcoding

Which version of symfony/validator are you using?

eigan avatar Mar 03 '22 06:03 eigan

Which version of symfony/validator are you using?

v5.3.10

visonforcoding avatar Mar 03 '22 06:03 visonforcoding

This might have been related to #537. Did you solve it somehow, or could you try update extensions or acl if you use those?

eigan avatar Jan 25 '23 17:01 eigan