Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vendor directory combined with an empty composer file. #1410

Closed
ulftietze opened this issue Apr 19, 2024 · 1 comment
Closed

Vendor directory combined with an empty composer file. #1410

ulftietze opened this issue Apr 19, 2024 · 1 comment

Comments

@ulftietze
Copy link

Issue Description:
Currently, Deptrac's composer.json file does not list any dependencies. Instead, all necessary dependencies are included directly within the vendor directory and are version-controlled within the git repository. This approach has an unintended side effect: running composer install on the project leads to the deletion of the entire vendor directory. This is because Composer, recognizing no dependencies are declared in composer.json, assumes no packages need to be installed and thus clears the existing vendor directory.

Screenshot 2024-04-19 at 14 06 32

Impact:
This behavior could disrupt development workflows and might lead to inconsistencies or errors, especially for new contributors or when updating dependencies. Moreover, for a tool dedicated to maintaining clean and manageable architectures, having dependencies checked into version control somewhat contradicts the principle of dependency management best practices.

Screenshot 2024-04-19 at 14 06 13

Suggested Improvement:
It would be beneficial to manage dependencies via Composer by declaring them in composer.json. This change would leverage Composer’s ability to handle dependency resolution and ensure that the vendor directory is managed in a conventional manner, reducing the risk of accidental deletions and improving overall project maintainability.

@gennadigennadigennadi
Copy link
Member

@ulftietze Thank you for your afford.

The current documentation is really rough around the edges.

This is not the development, but the distribution repository. Therefore please don't use it as one, instead jump over to qossmic/deptrac-src (I just updated the documentation ;-)).

The vendor directory contains deptracs scoped dependencies and it has it's specific purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants