Subscribe to PHP Freaks RSS

phorkie is composer-installable

syndicated from planet-php.net on August 29, 2017

To be able to install all of phorkie's dependencies with composer, I spent a good part of the last week to bring a number of PEAR package onto packagist.org.

Previously I had resorted to composer's PEAR server interface, which is pretty slow and error-prone. Time to get that fixed.



Services_Libravatar

phorkie uses Services_Libravatar to fetch avatar images from e-mail addresses and OpenIDs of logged-in users. It's a library for the libravatar.org API that provides a federated and self-hostable alternative to Gravatar.

The first obstacle was finding the sources, because it had been hosted on gitorious.org, which had been acquired by gitlab and shut down shortly after.

Thanks to the Archiveteam the git repositories have been preserved and I was able to obtain a commit that was missing in my local copy.

After it had been transferred to Github, I configured the travis-ci.org integration and added a proper README.rst file.



OpenID

The OpenID package is used to log people into phorkie without registration and without permanently saving any personal data.

The package had no composer.json file, and when adding it I noticed that three out of five dependencies were also not composer-installable :/

After the dependencies were fixed and the composer.json file added, I tagged it as v0.4.0+composer. That tag is picked up properly by composer as version 0.4.0, and I did not have to increase the version number just for composer compatibility.



Cache_Lite

Cache_Lite is one of the OpenID dependencies. It had a composer.json, but no entry on packagist.org.



Crypt_DiffieHellman

Also required by the OpenID package, Crypt_DiffieHellman had several problems:

  • No composer.json
  • Unit tests did not run anymore
  • Commits from the last release were missing in the git repository

All of them is fixed now.



Services_Yadis

Services_Yadis only needed new dependency versions and a tag.



VersionControl_Git

phorkie uses VersionControl_Git to init, commit into and extract information from git repositories.

When setting up automated unit test runs I saw that some tests were broken. It turned out to be a date issue; the original author had a different timezone and relied on that in the tests. After adjusting the dates and replacing date() calls with gmdate(), the tests run in any timezone now.



Services_Linkback

The PEAR2 Services_Linkback package sends out pingbacks and webmentions, and was missing an entry on packagist.org.



Fin

After all those packages have been made ready, installing dependencies on a phorkie git checkout only requires you to run composer install now. It's time to self-host your pastes and gists! It's never been that easy to get phorkie running :)