Home >Development Tools >composer >Composer manages project dependencies

Composer manages project dependencies

藏色散人
藏色散人Original
2020-10-09 14:04:492585browse

The following tutorial column of composer will introduce you to the dependencies of Composer management projects. I hope it will be helpful to friends in need!

Composer manages project dependencies

Composer

If you use Composer to manage project dependencies, simply add phpunit/phpunit to the project's composer.json file Dependencies are enough. Here is an example of a minimal composer.json file that only defines a development-time dependency on PHPUnit 5.0:

{
    "require-dev": {
        "phpunit/phpunit": "5.0.*"
    }
}

To complete a system-level installation through Composer, run:

composer global require "phpunit/phpunit=5.0.*"

Please ensure that the path variable contains ~/.composer/vendor/bin/.

The above is the detailed content of Composer manages project dependencies. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn