laravel-doctrine / orm

An integration library for Laravel and Doctrine ORM
MIT License
829 stars 178 forks source link

Conflict with symfony/validator,Semantical Error #521

Closed visonforcoding closed 1 month ago

visonforcoding commented 2 years ago

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!

eigan commented 2 years ago

Which version of symfony/validator are you using?

visonforcoding commented 2 years ago

Which version of symfony/validator are you using?

v5.3.10

eigan commented 1 year ago

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

TomHAnderson commented 1 month ago

Annotations are no longer supported >= 3.0