shipmonk-rnd / composer-dependency-analyser

🚀 Fast detection of composer dependency issues (unused dependencies, shadow dependencies, misplaced dependencies)
MIT License
400 stars 10 forks source link

Multiple attributes reported as unknown functions #123

Closed Mika- closed 5 months ago

Mika- commented 5 months ago

Multiple attributes are reported as unknown when using array notation.

<?php
use Symfony\Component\Validator\Constraints as Assert;

class User {
    #[
        Assert\NotNull(message: 'Field is mandatory'),
        Assert\NotBlank(message: 'Field is mandatory'),
    ]
    private string $name;
}

This only seems to happen when attributes have parameters as #[Assert\NotNull, Assert\NotBlank] doesn't rise errors.

janedbal commented 5 months ago

Thank you! Should be fixed in dev-master, I'll release the fix soon.

janedbal commented 5 months ago

Fixed in 1.5.2