-
Notifications
You must be signed in to change notification settings - Fork 696
Closed
Description
Problem:
PSALM gives false positive errors of "cannot find file" if an include/require starts with '.' or '..'.
PSALM obviously uses the base path to resolve this as an relative path, but indeed PHP handles those paths in a special way, see documentation snippet below.
this was also stated in #268 (comment), but was not handled further.
from https://www.php.net/manual/en/function.include.php
If a path is defined — whether absolute (starting with a drive letter or \ on Windows, or / on Unix/Linux systems) or relative to the current directory (starting with . or ..) — the include_path will be ignored altogether. For example, if a filename begins with ../, the parser will look in the parent directory to find the requested file.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels