Changelogs: Forum v3.3.0

A new version of Forum has been released, version 3.3.0. Please download the new tag or view the documentation. If you have any questions, be sure to send me an email or comment on this post. If you run into any problems, be sure to report an issue on the Github repository.

Version: 3.3.0
Tested On: PHP 5.4.3, CakePHP 2.3.0, Composer
Requires: PHP 5.3, CakePHP 2, Composer
Commit Hash: 3fbe1526b2be48402c15ee67541306252d0fc992
Changes:

  • Requires PHP 5.3 and Composer
  • Upgraded Utility plugin to 1.3.x
  • Upgraded Decoda to 5.x
  • Added FORUM_DATABASE and FORUM_PREFIX constants
  • Added avatar mapping support in Forum.userMap.avatar
  • Added support for layout overrides through Forum.viewLayout
  • Updated shells, models and controllers to use the new FORUM_* constants
  • Updated to HTML5 doctype
  • Fixed localization not changing
  • Fixed search not working for guests
  • Replaced jQuery with Mootools
  • Replaced Markitup with Decoda
  • Replaced database settings with Forum.settings and Configure
  • Renamed CommonHelper to ForumHelper
  • Renamed settings to be camelCase
  • Moved around search and login forms
  • Lots of polish and fixes

Repository Cleanup

I'm currently in the mood to cleanup all my Github repositories, and with this will come some changes. I am posting this to give a warning to anyone who is cloning my repositories either directly or via submodule, as some of the repository names (and URLs) will change. This overhaul is meant to free up some of my time as I plan to veer away from starting any new projects (unless it's part of a client request) and merely want to support my current projects with bug fixes and new features, if any. With this change, the following changes are happening:

The following projects will have their names changed:

  • php-decoda --> Decoda
  • php-transit --> Transit
  • php-packager --> Packager
  • cakephp-utility --> Utility
  • cakephp-forum --> Forum
  • cakephp-uploader --> Uploader
  • moo-decoda --> Decoda.js

The following projects will be deprecated and no longer receive any kind of support:

  • cake-decoda
  • cake-ajax_handler
  • cake-auto_login
  • cake-cache_kill
  • cake-feeds
  • cake-spam_blocker
  • cake-redirect_route
  • cake-we_game
  • php-type_converter
  • php-statsburner

Most of the deprecated projects were moved to the Utility plugin or the Titon project and will continue to receive support there. The stand alone projects are merely deprecated.

The following projects will no longer be supported excluding critical bugs:

  • php-compression
  • php-resession
  • php-numword
  • php-gears
  • php-formation
  • php-databasic

Thanks for all your continuing support and sorry if these minor changes cause any hiccups. Please be patient and give Github and Composer some time to propagate the changes.

Changelogs: Decoda v5.1.0

A new version of Decoda has been released, version 5.1.0. Please download the new tag or view the documentation. If you have any questions, be sure to send me an email or comment on this post. If you run into any problems, be sure to report an issue on the Github repository.

Version: 5.1.0
Tested On: PHP 5.4, Composer
Requires: PHP 5.3, Composer
Commit Hash: b554ba63750bf2c32b0e22b757fed57d5adb981f
Changes:

  • Updated to use Multibyte extensively
  • Added Decoda::hasFilter() and Decoda::hasHook()
  • Added <code> tags within <pre> for CodeFilter and proper semantics
  • Added source tag that renders <code> tag for CodeFilter
  • Refactored Decoda::_buildTag() to be more efficient
  • Fixed bugs with custom brackets in tag parsing
  • Fixed bugs with auto-linking regex
  • Fixed bug with URLs that end in trailing slash
  • Changed <code> to <var> for var tag

Changelogs: Uploader v4.0.0

A new version of Uploader has been released, version 4.0.0. Please download the new tag or view the documentation. If you have any questions, be sure to send me an email or comment on this post. If you run into any problems, be sure to report an issue on the Github repository.

Version: 4.0.0
Tested On: PHP 5.4
Requires: PHP 5.3
Commit Hash: f4d115ff504abdb8b1c7e508ae530300ef53409c
Changes:

  • Updated to use Composer extensively
  • Updated to use Transit and AWS SDK internally
  • Uploader and S3 classes have been removed (uploading is done purely in the model layer)
  • Transformations can be applied to the original file or used to create new files
  • Transformations now support the following options: nameCallback, append, prepend, uploadDir, finalPath, overwrite and self
  • Added Model::deleteImages($id) to delete uploaded files and not the record
  • Added automatic file deletion when a record is deleted, or a path is being overwritten with a record update
  • Added built in support for file uploading and importing (local, remote or stream)
  • Added rollback file deletion if the upload process fails
  • Added Model::beforeTransport() callback
  • Added logging for critical errors
  • Added AWS S3 and Glacier transport support
  • Added type and mimeType validation rules
  • Improved the error handling
  • Improved file renaming and moving
  • Removed config and mime type mapping
  • Removed Test and Vendor files
  • Option name was renamed to nameCallback
  • Option importFrom was removed as importing is built in
  • Option s3 was replaced with transport
  • Option metaColumns had keys renamed
  • Options baseDir and uploadDir were replaced with tempDir, uploadDir and finalPath
  • Options maxNameLength and saveAsFilename were removed
  • View the updated documentation for help

Changelogs: Decoda v5.0.0

A new version of Decoda has been released, version 5.0.0. Please download the new tag or view the documentation. If you have any questions, be sure to send me an email or comment on this post. If you run into any problems, be sure to report an issue on the Github repository.

Version: 5.0.0
Tested On: PHP 5.3
Requires: PHP 5.3
Commit Hash: 29dfe2d792d65c0d2b81d470213e54e75a2db722
Changes:

  • Changed folder and namespace structure to make heavier use of Composer
  • Added attribute support for self closing tags
  • Moved interfaces to source root
  • Reversed naming of abstract classes
  • Removed Decoda's autoloader in place of Composer
  • Removed DECODA constant
  • Updated to use SPL exceptions

Using Composer in CakePHP

Composer, a magnificent dependency manager. CakePHP, a brilliant MVC framework. What's stopping you from using both in your application? Nothing at all! Personally, I have been using Composer exclusively in my applications to handle all my dependencies and even my CakePHP plugins. It's very easy to do.

The first thing you need to do is create a composer.json file within your application. It's best to place the file in app/composer.json as it would share the same directory structure with Vendor. Here's a quick example:

{
	"config": {
		"vendor-dir": "Vendor"
	},
	"require": {
		"mjohnson/uploader": "4.*",
		"mjohnson/decoda": "6.*"
	}
}

Since this is an application and not a dependency, all you need to define is the "require" property. We also set the vendor folder to use CakePHP's naming convention, because why not?

To benefit from Composer's autoloader, include the autoload.php file at the very top of Config/core.php.

require_once dirname(__DIR__) . '/Vendor/autoload.php';

Brilliant! Now we have full dependency and autoloading support. Can't get easier than that.