You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Function calls like var_dump are not detected in by the the Rule/Class DevelopmentCodeFragment.
It sees the calls as in my case string(21) "composerlink\var_dump" where composerlink is the root namespace.
This has to do with the namespace, but in the namespace composerlink a method var_dump doesn't exist at all.
PHP Just uses the internal var_dump method, and you should expect phpmd to fail on this, except when you define a method var_dump in that namespace. (When ignore-namespace is true it should always fail).
Current Behavior
No violations detected
Expected Behavior
86 | VIOLATION | The method LinkManager::linkPackage() calls the typical debug function var_dump() which is mostly only used during development.
Steps To Reproduce:
Add var_dump somewhere in your code, and run ./vendor/bin/phpmd ./src ansi design
Additional info
With the following configuration it works like excepted, but disables the ability to define one of these methods in any namespace.
Function calls like
var_dump
are not detected in by the the Rule/ClassDevelopmentCodeFragment
.It sees the calls as in my case
string(21) "composerlink\var_dump"
wherecomposerlink
is the root namespace.This has to do with the namespace, but in the namespace
composerlink
a methodvar_dump
doesn't exist at all.PHP Just uses the internal
var_dump
method, and you should expect phpmd to fail on this, except when you define a methodvar_dump
in that namespace. (Whenignore-namespace
is true it should always fail).Current Behavior
No violations detected
Expected Behavior
Steps To Reproduce:
Add
var_dump
somewhere in your code, and run./vendor/bin/phpmd ./src ansi design
Additional info
With the following configuration it works like excepted, but disables the ability to define one of these methods in any namespace.
Checks before submitting
The text was updated successfully, but these errors were encountered: