spaze / phpstan-disallowed-calls

PHPStan rules to detect disallowed method & function calls, constant, namespace, attribute & superglobal usages
MIT License
255 stars 17 forks source link

Can now specify root dir for all `allowIn` paths #102

Closed spaze closed 2 years ago

spaze commented 2 years ago

Seems I can't get the "root" directory in an automated way. Directives like ignoreError's path/paths resolve relative paths based on the directory of the config file is in but those are special cases which I can't add into.

That said, this introduces allowInRootDir which is used to resolve relative paths in allowIn paths and can be specified like

parameters:
    allowInRootDir: %rootDir%/../../..

Fix #100