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

Aliased attribute NS usage reported as unknown function #120

Closed trearcul closed 5 months ago

trearcul commented 5 months ago

Hello, first of all I would like to thank you for adding function usages detection.

Unfortunately I've just tried to update to version 1.5 and the analyser started to report all attribute usages with aliased namespace imports as unknown function. (Aliased class imports works fine)

Reported error:

Unknown functions!
(those are not declared, so we cannot check them)

  • Doctrine\ORM\Mapping\Entity
      src/Foo/Bar/Baz.php:9

Simplified reported code:

<?php

declare(strict_types=1);

namespace Foo\Bar;

use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity(readOnly: true)]
class Baz
{
janedbal commented 5 months ago

Thank you for report, dev-master should work now, I'll soon tag the fixed version.