search

Home  >  Q&A  >  body text

In the win system command line or vscode command line, when using the composer init command, there will be no wizard to guide me to enter the package name and other information one by one. It will be executed directly in one step and the file will be generated directly.

PS C:\wamp64\www\chloe-php\0126\composer1> composer init  Welcome to the Composer config generator  This command will guide you through creating your composer.json config.Package name (<vendor>/<name>) [administrator/composer1]:Define your dependencies.Writing ./composer.jsonGenerating autoload filesGenerated autoload filesPSR-4 autoloading configured. Use "namespace Administrator\Composer1;" in src/Include the Composer autoloader with: require 'vendor/autoload.php';PS C:\wamp64\www\chloe-php\0126\composer1> 

以下是生成的composer.json内容:

{    "name": "administrator/composer1",    "autoload": {        "psr-4": {            "Administrator\\Composer1\\": "src/"        }    },    "require": {}}

PHP中文网用户-7512007PHP中文网用户-7512007673 days ago741

reply all(0)I'll reply

No reply
  • Cancelreply