Create Packagist Composer Library

Source: Internet
Author: User
1.mkdir App && CD app
2.composer Init
3.VI Composer.json

{    "name": "yourname/yourpro",    "description": "desc",    "authors": [{        "name": "yourname",        "email": "yourname@gmail.com"    }],    "require": {},    "autoload": {        "classmap": [            "lib/"        ]    }}

4. Create a git library Yourname/yourpro
5.git Remote Add Origin Git@github.com:yourname/yourpro set public key skipped
5.git add .&& git commit-am "init" && git pull orgin master && git push orgin master
6. Create Tag composer package version from Git branch and tag, branch represents dev version (except master), tag stands for stable version
7.git Tag 1.0 && git push Origin--tags
8. Login https://packagist.org/Click Submit in the top corner of the Git repository address
9. Add GitHub Service Hook domain to the address of packagist


10. Installation Library composer require ' yourname/yourpro:1.0.0
If there is an error, perform composer update nothing:

Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting   see 
  
   
    
    for more details.
  
   

The above describes the creation of the Packagist Composer Library, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.