launchdarkly / api-client-php

LaunchDarkly API Client for PHP
Other
2 stars 4 forks source link

Unable to Install Using Composer #1

Closed thomaseadie closed 2 years ago

thomaseadie commented 4 years ago

Hello,

I'm having an issue trying to install this using composer, the error being: [Composer\Repository\InvalidRepositoryException] No valid composer.json was found in any branch or tag of https://github.com/launchdarkly/api-client-php.git, could not load a package from it.

I found this was happening because it only looks in the top level directory, but in this repo the composer.json file is stored in the LaunchDarklyApi folder.

Unfortunately composer doesn't have a parameter to specify a sub-directory for github repos, so it fails with the above error.

The simple fix might be to move the contents of the LaunchDarklyApi folder to the root, but I'll leave that up to you.

Thanks, Thomas

bwoskow-ld commented 4 years ago

Thanks for reporting this, @thomaseadie . I see what you mean. We'll look into it.

Filed internally as 70696.

thomaseadie commented 4 years ago

Thanks for taking a look Ben. I feel like this should be functionality for composer, so I created an issue in that project as well: https://github.com/composer/composer/issues/8646.

As a workaround to get this going I just downloaded the repo to a network share and installed it using composer.

thomaseadie commented 4 years ago

Looks like they didn't like my proposal for using subdirectories..

Not sure how much work it would be, but it would be great if you guys could get this on packigist (https://packagist.org/), would make installation much easier.

bwoskow-ld commented 2 years ago

Hi @thomaseadie ,

Apologies for the delay. This issue should be resolved now. composer.json is in the top-level directory and this package is now available on packagist: https://packagist.org/packages/launchdarkly/api-client-php

Cheers, @bwoskow-ld