NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #827 most downloaded on Packagist
A model factory library for creating expressive, auto-completable, on-demand dev/test fixtures with Symfony and Doctrine.
Last release today
07 Oct 2026
Release timing varies
gaps range from 8 days to 3 months
Most releases are documented
notes for 53 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
141 releases · first in 2020
c8ea565 Actually run the reset-database testsuite in migrate mode ( #1186 ) by @nikophil 7dd9a73 Support Behat 4 in the Behat sub-package ( #1182 ) by
c8ea565 Actually run the reset-database testsuite in migrate mode (#1186) by @nikophil
7dd9a73 Support Behat 4 in the Behat sub-package (#1182) by @nikophil
b3ff36b fix: honor indexBy when wiring inverse collections (#1178) by @nikophil
8e98898 fix: re-enable DAMA static connections and stop the run when the first database reset fails (#1180) by @Amoifr
5c2f469 feat: load the stories of foundry:load-fixtures in a transaction (#1173) by @Amoifr
5508c3a ci: ignore the Psalm AfterExpressionAnalysisInterface in the BC check (#1179) by @nikophil
7d3b7aa Fix the namespace of the persistence helper functions in the docs (#1171) by @Amoifr
One column per quarter.
12bfb66 minor: upgrade PHPStan to 2.2 ( #1168 ) by @nikophil d67f898 feat: honor factory state when a create helper is called on an instance ( #1164 )
12bfb66 minor: upgrade PHPStan to 2.2 (#1168) by @nikophil
d67f898 feat: honor factory state when a create helper is called on an instance (#1164) by @Amoifr, @claude
5b0781d fix(maker): generate clean code without relying on php-cs-fixer (#1169) by @nikophil
12e900b minor: fix SYMFONY_REQUIRE wildcard in the code coverage job (#1165) by @nikophil
eb2f4e0 docs: disambiguate factory "attributes" from native PHP attributes (#1159) by @Amoifr
6541af3 feat: add Factory::memoize() and FactoryCollection::memoize() (#1161) by @Amoifr
cf8a783 minor: allow doctrine/doctrine-migrations-bundle ^4 in tests by @nikophil
493688f Document valid string values for orm.reset.mode (#1163) by @derrabus
65b9f60 ci: fix the BC check when a branch modifies src/Test/Behat (#1160) by @nikophil
006e433 fix: hydrate snapshots with deepclone_hydrate() (requires symfony/polyfill-deepclone ^1.42) ( #1149 ) by @kabylixx , @nikophil 997340f fix: gi
August 26th, 2026 - v2.12.0...v2.12.1
9ab871f feat: load multiple groups/stories with foundry:load-fixtures ( #1138 ) by @podoko
August 14th, 2026 - v2.11.4...v2.12.0
ce5f32d fix(behat): pass null through by-type transforms for optional multiline arguments ( #1155 ) by @nikophil 4b22a12 ci: test against Symfony 8.1
August 13th, 2026 - v2.11.3...v2.11.4
e70f7e9 feat(behat): resolve id placeholders in PyString and table arguments ( #1152 ) by @nikophil , @claude b0effe0 refactor(behat): remove FoundryC
August 5th, 2026 - v2.11.2...v2.11.3
2624ee7 fix: prevent flushes from corrupting tracked objects reset as lazy ghosts (ORM 2 / ODM without native lazy objects). ( #1147 ) by @nikophil f2
2624ee7 fix: prevent flushes from corrupting tracked objects reset as lazy ghosts (ORM 2 / ODM without native lazy objects). (#1147) by @nikophil
f26a1c7 minor: re-enable BC check by stripping the Behat subpackage from compared revisions (#1150) by @nikophil, @claude
c4dd64a fix(behat): fix package split workflow by @nikophil
August 3rd, 2026 - v2.11.1...v2.11.2
eaabcd1 minor: remove clone in autorefresh() and fix stale tracked objects with ORM 2 ( #1146 ) by @nikophil , @claude 0b0f065 minor: reuse Persistenc
eaabcd1 minor: remove clone in autorefresh() and fix stale tracked objects with ORM 2 (#1146) by @nikophil, @claude
0b0f065 minor: reuse PersistenceManager::reattach() and clean up refresh()/autorefresh() (#1144) by @nikophil, @claude
02c1b66 fix(ci): explicitly set matrix defaults in include entries (#1143) by @nikophil, @claude
81abe19 fix: global state should always be reatached in Doctrine (#1142) by @nikophil
c256db4 fix: global state should not be accessed when persistence is not available (#1141) by @nikophil
bc4c489 fix: introduce PersistenceManager::reattach() (#1140) by @nikophil
ec03220 feat(behat): follow foundry tags and mark the integration as experimental (#1137) by @nikophil
b69cde4 feat(behat): fix composer dependencies by @nikophil
24c00f7 minor(behat): bump foundry ^2.11 by @nikophil
3a13443 feat(behat): --lowest run should use doctrine/orm ^2 ( #1136 ) by @nikophil ece8617 feat(behat): use specific PAT for split by @nikophil 9d369
3a13443 feat(behat): --lowest run should use doctrine/orm ^2 (#1136) by @nikophil
ece8617 feat(behat): use specific PAT for split by @nikophil
9d36994 fix(behat): split subtree needs correct PAT by @nikophil
7ae1e71 fix(behat): make symlink-vendor.sh a no-op outside the monorepo (#1085) by @nikophil
06a514a chore(behat): exclude dev-only files from the split package dist (#1085) by @nikophil
1681d55 chore(behat): untrack composer.lock, already gitignored (#1085) by @nikophil
b307efe ci(behat): trigger the Behat workflow on main-package changes (#1085) by @nikophil
b20d8b2 test(behat): specify @withFixture semantics in disabled reset mode (#1085) by @nikophil
bff4466 test(behat): exercise every wording variant of the property assertion steps (#1085) by @nikophil
6c43019 test(behat): fix contradictory scenario title in disabled-mode feature (#1085) by @nikophil
8337ae9 test(behat): turn three registry has() calls into real assertions (#1085) by @nikophil
f0cf153 test(behat): cover the FoundryExtension configuration validation matrix (#1085) by @nikophil
69e67e0 fix(behat): drop @internal from the documented injection points (#1085) by @nikophil
0d754d0 docs: document the shared-container contract of BehatServicesCompilerPass (#1085) by @nikophil
252719d fix(behat): replace the Configuration booted by the bundle at exercise start (#1085) by @nikophil
8b7f771 fix(behat): do not reload global stories under DAMA's native extension (#1085) by @nikophil
4dd59ac fix(behat): reset the database at suite start in manual mode with DAMA support (#1085) by @nikophil
00feb6a fix(behat): fail loudly when DAMA support is enabled without the bundle (#1085) by @nikophil
91fd887 fix(behat): support quoted names in object()/lastObject() placeholders (#1085) by @nikophil
5c71353 fix(behat): register falsy object names like "0" at creation (#1085) by @nikophil
2fb1775 fix(behat): allow Background blocks to re-register named objects across scenarios (#1085) by @nikophil
b84c9ce fix(behat): resolve the identifier field name for lastId/lastObject placeholders (#1085) by @nikophil
42a234f fix(behat): normalize object identifiers in assertSameObject comparisons (#1085) by @nikophil
3df8b3f fix: only store in ObjectRegistry when actually running Behat (#1085) by @nikophil
6446224 feat(behat): replace step translations with trait-based context composition (#1085) by @nikophil
1725b6a feat(behat): prefix Behat transformers with "foundry:" (#1085) by @nikophil
dacf86a feat: database-backed id placeholders and assertion steps (#1085) by @nikophil
b24a1a9 fix: few fixes after agentic review (#1085) by @nikophil
0e11dd8 feat: override steps using translation (#1085) by @nikophil
800abc4 docs: clarify ref(type, name) syntax as an escape hatch (#1085) by @nikophil, @claude
f33dbcf feat: support UUID-based entity ids in ObjectRegistry (#1085) by @nikophil, @claude
c312ab9 fix: allow quoted object names starting with digits in regex patterns (#1085) by @nikophil, @claude
d46d219 fix: improve error messages in AbstractFoundryContext (#1085) by @nikophil, @claude
f609e65 perf: optimize class-to-factory lookups with index map in FactoryShortNameResolver (#1085) by @nikophil, @claude
8fef5a0 refactor: extract table normalization into private methods in FoundryCallFilter (#1085) by @nikophil, @claude
743eaf5 chore: zenstruck/foundry-behat a subpackage (#1084) (#1085) by @nikophil
8776ae9 feat/behat context (#1083) (#1085) by @nikophil
Minor BC break: state computed by PrePersist listeners is no longer visible from hooks with default priority
PrePersist listeners is no longer visible from hooks with default priorityPreviously, objects created by nested factories were passed to $em->persist() during the
creation of the object graph. Their PrePersist listeners could therefore observe — and even
corrupt (#1115) — a half-built graph, but it also meant their side effects (e.g. a field computed
in the listener) were already applied when your afterInstantiate() hooks ran.
Persistence is now deferred until the whole object graph is instantiated and wired, so hooks with
default priority run before any lifecycle event has been triggered. If one of your hooks reads
state computed by a PrePersist listener, give it a priority lower than
PersistentObjectFactory::PRIORITY_SCHEDULE_FOR_INSERT:
use Zenstruck\Foundry\Persistence\PersistentObjectFactory;
OrderItemFactory::new()
->afterInstantiate(function(OrderItem $item): void {
// computed in Order's PrePersist listener — visible here, on a fully wired graph
$item->setProcess($item->getOrder()->getProcess());
}, priority: PersistentObjectFactory::PRIORITY_SCHEDULE_FOR_INSERT - 1);
c851f6d fix: defer `$em->persist()` until the object graph is wired + natural accessor directionality (#1134) by @nikophil
[Full Change List](https://github.com/zenstruck/foundry/compare/v2.10.2...v2.10.3)July 20th, 2026 - v2.10.2...v2.10.3
$em->persist() until the object graph is wired + natural accessor directionality (#1134) by @nikophil1ad45ac fix: withoutDoctrineEvents() should not remove loadClassMetadata listeners ( #1133 ) by @nikophil 5553b63 fix: withoutDoctrineEvents should wo
1ad45ac fix: withoutDoctrineEvents() should not remove loadClassMetadata listeners (#1133) by @nikophil
5553b63 fix: withoutDoctrineEvents should work with nested entities (#1132) by @nikophil
6917146 chore: fix Roave BC check (composer >= 2.9.8) and restrict phpunit < 13.2 (#1127) by @nikophil
d9ed62b doc: add README Security Policy section (#1123) by @Copilot
July 19th, 2026 - v2.10.1...v2.10.2
withoutDoctrineEvents() should not remove loadClassMetadata listeners (#1133) by @nikophilbc10d82 fix: withoutDoctrineEvents should do nothgin in unit tests ( #1121 ) by @VincentLanglet
bc10d82 fix: withoutDoctrineEvents should do nothgin in unit tests (#1121) by @VincentLanglet
May 19th, 2026 - v2.10.0...v2.10.1
withoutDoctrineEvents should do nothgin in unit tests (#1121) by @VincentLangletdb2b673 fix: use full semver versions for PHPUnit requirements ( #1118 ) by @nikophil d109883 Update warning message for Foundry v2 documentation ( #1
db2b673 fix: use full semver versions for PHPUnit requirements (#1118) by @nikophil
d109883 Update warning message for Foundry v2 documentation (#1113) by @gisostallenberg
31c90dd Minor doc fix (#1117) by @javiereguiluz
11f55e7 feat: throw when withoutDoctrineEvents() is called within flush_after() (#1111) by @nikophil
f81db0d feat: add withoutDoctrineEvents() to suppress listeners during factory create (#1109) by @seb-jean
1408436 fix: factory template formatting (#1110) by @enekochan
b8f8909 minor: change Foundry's baseline (#1108) by @nikophil
May 19th, 2026 - v2.9.2...v2.10.0
withoutDoctrineEvents() is called within flush_after() (#1111) by @nikophilwithoutDoctrineEvents() to suppress listeners during factory create (#1109) by @seb-jeanFebruary 17th, 2026 - v2.9.1...v2.9.2
February 17th, 2026 - v2.9.1...v2.9.2
February 8th, 2026 - v2.9.0...v2.9.1
February 8th, 2026 - v2.9.0...v2.9.1
78b95d1 feat(2.9): deprecate ResetDatabase trait (#985) (#1080) by @nikophil
February 4th, 2026 - v2.8.7...v2.9.0
Factories trait (#1067) (#1080) by @nikophilResetDatabase trait (#985) (#1080) by @nikophilFactories trait (#1066) (#1080) by @nikophilFactories trait and force PHPUnit extension usage (#968) (#1080) by @nikophilFebruary 3rd, 2026 - v2.8.6...v2.8.7
February 3rd, 2026 - v2.8.6...v2.8.7
January 20th, 2026 - v2.8.5...v2.8.6
January 20th, 2026 - v2.8.5...v2.8.6
January 20th, 2026 - v2.8.4...v2.8.5
January 20th, 2026 - v2.8.4...v2.8.5
December 23rd, 2025 - v2.8.3...v2.8.4
December 23rd, 2025 - v2.8.3...v2.8.4
December 22nd, 2025 - v2.8.2...v2.8.3
December 22nd, 2025 - v2.8.2...v2.8.3
December 9th, 2025 - v2.8.1...v2.8.2
December 9th, 2025 - v2.8.1...v2.8.2
December 2nd, 2025 - v2.8.0...v2.8.1
December 2nd, 2025 - v2.8.0...v2.8.1
November 9th, 2025 - v2.7.9...v2.8.0
November 9th, 2025 - v2.7.9...v2.8.0
#[AsFoudryHook] attribute (#986) by @nikophilNovember 7th, 2025 - v2.7.8...v2.7.9
November 7th, 2025 - v2.7.8...v2.7.9
November 5th, 2025 - v2.7.7...v2.7.8
November 5th, 2025 - v2.7.7...v2.7.8
October 23rd, 2025 - v2.7.6...v2.7.7
October 23rd, 2025 - v2.7.6...v2.7.7
October 20th, 2025 - v2.7.5...v2.7.6
October 20th, 2025 - v2.7.5...v2.7.6
October 10th, 2025 - v2.7.4...v2.7.5
October 10th, 2025 - v2.7.4...v2.7.5
make:factory --test (#1000) by @ttskchrefresh_all() with flush_after() (#999) by @HypeMCOctober 8th, 2025 - v2.7.3...v2.7.4
October 8th, 2025 - v2.7.3...v2.7.4
October 5th, 2025 - v2.7.2...v2.7.3
October 5th, 2025 - v2.7.2...v2.7.3
September 25th, 2025 - v2.7.1...v2.7.2
September 25th, 2025 - v2.7.1...v2.7.2
September 24th, 2025 - v2.7.0...v2.7.1
September 24th, 2025 - v2.7.0...v2.7.1
3a131ef minor: improve deprecation message (#943) by @nikophil
September 17th, 2025 - v2.6.3...v2.7.0
f9e95cb fix: doctrine deprecation (#961) by @nikophil
August 28th, 2025 - v2.6.2...v2.6.3
August 5th, 2025 - v2.6.1...v2.6.2
August 5th, 2025 - v2.6.1...v2.6.2
e5e5162 fix: doctrine deprecation (#949) by @nikophil
July 29th, 2025 - v2.6.0...v2.6.1
foundry:load-stories to foundry:load-fixtures (#954) by @kbondrandomRangeOrCreate() method (#932) by @elliotbruneel, Elliot Bruneelphpunit w/o arguments (#933) by @kbondJune 5th, 2025 - v2.5.4...v2.6.0
June 5th, 2025 - v2.5.4...v2.6.0
#[AsFixture] attribute and foundry:load-fixture command (#903) by @nikophilJune 4th, 2025 - v2.5.4...v2.5.5
June 4th, 2025 - v2.5.4...v2.5.5
May 31st, 2025 - v2.5.3...v2.5.4
May 31st, 2025 - v2.5.3...v2.5.4
FactoryCollection::create() when calling many with 0 (#925) by @jdecoolMay 30th, 2025 - v2.5.2...v2.5.3
May 30th, 2025 - v2.5.2...v2.5.3
save() -> _save() in documentation (#917) by @smnandreMay 26th, 2025 - v2.5.1...v2.5.2
May 26th, 2025 - v2.5.1...v2.5.2
May 22nd, 2025 - v2.5.0...v2.5.1
May 22nd, 2025 - v2.5.0...v2.5.1
cdbacdd minor: ignore deprecations related to ProxyHelper::generateLazyProxy() (#901) by @nikophil
May 13th, 2025 - v2.4.3...v2.5.0
ZenstruckFoundryBundleTest (#878) (#901) by @silasjoisten, @nikophilMay 5th, 2025 - v2.4.2...v2.4.3
May 5th, 2025 - v2.4.2...v2.4.3
April 17th, 2025 - v2.4.1...v2.4.2
April 17th, 2025 - v2.4.1...v2.4.2
April 15th, 2025 - v2.4.0...v2.4.1
April 15th, 2025 - v2.4.0...v2.4.1
faker service (#877) by @silasjoisten7b33216 minor: deprecate auto-persist (#818) by @nikophil
April 14th, 2025 - v2.3.2...v2.4.0
mt_rand instead of random_int (#869) by @kbond#[AsFoundryHook] / global event system (#871) by @nikophildistribute() method (#826) by @nikophilMarch 31st, 2025 - v2.3.9...v2.3.10
March 31st, 2025 - v2.3.9...v2.3.10
Nothing published for this version
Nothing published for this version
Nothing published for this version
February 25th, 2025 - v2.3.5...v2.3.6
February 25th, 2025 - v2.3.5...v2.3.6
February 24th, 2025 - v2.3.4...v2.3.5
February 24th, 2025 - v2.3.4...v2.3.5
February 14th, 2025 - v2.3.3...v2.3.4
February 14th, 2025 - v2.3.3...v2.3.4
Nothing published for this version
54c7424 feat: deprecate when Factories trait is not used in a KernelTestCase (#766) by @nikophil
February 1st, 2025 - v2.3.1...v2.3.2
#[RequiresPhpUnit] versions (#792) by @nikophilafterPersist hook the attributes from beforeInstantiate (#745) by @nikophil, @kbondDecember 12th, 2024 - v2.3.0...v2.3.1
December 12th, 2024 - v2.3.0...v2.3.1
December 11th, 2024 - v2.2.2...v2.3.0
December 11th, 2024 - v2.2.2...v2.3.0
#[WithStory] attribute (#728) by @nikophilNovember 5th, 2024 - v2.2.1...v2.2.2
November 5th, 2024 - v2.2.1...v2.2.2
Your coding agent can read these notes before it upgrades. Set up the MCP server →