composer-php

Composer: How to check minimum requirements of the current composer.json file?


After adding a composer package which needs mongodb 3.0 and because mongodb 3.0 needs php7, finally code after deployment failed on production, I found out my current composer.json configuration needs php7. How can I run a command and find out minimum requirements of my composer.json file? Something like:

composer requirements 
# or
composer requirements-dev

Solution

  • Try

    composer show --installed --tree
    

    Or the shorthand

    composer show -i -t