private-packagist-api-client icon indicating copy to clipboard operation
private-packagist-api-client copied to clipboard

[Feature Request]: Update a package

Open tyrann0us opened this issue 2 years ago • 5 comments

Is your feature request related to a problem? Please describe. While there are a couple of methods for adding, editing, or deleting packages, unless I'm mistaken, there are none for updating a package.

Describe the desired solution It would be great if there would be a method for updating a package. Something like this:

$package = $client->packages()->update('acme-website/package');

Describe the alternatives that you have considered None considered.

Additional context Sorry if updating a package is already possible; I never actually used this library but only checked the README.md and couldn't find anything about updating.

tyrann0us avatar Feb 01 '23 09:02 tyrann0us

Same for "abandon a package".

tyrann0us avatar Feb 01 '23 10:02 tyrann0us

Hey,

Correct, API endpoints to trigger a package update or to abandon a package are not yet available. If you need trigger package updates via HTTP calls, there is already a way to do this via a POST request using the hook URL that is shown on the package page. Happy to help you get this set up if you need any help. Easiest might be via the support chat.

glaubinix avatar Feb 01 '23 11:02 glaubinix

@tyrann0us can you give us some details about your use case for both package update and package abandon? This would help us prioritize the issue. If you'd rather not share this publically, then you are also welcome to share this via our support email or chat.

glaubinix avatar Feb 06 '23 16:02 glaubinix

Hi @glaubinix, I don’t really have a use case. We might use the library in the long term; this request is certainly not of high priority for us at the moment.
Thanks!

tyrann0us avatar Feb 06 '23 16:02 tyrann0us

@tyrann0us We're happy to consider this if there's a use case. So far every time someone brought this up, it could be resolved in a different way. Typically by using our existing webhook mechanisms to trigger package updates, or by configuring synchronization correctly. I'll leave this open though, as I agree we should add a method to abandon packages via API.

naderman avatar Feb 06 '23 16:02 naderman