Yii Framework Forum

Publishing extension - Failed reading packagist data

(Lubosdz) #1

I tried to publish new extension today at https://www.yiiframework.com/extension/lubosdz/yii2-ui-range-plus-minus, but it failed loading packagist data - shows empty extension page. Refreshing did not help either, no error shown. There is no option to edit extension manually, neither to delete it and try again.
Is there any way to fix it or what should I do?
Packagist is valid at https://packagist.org/packages/lubosdz/yii2-ui-range-plus-minus and repo at https://github.com/lubosdz/yii2-ui-range-plus-minus.
Thank you.

(Alexander Makarov) #2

@CeBe would you please check it?


The readme file is not found as it is named readme.md and not README.md will fix the code to support that.


@lubosdz fixed, thanks for reporting! I have removed your comment under the extension.

(Lubosdz) #5

Thank you very much. I have not notice that readme.me should be in lowercase, because it worked OK on github and packagist.

There is one more issue with images - I am not sure if that could be fixed but here is description:

Images are often placed into github repo and then included via markdown e.g. into README.MD file.
For example image screen-yii2-rangePlusMinus.gif which would be included like
will resolve:

  • on github.com to /lubosdz/yii2-ui-range-plus-minus/raw/master/screen-yii2-rangePlusMinus.gif
  • on packagist.com to https://rawcdn.githack.com/lubosdz/yii2-ui-range-plus-minus/HEAD/screen-yii2-rangePlusMinus.gif
  • on https://www.yiiframework.com/extension just plain screen-yii2-rangePlusMinus.gif - and so the image link is broken.

Do you think that it could resolve to one of the two URL bases - either github or packagist?
For example during publishing first check whether link is absolute (contains “http” protocol or starts with “//”), if not then

  • prepend github base and check loading via file_get_contents()
  • if not found then try the packagist base ?

I have noticed on couple of other extensions broken image links too …
(FYI - FF hides broken images, chrome shows)
Or how would you advise to publish images - always use abs. links and some free image hosting … ?
Thank you.


Absolute URLs already work, as you can see on official extensions. But we can try to guess relative URLs like github and packagist do.