KnpLabs / packagist-api

PHP API for Packagist
MIT License
182 stars 46 forks source link

Description can be empty #80

Closed garak closed 2 years ago

garak commented 2 years ago

See for example https://packagist.org/packages/magefan/module-community This is currently unsupported in Package object since $description is cast as string (it should be ?string instead).

robbieaverill commented 2 years ago

Thanks for the report. Is this causing a runtime error when importing this package? Changing the method signature would necessitate a new major version release, so I'd prefer to cast the description as a string, even when empty/null, when we hydrate Package objects. This could then be released as a patch change. What do you think about this approach?

garak commented 2 years ago

I think that forcing an empty string instead of null can be enough for now.

robbieaverill commented 2 years ago

Fixed in v1.7.2

JellyBellyDev commented 2 years ago

@robbieaverill please can you apply this patch also in 2.x-dev? Thanks!

robbieaverill commented 2 years ago

It's been merged up already, I will get #79 merged too then tag another beta

robbieaverill commented 2 years ago

Hi @JellyBellyDev, @garak, etc., this change is now available in v2.0.0-rc1. Please let me know if you have any problems with this version.