无法使用作曲家下载软件包
这是我第一次将WordPress与Bedrock一起使用,我使用Composer下载我的软件包,而不是手动从WordPress添加插件。
我去 https://wpackagist.org/ ,然后尝试使用作曲家要求将Elementor作为插件下载“ wpackagist-plugin/elementor”:“ 3.6.4”
找不到wpackagist-plugin/elementor的匹配版本。检查软件包拼写,您的版本约束,并且该软件包的稳定性可与您的最低稳定性(DEV)相匹配。
。
我检查了Elementor软件包的最低稳定性,并且是稳定
。链接: https://github.com/elementor/elementor/elementor/elementor/elementor/elementor/blob/master/ composer.json
在我的Composer.json中,我有最低稳定性dev
。 我目前正在尝试解决此问题,并找出最小稳定性
代表什么,因为这是我第一次使用这些工具。
我的composer.json
{
"name": "roots/bedrock",
"type": "project",
"license": "MIT",
"description": "WordPress boilerplate with Composer, easier configuration, and an improved folder structure",
"homepage": "https://roots.io/bedrock/",
"authors": [
{
"name": "Scott Walkinshaw",
"email": "[email protected]",
"homepage": "https://github.com/swalkinshaw"
},
{
"name": "Ben Word",
"email": "[email protected]",
"homepage": "https://github.com/retlehs"
}
],
"keywords": [
"bedrock", "composer", "roots", "wordpress", "wp", "wp-config"
],
"support": {
"issues": "https://github.com/roots/bedrock/issues",
"forum": "https://discourse.roots.io/category/bedrock"
},
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org",
"only": ["wpackagist-plugin/*", "wpackagist-theme/*"]
}
],
"require": {
"php": ">=7.4",
"composer/installers": "^2.1",
"vlucas/phpdotenv": "^5.4",
"oscarotero/env": "^2.1",
"roots/bedrock-autoloader": "^1.0",
"roots/bedrock-disallow-indexing": "^2.0",
"roots/wordpress": "5.9.3",
"roots/wp-config": "1.0.0",
"roots/wp-password-bcrypt": "1.1.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.6.2",
"roave/security-advisories": "dev-latest"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"allow-plugins": {
"composer/installers": true,
"roots/wordpress-core-installer": true
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"installer-paths": {
"web/app/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
"web/app/plugins/{$name}/": ["type:wordpress-plugin"],
"web/app/themes/{$name}/": ["type:wordpress-theme"]
},
"wordpress-install-dir": "web/wp"
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"test": [
"phpcs"
]
}
}
This is my first time using Wordpress with Bedrock and I use Composer to download my packages instead of manually adding plugins from Wordpress.
I go to https://wpackagist.org/ and try to download Elementor as a plugin using composer require "wpackagist-plugin/elementor":"3.6.4"
Could not find a matching version of package wpackagist-plugin/elementor. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (dev).
I checked the Elementor package's minimum stability and it is stable
. Link: https://github.com/elementor/elementor/blob/master/composer.json
In my composer.json I have minimum stability dev
.
I am currently trying to fix this and find out what min-stability
represents as this is my first time using these tools.
My composer.json
{
"name": "roots/bedrock",
"type": "project",
"license": "MIT",
"description": "WordPress boilerplate with Composer, easier configuration, and an improved folder structure",
"homepage": "https://roots.io/bedrock/",
"authors": [
{
"name": "Scott Walkinshaw",
"email": "[email protected]",
"homepage": "https://github.com/swalkinshaw"
},
{
"name": "Ben Word",
"email": "[email protected]",
"homepage": "https://github.com/retlehs"
}
],
"keywords": [
"bedrock", "composer", "roots", "wordpress", "wp", "wp-config"
],
"support": {
"issues": "https://github.com/roots/bedrock/issues",
"forum": "https://discourse.roots.io/category/bedrock"
},
"repositories": [
{
"type": "composer",
"url": "https://wpackagist.org",
"only": ["wpackagist-plugin/*", "wpackagist-theme/*"]
}
],
"require": {
"php": ">=7.4",
"composer/installers": "^2.1",
"vlucas/phpdotenv": "^5.4",
"oscarotero/env": "^2.1",
"roots/bedrock-autoloader": "^1.0",
"roots/bedrock-disallow-indexing": "^2.0",
"roots/wordpress": "5.9.3",
"roots/wp-config": "1.0.0",
"roots/wp-password-bcrypt": "1.1.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.6.2",
"roave/security-advisories": "dev-latest"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"allow-plugins": {
"composer/installers": true,
"roots/wordpress-core-installer": true
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"installer-paths": {
"web/app/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
"web/app/plugins/{$name}/": ["type:wordpress-plugin"],
"web/app/themes/{$name}/": ["type:wordpress-theme"]
},
"wordpress-install-dir": "web/wp"
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"test": [
"phpcs"
]
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要将代码粘贴到您的composer.json中
。
“ php”:“> = 7.4”,
“作曲家/安装程序”:“^2.1”,
“ vlucas/phpdotenv”:“^5.4”,
“ Oscarotero/env”:“^2.1”,
“ roots/bedrock-autoloader”:“^1.0”,
“ roots/bedrock-disallow-indexing”:“^2.0”,
“ roots/wordpress”:“ 5.9.3”,
“ roots/wp-config”:“ 1.0.0”,
“ roots/wp-password-bcrypt”:“ 1.1.0”,
“ wpackagist-plugin/elementor”:“ 3.6.7”
},
然后运行 Composer Update 来自Bash。
或者:
您可以从bash中添加它:
作曲家需要Wpackagist-Plugin/Elementor:3.6.7
You need to paste that code into your composer.json like so:
"require": {
"php": ">=7.4",
"composer/installers": "^2.1",
"vlucas/phpdotenv": "^5.4",
"oscarotero/env": "^2.1",
"roots/bedrock-autoloader": "^1.0",
"roots/bedrock-disallow-indexing": "^2.0",
"roots/wordpress": "5.9.3",
"roots/wp-config": "1.0.0",
"roots/wp-password-bcrypt": "1.1.0",
"wpackagist-plugin/elementor":"3.6.7"
},
Then run composer update from bash.
OR:
you can add it from bash with:
composer require wpackagist-plugin/elementor:3.6.7