Skip to content

merge deptrac src#1471

Merged
gennadigennadigennadi merged 6 commits into
4.0.xfrom
merge-deptrac-src
Jun 28, 2025
Merged

merge deptrac src#1471
gennadigennadigennadi merged 6 commits into
4.0.xfrom
merge-deptrac-src

Conversation

@gennadigennadigennadi

@gennadigennadigennadi gennadigennadigennadi commented Jun 25, 2025

Copy link
Copy Markdown
Collaborator

Combine deptrac-src and deptrac, aka get ride of the scoped approach.

This should make the deptrac-src repo obsolete, but it still misses an updated documentation how to install a not-scoped deptrac. @patrickkusebauch do you think you could help out if that?

@gennadigennadigennadi gennadigennadigennadi force-pushed the merge-deptrac-src branch 2 times, most recently from 84c24fe to 97e874b Compare June 25, 2025 21:02
@gennadigennadigennadi gennadigennadigennadi marked this pull request as ready for review June 25, 2025 21:08
@patrickkusebauch

Copy link
Copy Markdown
Collaborator

I will be happy to help. Pretty busy on Thursday, but rest of the week I shall find time to take a look. The more info you can provide into what are your expectations from me, the better.

@patrickkusebauch

Copy link
Copy Markdown
Collaborator

Are you looking for documentation as to how to "scope" deptrac using bamarni/composer-bin-plugin for those that would encounter conflicts?

@gennadigennadigennadi

Copy link
Copy Markdown
Collaborator Author

Are you looking for documentation as to how to "scope" deptrac using bamarni/composer-bin-plugin for those that would encounter conflicts?

Exactly.

What do you think about dropping the composer.lock and widen the Symfony dependencies? This would help reduce the conflict potential with project dependencies.

@patrickkusebauch

Copy link
Copy Markdown
Collaborator

What I foresee the impact of dropping composer.lock to be:

  • In the CI pipeline, it has to be generated on the fly, instead of being reused
  • Therefore, if the on-the-fly generated list of dependencies introduces a bug, it will fail the CI for PR unrelated bug.
  • This is good because: We discover an issue from the dependency definition in composer.json
  • This is bad because: The PR submitted will fail for reasons unrelated to the content of the PR.
  • What would I ideally do: Keep the composer.lock, BUT. In PR CI GitHub actions, use the existing composer.lock to install dependencies. At the same time, create a nightly/weekly build/CI step that will run all the tests from a freshly generated composer.lock file. The effect is the separation of failures. The PR will only fail when the code submitted fails, and the nightly build will fail only if a bug in the dependencies is introduced.

What do I think about widening Symfony dependencies:

  • Looking at the proposed composer.json file, I am happy with how it looks right now. I think that having the constraint on a major version is a good way to go about it.
  • The only dependency that we could loosen is IMHO jetbrains/phpstorm-stubs. Also, once things stabilize we could make some formatter-related dependencies into suggestions, like phpdocumentor/graphviz.

@patrickkusebauch

Copy link
Copy Markdown
Collaborator

We could just put this into the README.md for now.

Note

If you experience Composer conflicts while installing Deptrac, we recommend to "scope" the Deptrac installation using the excellent bamarni/composer-bin-plugin. It allows you to install Deptrac and all its dependencies to a separate "scoped" folder where it cannot have any conflicts with currently installed dependencies. Deptrac has been tested and works well with this workflow.

If needed, I can write a blog post going into excruciating step-by-step details, and we can just add a link to that in the note. But I would not block this PR on this.

@patrickkusebauch patrickkusebauch left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too large, did not check line by line, but overall looks good.

Pulled the branch and explored a little, ran the make commands and Deptrac itself, all looked good.

@gennadigennadigennadi

gennadigennadigennadi commented Jun 28, 2025

Copy link
Copy Markdown
Collaborator Author

We could just put this into the README.md for now.

Note

If you experience Composer conflicts while installing Deptrac, we recommend to "scope" the Deptrac installation using the excellent bamarni/composer-bin-plugin. It allows you to install Deptrac and all its dependencies to a separate "scoped" folder where it cannot have any conflicts with currently installed dependencies. Deptrac has been tested and works well with this workflow.
If needed, I can write a blog post going into excruciating step-by-step details, and we can just add a link to that in the note. But I would not block this PR on this.

A blog post would be awesome.

My concern is with the current deptrac dependencies (e.g. symfomy ^6)
a lot of modern project will have to use the bamarni approach.

But this should not be a blocker.

@gennadigennadigennadi gennadigennadigennadi merged commit 189fd13 into 4.0.x Jun 28, 2025
18 checks passed
@gennadigennadigennadi gennadigennadigennadi deleted the merge-deptrac-src branch June 28, 2025 11:01
@patrickkusebauch

Copy link
Copy Markdown
Collaborator

Blog post PR here: #1474

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

Successfully merging this pull request may close these issues.

2 participants