0

I'm learn how to create Laravel packages, And I wrote a package here: noahprot/fillindata

Then I submit it to packagist

And I have set a lastest release in github

And the Packagist show like this: Already show the latest release

Then I use Laravel CLI Tool create a new laravel project, I want try to use this package, and I use composer require noahprot/fillindata

But the result like this:

  [InvalidArgumentException]                                                                                                              
  Could not find a version of package noahprot/fillindata matching your 
  minimum-stability (dev). Require it with an explicit version con  
  straint allowing its desired stability.  

my package's composer.json file like this:

{
"name": "noahprot/fillindata",
"License": "MIT",
"description": "take the csv file fill into database table",
"authors": [
    {
        "name": "Noah Prot",
        "email": "mylovewangjian@gmail.com"
    }
],
"autoload": {
    "psr-4": {
        "NeoLee\\Fillindata\\": "src/"
    }
},
"extra": {
    "laravel": {
        "providers": [
            "NoahProt\\Fillindata\\FillindataServiceProvider"
        ]
    }
},
"require": {}

}

I make some try like: add "minimum-stability": "dev" to composer.json, but failed, even I edit to "stable", but failed too;

I have no idea for this situation now;

Guys, Please Help me, and give some advice, please!

Thank you everyone!

Neo Lee
  • 29
  • 3

1 Answers1

1

It seems that Packagist have some cache-related problems, see this issue. Mirror you're using probably have some outdated packages info. At this point you can do only two things:

  1. Wait until packages data on mirror will be refreshed.
  2. Report your case (see this comment).
rob006
  • 21,383
  • 5
  • 53
  • 74
  • Okay, I see. I found this answer in google too. but should there be another situation will generate this result? And If the result caused by mirror cache, Do you konw how long will The Composer Mirror update cache in a general way? And really appreciate your help sincerely! – Neo Lee Sep 05 '18 at 12:23
  • I don't know about mirror cache, but AFAIK Packagist refreshes packages data every minute, and official mirrors should not be too much behind. It definitely should not take more than few minutes to recognize new release by `composer` command. – rob006 Sep 05 '18 at 12:55
  • okay, there is different voice. and I read the error, I think the keyword is the Composer can not found out my package which a stable release version. do you know how do I release a stable version in github and packagist? – Neo Lee Sep 05 '18 at 13:07
  • Releasing `1.0.0` already creates stable release. And I'm able to install your package without any trouble - I guess by mirror is up to date. :) The problem is probably that your mirror does not have info about `1.0.0` (and other) release, so Composer thinks that there is no stable release. – rob006 Sep 05 '18 at 13:13
  • Thank you! There must be the problem. My composer mirror is out of date. I will try to fix it. – Neo Lee Sep 05 '18 at 13:21