-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I work on a application that propose optional features that are only used when the corresponding extension is installed.
The following piece of code generates a SHADOW_DEPENDENCY
error:
if (\extension_loaded('posix') && \posix_geteuid() === 0) {
// ...
}
I can mark this error as ignored using either ignoreErrorsOnExtensionAndPaths()
or ignoreErrorsOnExtension()
, but it does not permit to target explicitely a precise code line to ignore. If in the future a contributor adds another usage of a function of the same extension, but without the proper check, it would not be detected.
The ideal solution for this use case, IMHO, would be to have a // @composer-dependency-analyser-ignore shadow-dependency
comment that could be added on the corresponding line code to ignore this specific line only.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request