Page MenuHomeDevCentral

Consolidate Obsidian classes with Keruald resources
Open, NormalPublic

Description

Obsidian follows Azhàr / Keruald includes structure.

As such, some of the code can be duplicated from code already migrated to rKERUALD. Other missing methods could be migrated there, as Obsidian is a little more modern.

Event Timeline

Looking the code of keruald/databases, it's clear that it's exactly based on Obsidian consolidated design choices: Keruald Databases even use the camelCase method names introduced in Obsidian, with a WithLegacyMethods trait to stay compatible with other applications.

The only changes are:

  • code to fire the event wasn't ported, we wanted a package keruald/events for that
  • Database engine selection is done by 'engine' => 'MySQL' in Obsidian, 'engine' => MySQLiEngine::class in Keruald code

For cache it seems we use serialize/unserialize directly into the PHP code:

[20-Oct-2025 19:11:29 UTC] PHP Deprecated: unserialize(): Passing null to parameter #1 ($data) of type string is deprecated in /var/51-wwwroot/obsidian/workspaces/src/includes/workspaces/Workspace.php on line 177

The keruald/cache library directly uses those methods. Recommended in PSR-16 if I remember well (*).


(*) PSR-16 specification provides:

Objects - Any object that supports lossless serialization and deserialization such that $o == unserialize(serialize($o)).
Objects MAY leverage PHP's Serializable interface, sleep() or wakeup() magic methods, or similar language functionality if appropriate.