我有一个用于laravel安装的composer文件,其中包含以下composer.json文件:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.1.*"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
},
"minimum-stability": "stable"
}
我正在尝试添加捆绑服务。在岗哨的网站上说可以通过将以下内容添加到我的composer.json文件中来安装它:
{
"require": {
"cartalyst/sentry": "2.0.*"
},
"minimum-stability": "dev"
}
我试图在当前的laravel的末尾添加新的json对象,如下所示:
...
},
{
"require": {
"cartalyst/sentry": "2.0.*"
},
"minimum-stability": "dev"
}
当我运行composer update
命令以加载新程序包时,出现一条错误消息,提示新对象添加无效的json。
如果我添加cartalyst/sentry
到现有require
对象,则它将找不到哨兵包,因为现有要求的最小稳定性值为stable
。
有没有一种方法可以在具有最小稳定性设置的单独的require对象中指定哨兵包裹dev
?
"symfony": { "allow-contrib": false, "require": "4.2.*"
因此,如果我在未删除composer.lock的情况下发布了您的设置/配置,并保留了这些设置,那么这些设置将被还原,因此可能有必要删除composer.lock或发出作曲家更新命令,尽管可能会有其他不良影响