In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Xiaobian to share with you the composer init command example analysis, I believe most people still do not know how, so share this article for your reference, I hope you have a lot of harvest after reading this article, let's go to understand it together!
Detailed explanation of composer init command
Install composer using curl with system retape
curl -sS https://getcomposer.org/installer | php
Verify that composer is installed successfully
dduan@dduan:~/test_composer$ php composer.phar ______ / ____/___ ____ ___ ____ ____ ________ _____ / / / __ \/ __ __ \/ __ \/ __ \/ ___/ _ \/ ___// /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/ /_/Composer version 1.8.6 2019-06-11 15:03:05
Composer init command next steps detailed explanation
root@dduan:/home/dduan/test_composer# php composer.phar initDo not run Composer as root/super user! See https://getcomposer.org/root for details Welcome to the Composer config generator This command will guide you through creating your composer.json config.# 1. Enter Project Namespace #Note/Must conform to [a-z0-9_.-]+/ [a-z0-9_.-]+ Package name (/) [root/test_composer]:yourname/projectname# 2. Description []: This is a test composer init project # 3. Enter the author information, enter directly may appear the following prompt, some systems can enter directly, specifically why? Invalid author string. Must be in the format: John Smith # 3.1. John Smith Author [, n to skip]: John Smith #4. Enter the minimum stable version, stable, RC, beta, alpha, devMinimum Stability []:dev# 5. Enter Project Type Package Type (e.g. library, project, metapackage, composer-plugin) []:library# 6. Enter License Type []:Define your dependencies.# 7. Would you like to define your dependencies (require) interactively [yes]?# 7.1. If dependencies are required, enter the dependencies to install Search for a package:php# 7.2. Enter the version constraint to require (or leave blank to use the latest version): >=5.4.0#Repeat the above two steps (7.1/7.2)Search for a package: #8. Would you like to define your dev dependencies (require-dev) interactively [yes]? { "name": "dduan/test_compser", "description": "this is a test composer init project", "type": "library", "require": { "php": ">=5.4.0" }, "authors": [ { "name": "John Smith", "email": "john@example.com" } ], "minimum-stability": "dev"}# 9. Do you confirm generation [yes]?# Would you like to install dependencies now [yes]?
note
The composer init and npm init commands are similar.
The above is "composer init command sample analysis" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!
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: 262
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.