0

i know this has already been asked but, i can't see what is going wrong without asking.

I've created a packagist for a custom code hosted on github.

Packagist : https://packagist.org/packages/claims/module-logger Github : https://github.com/Minirock/claims-module-logger

But when i try to load it using composer, it says it can't find it.

composer require claims/module-logger

Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/ Info from https://repo.packagist.org: #StandWithUkraine

In InitCommand.php line 785:
Could not find a version of package claims/module-logger matching your minimum-stability (dev). Require it with an explicit version constraint allowing its desired stability.

I'm pretty sure this has to do with composer version but, how can i check if my package is available for composer 1 and / or 2. If not available for composer 1 (which is mandatory in my case) how can i make it accessible ?

I also tried specifying the version

composer require claims/module-logger:dev-main

Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/ Info from https://repo.packagist.org: #StandWithUkraine

In InitCommand.php line 792:

Could not find package claims/module-logger.
Did you mean this?
claims/module-logger

Claims
  • 245
  • 2
  • 15
  • 1
    What have you tried to resolve the problem? Did you read the hint about Composer 1 and some not available packages? – Nico Haase Aug 27 '22 at 14:36
  • 1
    Also, as Composer v1 is EOL, you should consider updating it, or otherwise read the hints at the linked documentation – Nico Haase Aug 27 '22 at 14:37
  • @NicoHaase I haven't done anything special i don't really know what to do there. Note that i'm running old magento versions who as composer 1 as a requirement, so it's not up to me to change the version. It has been done for the newer versions, but the old projects still has to work with composer 1, sadly. That being said, may be i should try to run it with a composer 2 installation. – Claims Aug 27 '22 at 19:37
  • 1
    So, did you read the linked blog post about how package lists are handled for Composer v1? – Nico Haase Aug 28 '22 at 07:15
  • @NicoHaase Yes sir, but honestly didn't found anything in that page explaining clearly how to make this work. – Claims Aug 29 '22 at 07:30

1 Answers1

0

I has exactly the same problem. I updated my composer version (using composer self-update). I confirm the problem persist.

The github : https://github.com/j-barth/test The packagist : https://packagist.org/packages/jbarthes/test

Thank you

  • Note : I reset all my Github account and Packagist account. A build a new project from scratch and that's work. I don't understand why. – user3801712 Sep 09 '22 at 20:39
  • My personnal workaround has been to do it using vcs link directly. So it's not really using packagist. I don't get why it went to work with yours. But anyway as long as vcs us working, packagist become irrelevant and composer doesn't have to communicate with it anymore. – Claims Sep 12 '22 at 08:54