A minor refactoring and bugfix release with improvements to strengthen password hashing.

Changelog:

  • Switched to more appropriate password hashing algorithm (bcrypt) and the native hash_password() function.
  • Added 'expiresOn' and 'lastUpdated' to the content object table as hooks for future functionality.
  • Added 'module' as an additional column in the taglinks table to allow taglinks to be filtered by module.
  • Locked user-side gallery to image type objects, rather than returning all images from all object types.
  • Adopted usage of null coalescing operator (PHP 7) to shorten relevant ternary expressions.
  • Renamed TfAngryTree to Tftree.
  • Removed TfSecurityUtility (consolidated into TfUtils).
  • Removed TfCriteriaItemFactory (items are now handled as part of TfCriteriaFactory).
  • Added missing TfBlockHandler.
  • Fixed bug related to search operator in TfSearchContent.
  • Fixed offset bug recently introduced to pagination control.

I was playing around with different password hashing algorithms and came across this password hash cost calculator. It's a simple script you can use to measure how long it takes to calculate a given hash on a particular machine. Since web hosting accounts often come with limited resources compared to your local dev box, it's useful for tuning the cost of your hashing algorithm (how many times you iterate the calculation) to keep it at a sane level.

Tuskfish has been substantially refactored to improve its internal structure, and to make it easier to extend. Please note that due to changes in the database schema version 1.1 is not compatible with previous versions.

Changelog:

  • Static methods have been largely eliminated in favour of dependency injection.
  • Some reassignment of methods between classes, to improve compliance with the single responsibility principle.
  • Many methods and variables renamed to better indicate function and make code more self-describing.
  • Variables, properties and database columns have been converted to camel case for consistency.
  • Class and method documentation improved.
  • Restored manual type checking in methods to reinforce the strict types directive.
  • Modularised the structure to facilitate development of discrete expansions.
  • Reverted to Bootstrap-fileinput V4.4.7 due to issues with FontAwesome.

Tuskfish has had a substantial internal restructure. Static methods have been removed in favour of dependency injection, and modularity has been added (beginning of course with the content management module). The documentation needs extensive revision, when it's all ready the result will be released as Tuskfish V1.1.

I just finished reading Clean Code: A handbook of agile software craftsmanship, by Robert C. Martin. It’s a highly regarded book and contains many useful ideas; I have started refactoring some aspects of Tuskfish based on things I learned from it. This will include improving names, shortening and splitting up some of the larger functions into smaller logical units, replacing magic numbers with named constants and so on.

It feels strange to criticise PHP after developing a substantial (for me) project in it. Obviously I like the language and the recent performance improvements have given it a significant boost. But there are a few things that grate on the nerves and make me wonder about its long term future. Here are some of them, presented in no particular order.

A maintenance release, largely to update third party libraries.

Changelog

  • Fix broken date in RSS feed.
  • Upgrade jQuery to V3.3.1.
  • Upgrade HTMLPurifier to V4.10.0 (PHP 7.2 compatible).
  • Upgrade Fontawesome to V5.0.13.
  • Upgrade TinyMCE to V4.7.13.
  • Upgrade Bootstrap-fileinput to V4.4.8.
  • Upgrade Bootstrap-datepicker to V1.8.

Changelog

  • Fixed error breaking RSS feeds.

The baseline release of the Tuskfish content management system is now available for download. It requires PHP 7.2 or higher, with the sqlite3, PDO, pdo_sqlite, and gd extensions. Please refer to the installation guide and user manual