qossmic / deptrac

Keep your architecture clean.
https://qossmic.github.io/deptrac
MIT License
2.64k stars 134 forks source link

Problem with duplicate functions and classes #1414

Open plumthedev opened 6 months ago

plumthedev commented 6 months ago

While working on my PHP config for Deptrac, as recommended here, I noticed that there is a directory vendor in Deptrac library that contains duplicate functions or classes, which leads to name conflicts in my project. For example, I see two versions of the array_map() function: one from my project's namespace (DEPTRAC_202403\array_map()) and one dependent on the repository (array_map()). This is quite problematic as it makes coding difficult.

Is there a planned solution to this problem in future versions of the repository? If so, could you please specify when to expect these changes? If not, how I can solve that problem, I don't want to public config which duplicates functions and classes but in different namespace.

For now, the only workaround which I see is to install config only during CI/CD and then scan for violations of dependencies, but this will limit developers to see the scan results only during CI/CD which is not so good too.

gennadigennadigennadi commented 5 months ago

Where is the function definition inside of Deptrac located?

It might be related to the update php-scoped definition.