Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Publish your own package through composer

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

You have learned the basic usage of composer, know the role of composer.json, and know the role of install and update commands.

You will use git and have an account on github.

Basic process:

1. Create your own project on github, for example: group

two。 Clone the project locally through git to create a composer.json

3.commit and push to github

4. Click "submit package" in the upper right corner of the https://packagist.org/, and you need to log in. Click "login with github" to log in with your github account. The first login will allow you to register your mailbox, and then click "submit package" again.

5. Fill in the project address "Repository URL". This url is the url of the helloworld project on your github.

6. Click the "check" button, and the system automatically detects whether the composer.json in your project is qualified and gives the reason. If there are no errors, please click submit.

7. If the package is created successfully, you can continue to configure the github automatic synchronization feature as prompted, so that the version number of the packagist corresponding package will be updated after each push.

8. Modify the package and update it, git push after modification, and then execute composer-- dev-- prefer-source update [package name] in the project that uses the package. Adding-- prefer-source means checking out the latest version from github.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report