After a long delay, with a known bug (Issue #7) floating around in phpSmug 2.2, I’ve finally pushed phpSmug 3.0 out the door.

The primary delay has been due to a major rewrite of a large portion of the backend code. I’ve removed the dependency on PEAR for the out-the-box phpSmug. I’ve removed this dependency because the code I was using was outdated and the newer versions of the various modules were quite unreliable. I also wasn’t too happy with these modules still offering PHP 4 support when PHP 4 has been EOL’d for so long either.

PEAR isn’t completely written off. phpSmug still uses PEAR’s MDB2 modules for those who wish to use database caching. As this is an optional dependency - filesystem caching doesn’t need PEAR - phpSmug no longer ships with any PEAR modules. If you want this functionality, you need to install the modules yourself. The documentation details this too.

Along with this major update, a few other things have changed:

  • The removal of the dependency on PEAR now gives developers the opportunity to select a preferred transport mechanism, or adapter: Curl or sockets. phpSmug defaults to using Curl, but will gracefully fallback to sockets in the event Curl isn’t available.
  • More specific exceptions are thrown so developers can easily identify which part of the code is throwing the exception. The exceptions now thrown are PhpSmugException, HttpRequestException and CurlRequestProcessorException or SocketRequestProcessorException.
  • phpSmug is now PHP 5 E_STRICT compliant, which finally resolves Issue #2
  • I’ve fixed the problem with the OAuth token not being set correctly in phpSmug 2.2 (Issue #7)
  • phpSmug is now licensed under the GPLv3 instead of the LGPL.
  • The underlying phpSmug code is now better formatted, documented and laid out making it easier to follow. My backend code generation and testing is also more streamlined so it’s easier for me to update and test changes, which should mean it won’t take so long to release fixes.

And last but not least, I’ve moved to a new host and given the site a slightly different look. It’s not a major change, but it’s there.

phpSmug 3.0 is now available on the download page.

If you spot any issues, let me know. Oh and don’t forget to drop me a line if you have a product that uses phpSmug that could do with a bit of free advertising.