gentor / olx-api-client

OLX Api Client
MIT License
17 stars 6 forks source link

Installation via composer doesnt seem to work #2

Open nikksan opened 6 years ago

nikksan commented 6 years ago

Running composer require gentor/olx-api-client results in this error:

[InvalidArgumentException] Could not find package gentor/olx-api-client at any version for your minimu m-stability (stable). Check the package spelling or your minimum-stability

Screenshot: olx-api-client

Composer version: 1.3.1

Edit: Cloning the project and running composer install works.

matasarei commented 5 years ago

This issue can be resolved by setting the stability level to dev in composer.json:

...
  "minimum-stability": "dev",
  "prefer-stable": true,
...

It allows you to install any package you need (even dev-master), but also will prefer more stable packages over unstable ones.

$ composer require gentor/olx-api-client
Using version dev-master for gentor/olx-api-client
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 6 installs, 0 updates, 0 removals
  - Installing ralouphie/getallheaders (3.0.3): Downloading (100%)         
  - Installing psr/http-message (1.0.1): Downloading (100%)         
  - Installing guzzlehttp/psr7 (1.6.1): Downloading (100%)         
  - Installing guzzlehttp/promises (v1.3.1): Downloading (100%)         
  - Installing guzzlehttp/guzzle (6.3.3): Downloading (100%)         
  - Installing gentor/olx-api-client (dev-master b68be8e): Cloning b68be8e110 from cache
Writing lock file
Generating autoload files

You can also fork the repo and use your own source instead:

...
  "repositories": [
    {
      "type" : "vcs",
      "url" :  "git@github.com:username/olx-api-client.git"
    }
  ],
...