Snippets > Composer Package Install


#command-line#composer#php

Install a package manually

composer require --dev phpunit/phpunit ^9

Install a package with composer.json

composer.json:

{
    "require": {
        "guzzlehttp/guzzle": "^7.8",
        "league/csv": "^9.0",
        "phpunit/phpunit": "^9"
    }
}

Install packages:

composer update