composer入门
程序员文章站
2024-02-08 23:08:34
composer是什么 composer是PHP的插件依赖管理工具,我个人感觉和java的Maven、Gradle很类似。 Windows OS下安装composer 参考: https://www.php.cn/php weizijiaocheng 400785.html https://blog ......
composer是什么
composer是php的插件依赖管理工具,我个人感觉和java的maven、gradle很类似。
windows os下安装composer
参考:
https://blog.csdn.net/zhihua_w/article/details/80407703
composer模板
在项目根目录下创建一个:
composer.json
{ "name": "nightp", "description": "php framework", "type": "php framework", "require": { "php": ">=5.3.0", "filp/whoops": "*", "symfony/var-dumper": "*", "catfan/medoo": "*", "twig/twig": "*" }, "repositories": { "packagist": { "type": "composer", "url": "https://packagist.phpcomposer.com" } } }
第一次安装插件
cd进到项目目录,使用命令
composer install
添加插件
composer update