Tools For Better Developers

Osm Admin

Previously known as The Big Red Button project.

A package for defining application data structures and logic using PHP 8 classes and attributes, pressing the big red button (it's also the project codename), and getting fully functioning Admin Panel and API.

Osm Admin: Schema Hydration

2021 November Osm Admin

2 years ago ∙ 3 minutes read

I developed dehydrate()/hydrate() functions for a very practical need - storing the data class schema:

  • in cache - to reduce processing time spent on reflection;
  • and in database - to compare current and new database schema, and only add new tables and columns.

This article describes the information stored in the schema, and unit tests that I prepared in order to be sure that schema classes are property hydrated.