1 hour ago · Tech · 0 comments

Table of Contents TL;DR Why we wanted to modernize What v2 looks like Entry and terminals State, layered three ways Lifecycle hooks Associations: for(), has(), with() Sharing a parent across branches with recycle() Reads: the static factory surface stays small Wrap an existing entity with from() Sharper static analysis Database-state assertions Named entity pools with Story Test isolation without $fixtures arrays Pluggable generator backend How to upgrade What’s next Thanks Links A clean v2 API is coming dereuromark/cakephp-fixture-factories just shipped 2.0.0 RC. After a year of incremental cleanup — typed persistEntity() / persistEntities(), the TEntity template on BaseFactory, redirected deprecations — the next major was the right moment to redesign the surface coherently rather than keep layering. This post walks through the why, the what, and the how to upgrade. TL;DR One small, internally consistent API: new(), from(), count(), build(), buildMany(), save(), saveMany(), state(),…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.