Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer Package not found

I have a git repo https://github.com/hounded/FPDFbundle

I have added it to packagist https://packagist.org/packages/hounded/fpdfbundle

You can see the composer.json at the git repo

{
"name" : "hounded/fpdfbundle",
"description" : "A pdf bundle",
"type" : "symfony-bundle",
"authors" : [{
 "name" : "James Whiteman"
}],
"keywords" : ["pdf bundle"],
"license" : ["MIT"],
"require" : {
"symfony/framework-bundle": "~2.3",
"sensio/framework-extra-bundle": "~3.0,>=3.0.2"
},
"autoload" : {
"psr-0" : {
  "hounded\\FPDFBundle" : ""
}
},
"target-dir" : "hounded/FPDFBundle",
"extra" : {
"branch-alias" : {
  "dev-master" : "0.1.x-dev"
}
},
"minimum-stability": "dev"
}

However when I run

composer require hounded/fpdfbundle 

I get "could not find package hounded/fpdfbundle"

I would like to help the community but am stumped as to what I have done wrong

like image 823
hounded Avatar asked Jun 16 '26 01:06

hounded


1 Answers

Your github repo contains no tags. When the github repo contains no tags, packageist sets "dev" as the default version for your package. Composer has some minimum stability criteria by which it will not install a package with version as "dev" unless you explicitely specify in the composer.json file. So, to fix this issue, add a version number tag to your github repo by using something like

git tag -a 1.0.0

and then push the changes to your public repo. Once you push, packageist will scan for changes and detect the version/tag and set it as the active version.

like image 132
Praveesh Avatar answered Jun 18 '26 01:06

Praveesh