vimeo/psalm

Bug: psalm.xml cannot be loaded if a non-existent directory is specified

Open

#7.111 geöffnet am 9. Dez. 2021

Auf GitHub ansehen
 (2 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)PHP (668 Forks)batch import
Help wantedenhancement

Repository-Metriken

Stars
 (5.369 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 3T 12h) (5 gemergte PRs in 30 T)

Beschreibung

I just had this strange error

Problem parsing /var/www/html/psalm.xml: Could not resolve config path to /var/www/html/

thrown from here.

The cause was this snippet in my psalm.xml:

        <RedundantConditionGivenDocblockType>
            <errorLevel type="suppress">
                <directory name="bar/"/>
            </errorLevel>
        </RedundantConditionGivenDocblockType>

I just had moved bar to foo/bar. So it could not resolve bar (realpath in Line 168 returned false). That was hard to find because the error was not very informative. Maybe we could change that so that I can see the real mistake a bit more clearly? 😅

Contributor Guide