deptrac icon indicating copy to clipboard operation
deptrac copied to clipboard

Add composer-dependency-analyser (fix shadow dependencies)

Open janedbal opened this issue 1 year ago • 1 comments

Hi, I tested your repository with composer-dependency-analyser and it found some shadow dependencies:

image


All those seem valid to me, so I added those to composer and the tool to CI to avoid possible issues in future.

janedbal avatar Feb 22 '24 16:02 janedbal

The failed CI job looks like a bug, reported here: https://github.com/IonBazan/composer-diff/issues/30

janedbal avatar Feb 22 '24 16:02 janedbal

I tried fixing the issue as suggested in the bugreport, but as I'm just sending fork, GitHub security measures are not executing the new job (when pull_request_target is kept) or not allowing pull_requests: write permission (when pull_request is used).

So in order to unblock this PR, some maintainer need to adjust the broken job.


Note: I removed my commit that attempted to fix it.

janedbal avatar Feb 23 '24 09:02 janedbal

The bug should be solvable just by bumping the version:

diff --git a/.github/workflows/composer-diff.yml b/.github/workflows/composer-diff.yml
index 3bfdb4fc..f5748bdc 100644
--- a/.github/workflows/composer-diff.yml
+++ b/.github/workflows/composer-diff.yml
@@ -19,6 +19,6 @@ jobs:
           ref: ${{ github.event.pull_request.head.sha }}
           fetch-depth: 0
       - name: Comment composer.lock diff
-        uses: WyriHaximus/github-action-composer.lock-diff@v1
+        uses: WyriHaximus/github-action-composer.lock-diff@v2
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

But as said above, I cannot do it in PR due to security measures of GitHub.

janedbal avatar Mar 05 '24 20:03 janedbal

@janedbal could you fix the conflict?

gennadigennadigennadi avatar Mar 11 '24 08:03 gennadigennadigennadi

Fixed conflict

janedbal avatar Mar 11 '24 09:03 janedbal

@janedbal thank you for your contribution.

gennadigennadigennadi avatar Mar 11 '24 11:03 gennadigennadigennadi