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.
PHP中文网用户-7512007
PHP中文网用户-7512007 2023-01-31 16:29:58
0
0
703

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中文网用户-7512007
PHP中文网用户-7512007

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!