Answer the question
In order to leave comments, you need to log in
How to create a private composer package?
Tell me how to create a private extension package for composer located on bitbucket??
{
"name": "amstr1k/yii2-category",
"description": "Crud category, crud tree category ",
"type": "yii2-extension",
"keywords": ["yii2","extension"," category"," tree category"],
"license": "GPL-3.0",
"repositories": [
{
"type": "vcs",
"url": "[email protected]:amstr1k/yii2-category.git"
}
],
"authors": [
{
"name": "Amstr1k",
"email": "[email protected]"
}
],
"require": {
"yiisoft/yii2": "*",
"amstr1k/yii2-category": "0.1"
},
"autoload": {
"psr-4": {
"amstr1k\\category\\": ""
}
},
"extra": {
"bootstrap": "amstr1k\\category\\Bootstrap"
}
}
Answer the question
In order to leave comments, you need to log in
if your package is not available on the packager, then you need to describe the repository where the package will be loaded from.
https://getcomposer.org/doc/05-repositories.md#vcs
to register in the composer.json of the application.
The composer.json with the description of the extension is placed in the root of the repository. Your project (yii2-app) describes the repository and require.
Dialog Well, as if I already understood this) The question is what to do next? because i have a mistake
[Composer\DependencyResolver\SolverProblemsException]
Problem 1
- The requested package amstr1k/yii2-category could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
should be described like this
{
"type": "package",
"package": {
"name": "amstr1k/yii2-category",
"version": "0.1",
"source": {
"url": "[email protected]:amstr1k/yii2-category.git",
"type": "git",
"reference": "62adc2c8e5ccf5394ff7c2f5cc31db7709cebba5"
}
}
}
Decimal numbers are denoted with a dot, not a comma.
Now you get it so that you multiply 100 by 0, and then add 5 + 100 + 1000
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question