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

Add composer-dependency-analyser (fix shadow dependencies) #1374

Merged

Conversation

janedbal
Copy link

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.

Copy link
Collaborator

@patrickkusebauch patrickkusebauch left a comment

Choose a reason for hiding this comment

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

Yep, you are right, I found the tool last week and thinking the same.

@janedbal
Copy link
Author

The failed CI job looks like a bug, reported here: IonBazan/composer-diff#30

@janedbal janedbal force-pushed the composer-dependency-analyser branch 9 times, most recently from 024da5a to 42c8d06 Compare February 23, 2024 09:25
@janedbal
Copy link
Author

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
Copy link
Author

janedbal commented Mar 5, 2024

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 janedbal force-pushed the composer-dependency-analyser branch from 74f76fa to 42c8d06 Compare March 5, 2024 20:28
@gennadigennadigennadi
Copy link
Member

@janedbal could you fix the conflict?

@janedbal janedbal force-pushed the composer-dependency-analyser branch from 42c8d06 to d26eb68 Compare March 11, 2024 09:51
@janedbal
Copy link
Author

Fixed conflict

@gennadigennadigennadi gennadigennadigennadi merged commit f56ea07 into qossmic:main Mar 11, 2024
19 of 20 checks passed
@gennadigennadigennadi
Copy link
Member

@janedbal thank you for your contribution.

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.

3 participants