0

Any idea why the composer is throwing error of:

[InvalidArgumentException] Could not find a matching version of package divix1988/laminas-smarty-module. Check the package spelling, your vers ion constraint and that the package is available in a stability which matches your minimum-stability (stable). 

When trying to add my own new dependency via: composer require divix1988/laminas-smarty-module ?

https://github.com/divix1988/laminas-smarty-module

4
  • Seems like you are trying to add a private package, typically they need to be in packagist. Here are a couple of resources on it. getcomposer.org/doc/articles/… barryvanveen.nl/blog/… Commented Feb 28, 2020 at 0:00
  • 1
    How exactly did you configure all that? I haven't found your package on Packagist Commented Feb 28, 2020 at 9:21
  • Does this answer your question? Use PHP composer to clone git repo Commented Feb 28, 2020 at 9:22
  • Thank you @NicoHaase you are right, I need to add it to packagist first. Commented Feb 29, 2020 at 20:31

2 Answers 2

3

There are 2 ways:

 "repositories": [ { "type": "vcs", "url": "[email protected]:divix1988/laminas-smarty-module.git" } ], 
Sign up to request clarification or add additional context in comments.

Comments

1

To get a package via composer you have to add it to packagist before. Login packagist from here and then add your package. When your package is presente on packagist, you can require it using composer.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.