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

Split direct/transitive dependencies in two groups: also in info command (should be in outdated only?) #10999

Closed
leoloso opened this issue Aug 17, 2022 · 1 comment · Fixed by #11000
Labels
Milestone

Comments

@leoloso
Copy link
Sponsor

leoloso commented Aug 17, 2022

Explanation

Since v2.4, the new groupings "Direct dependencies:" and "Transitive dependencies:" added for the outdated command are being added also for the info command.

In the PR #10779 it states it is for the outdated command, so I assume this is a bug.

Indeed it broke my continuous integration, since I use composer info to retrieve and parse the list of all the packages:

PACKAGES="$(composer info --name-only --no-dev)"

if [ -n "$PACKAGES" ]; then
    for package in $PACKAGES
    do
        # ... Do something with the package
    done
fi

Now it produces an error, since it encounters the string "Direct dependencies:" and it treats it like a package too, making the process fail.

Debug

When I run this command:

composer info --name-only --no-dev

I get the following output:

Direct dependencies:    
graphql-api/plugin-utils                       

Transitive dependencies:                 
symfony/var-exporter                        
symfony/yaml  

And I expected this to happen:

graphql-api/plugin-utils
symfony/var-exporter                        
symfony/yaml  
@Seldaek Seldaek added the Bug label Aug 17, 2022
@Seldaek Seldaek added this to the 2.4 milestone Aug 17, 2022
@Seldaek
Copy link
Member

Seldaek commented Aug 17, 2022

Ah yeah sorry that was a mistake, will fix.

Seldaek added a commit to Seldaek/composer that referenced this issue Aug 17, 2022
Seldaek added a commit that referenced this issue Aug 17, 2022
* Fix show command showing the split of direct/transitive deps from outdated, fixes #10999

* Fix a few minor edge cases in show command, add tests for show and outdated commands
emahorvat52 pushed a commit to emahorvat52/composer that referenced this issue Feb 3, 2023
* Fix show command showing the split of direct/transitive deps from outdated, fixes composer#10999

* Fix a few minor edge cases in show command, add tests for show and outdated commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants