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
Foo must not depend on Baz (Foo on Baz)
/sandbox/Bar.php::8
Bar::5 ->
Baz::8
Foo must not depend on Baz (Foo on Baz)
/sandbox/Bar.php::7
Bar::5 ->
Baz::7
Looks like the fact that the method is private is ignored. I would understand this as violation if it was protected.
The text was updated successfully, but these errors were encountered:
What is worse, the Bar class don't need to expose the dependency in its interface at all. It looks like it just need to use it internally to trigger the violation.
This is an indirect dependency. Deptrac does is only a static analyser and doesn't know about the runtime path. I could imagine the private function is being used by a protected or public method in Bar which itself is being used by Foo or will be promoted to the public methods of Foo. If none of this is true this method is probably unused and can be safely deleted or you have might have a bad abstraction.
The PHP code:
depfile.yml
Result of analysis:
Looks like the fact that the method is private is ignored. I would understand this as violation if it was protected.
The text was updated successfully, but these errors were encountered: