Cookbook
The cookbook collects task-oriented recipes that don’t fit neatly into the getting-started or reference sections — things you reach for once you already know the basics and need to solve a specific problem.
Common tasks
Section titled “Common tasks”- Working with existing databases — reverse-engineer a
schema.xmlfrom a live database withschema:reverse. - Using SQL schemas — group tables into database-level schemas/namespaces on RDBMS that support them.
- How to use namespaces — give generated model classes real PHP namespaces.
- Multi-component data model — split a large schema across multiple files and packages.
- Working with advanced column types —
blob,enum,object, andarraycolumns. - Copying persisted objects — shallow and deep copies with
copy(). - Model introspection at runtime — inspect tables, columns, and relations via the map classes.
- Adding additional SQL files — run extra DDL alongside the generated SQL file.
- Replication — read/write connection splitting for master-slave setups.
Extending Propulsion
Section titled “Extending Propulsion”- How to write a behavior — a step-by-step tutorial building a behavior from scratch.
- Static analysis with PHPStan — register the bundled extension so magic Query methods stop being reported as undefined.
- Working with Propulsion’s test suite — running and writing tests against the PHPUnit/Testcontainers suite.
See also the Behaviors reference for the full list of bundled behaviors and the behavior-authoring API.