我开始学习使用 TYPO3 CMS
和 composer
... 但是我无法安装自己的分发包。请尝试以下步骤:
composer require stsa/hellotypo3
I've got this error:
[InvalidArgumentException]
Could not find a version of package stsa/hellotypo3 matching your minimum-stability (stable). Require it with an explicit version constraint allowing its desired stability.
我已经通过composer安装了TYPO3 9.5.1,并且(为了测试)使用“composer require mask/mask”安装了第三方扩展程序“mask”。它完美地工作。
以下是我上传到packgist的分发扩展的composer.json。json文件有效,但一定有问题...
{
"name": "stsa/hellotypo3",
"type": "typo3-cms-extension",
"description": "FLUID Templates & TypoScript",
"homepage": "https://www.hello.de/",
"keywords": [
"TYPO3",
"CMS",
"extension"
],
"authors": [
{
"name": "Stsa",
"email": "contact@hello.de",
"role": "Developer",
"homepage": "https://www.hello.de/"
}
],
"license": [
"GPL-2.0-or-later"
],
"require": {
"typo3/cms-core": "^9.5"
},
"autoload": {
"psr-4": {
"Stsa\\Hellotypo3\\": "Classes/"
}
},
"replace": {
"hellotypo3": "self.version",
"typo3-ter/hellotypo3": "self.version"
}
}
不行,这不起作用。我还尝试设置"minimum-stability": "stable"
,但老实说,我不知道该怎么做。。?有人能帮帮我吗?谢谢。
编辑1:今天我在packgist更新了自己的扩展程序。现在使用vendor/name应该可以找到它了。
编辑2:现在我通过sitepackagebuilder创建了一个测试扩展程序,将其上传到Git,提交到Packgist。尝试通过composer require hellotypo3de/hellotest
进行安装,但仍然出现相同的错误警告:Could not find a version of package hellotypo3de/hellotest matching your minimum-stability (stable). Require it with an explicit version constraint allowing its desired stability.
我错在哪里了?
Could not find a matching version of package stsa/hellotypo3@dev. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).
现在我已经更新了我的分发扩展包,并尝试通过composer require stsa/hellotypo3
进行安装,但这也失败了..? 我仍然在寻求帮助,以从 packgist 或 github 安装自己的扩展。 - user2310852composer req stsa/hellotypo3:@dev
。 - Chris