Mac OS Installation composer

Source: Internet
Author: User
Tags composer install
Mac OS Installation composer

Download scripts and execute scripts in PHP

Curl-ss Https://getcomposer.org/installer | Php

Will then be generated in the current folder Composer.phar put him in the/usr/local/bin/composer.

Add/usr/local/bin to environment variables in ~/.bash_profile

Path=/usr/local/bin: $PATH

Install components with

Composer require production of factory name + class name

You can find the name of the component in https://packagist.org and the component will be placed in the vendor of the project directory root.
The Composer.lock file is the version used to lock the component,
Composer Install does not update the version of the component.
Compoer Update updates the component's version.

In the PHP file

Requier ' vendor/autoload.php ' 

To use the components that composer in

Original address: http://biyongyao.com/archives/168

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.