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

Support GLOB or regexp in the Composer collector #1437

Open
Kaspiman opened this issue Sep 23, 2024 · 1 comment
Open

Support GLOB or regexp in the Composer collector #1437

Kaspiman opened this issue Sep 23, 2024 · 1 comment

Comments

@Kaspiman
Copy link

Hi, I am using Composer collector and have to list a large list of packages.

For example, i have many Symfony packages:

deptrac:
  layers:
    - name: Symfony
      collectors:
        - type: composer
          composerPath: composer.json
          composerLockPath: composer.lock
          packages:
            - symfony/config
            - symfony/console
            - ....

It would be great to reduce the list of packages to one expression with *:

          packages:
            - symfony/*

What do you think?

@patrickkusebauch
Copy link
Collaborator

I think this may be potentially dangerous as you might now allow dependencies on transitive packages that are not defined in your composer.json file but are present in your composer.lock file.

If this danger is properly documented, I think it would be a useful addition. Feel free to send a PR.

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