Arrivals and Departures


Where did all the code go?

One of the stated goals of the ongoing refactoring effort in OpenPSA is to reduce the sheer volume of code that the repository has accumulated during its long history. A large part of this effort consists of removing unused code, redundancies, compatibility layers for forgotten PHP versions, and a host of other housekeeping tasks. But like in the Augean stables, the most elegant solution is of course to include other streams (of code, in case you were wondering...): This allows us to concentrate on our core product, and to benefit from the development efforts of the PHP community at large. It also lowers the barrier to entry, since developers are more likely to encounter tools they are already familiar with.

Of course, finding drop-in replacements for MidCOM's services is not always easy, given the numerous interactions between them and the need to provide a reasonable amount of backwards compatibility. That being said, there have been a number of such transitions since the o9 branch was created. Since it may be hard to spot them by pouring over the revision history, here's a short executive summary for your reading pleasure:


  • HTTP_Request: This venerable PEAR package has been replaced by its successor, HTTP_Request2

  • utf8_to_ascii: The slugifier has been replaced by its MidgardMVC counterpart, midgard/midgardmvc-helper-urlize

  • Text_CAPTCHA: This package turned out to be incompatible with Composer's autoloader, and has been replaced by gregwar/captcha

  • HTML_Quickform: Datamanager's form library has been switched to openpsa/quickform, which is an API-compatible fork of the original PEAR package, which is compatible to current PHP versions

  • de.bitfolge.feedcreator: This component was effectively a wrapper for the bundled UniversalFeedCreator tool. The library has been packaged for Composer now and is available on Packagist as openpsa/universalfeedcreator. Like openpsa/quickform, it does not have any dependencies on the framework or Midgard, and has since seen adoption by other users

  • org_openpsa_helpers_vxparser: OpenPSA's vCard/vCalendar parser has been replaced by the much more advanced SabreTooth VObject library

  • MagpieRSS: This bundled pre-millenium RSS parser has been replaced by much better-maintained SimplePIE

  • net.nehmer.markdown: Like de.bitfolge.feedcreator, this component was basically a one-line wrapper around the bundled php-markdown library. It has since been replaced by a Composer dependency on michelf/php-markdown, which is the current php-markdown version by the original author

  • Mail: The PEAR family of email-related packages has been replaced by Swiftmailer. The rarely-used email importers some components provided have been moved to the midcom-extras repository.

  • MidCOM watcher service: The framework's DBA watcher service has been reimplemented based on Symfony's Event Dispatcher library. The old API entry points are still provided, but events (i.e. watches) are now triggered immediately instead of at the end of the request, for greater robustness and reliability

  • midcom.helper.activitystream: The activity stream component has been moved to its own repository and made optional in order to allow for slimmer and better-performing MidCOM installations

  • midcom-console: Only weeks after its original inclusion, the CLI tools have been moved to a separate repository and made optional. This means you can require them in your projects or install them globally as a standalone application


Of course, the decoupling of OpenPSA and MidCOM is an ongoing process, so we will see more such transitions in the future. You can follow the progress as it happens on github, or jump in with pull requests of your own if you'd like.




There have been no comments so far.

Post a comment:

This is a Captcha (, you need a graphical browser to display it.
This is a Captcha. You have to enter the characters displayed in the image taking case sensitivity into account.


Layout Copyright © 2006 Finnish Teleservice Center Ltd Oy - Site Powered by Midgard CMS, hosted by CONTENT CONTROL