1

I have a project with only 3 files of PHP code written by me and a library phpQuyer.php. I am trying to add

https://github.com/TobiaszCudnik/phpquery

as a dependency of my project.

But I am getting the following error as shown in my screenshot enter image description here

Is it because in the project on Github it does not have any composer.json in it?

P.S.

That library is not updated often.

I am trying to integrate Composer with my project because my client said this

"the only thing I would want is composer integrated, so if I need to extend with using additional libraries I can easily do that it should be pretty easy to include composer as part of your package"

Umair Ayub
  • 19,358
  • 14
  • 72
  • 146
  • Maybe if we could see that composer json... however this may help you http://stackoverflow.com/questions/23083045/the-package-is-not-available-in-a-stable-enough-version-according-to-your-minimu – nerdlyist Jun 17 '16 at 15:12

1 Answers1

1

Is it because in the project on Github it does not have any composer.json in it?

Yes, exactly. The project itself doesn't have a composer.json file and is not registered at the main Composer repository: https://packagist.org/.

The package can not be found by Composer using the repository name nor can you find it, when using the packagist search.


Your options:

Fork

  1. Fork the project. Add a composer.json file. Register the fork at Packagist.
  2. Add the requirement for the "fork" to your project.

Define a package

The dependency you would like to fetch does not support Composer, but you can still can define the package yourself by using a package repository.

Referencing: https://getcomposer.org/doc/05-repositories.md#package-2

Jens A. Koch
  • 39,862
  • 13
  • 113
  • 141