# Foundry

PHP library that builds model factories and on-demand fixtures for Symfony and Doctrine, used in tests and dev environments.


Source: https://findsoftware.frbit.cloud/zenstruck-foundry/
Last reviewed: 2026-11-17
Listed since: 2026-11-17

## Record

### Links

- repository: https://github.com/zenstruck/foundry
- docs: https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html

### Identity

- status: active
- maintainer: Kevin Bond
- maintainerType: unknown
- parent: unknown
- firstRelease: 2020
- hqCountry: unknown

### Kind

- category: testing
- hosting: not applicable
- language: php
- runtime: php
- runtimeMin: php 8.1
- basedOn: symfony

### Content

- contentStore: not applicable
- databases: not applicable
- adminUi: not applicable
- headlessApi: not applicable
- templating: not applicable
- i18n: not applicable

### Rendering and deploy

- runsAs: local
- renderingModes: not applicable
- installMethod: composer

### License

- licenseModel: open-source
- license: MIT

### Releases

- currentMajor: 2
- latestReleaseDate: 2026-11-09

### Adoption

- githubStargazers: 805
- packagistDownloads: 17207897
- npmWeeklyDownloads: not applicable
- contributors: 87
- pluginCount: unknown
- packagistMonthlyDownloads: unknown
- ecosystemsMonthlyDownloads: unknown
- httpArchiveSites: unknown
- wordpressActiveInstalls: unknown
- dependentRepos: unknown
- dependentPackages: unknown

### Sources

- urls: https://api.github.com/repos/zenstruck/foundry (read 2026-11-17)
- urls: https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html (read 2026-11-17)
- maintainer: https://github.com/zenstruck/foundry/blob/2.x/LICENSE (read 2026-11-17)
- firstRelease: https://api.github.com/repos/zenstruck/foundry/releases/tags/v1.0.0 (read 2026-11-17)
- language: https://api.github.com/repos/zenstruck/foundry (read 2026-11-17)
- category: https://github.com/zenstruck/foundry/blob/2.x/README.md (read 2026-11-17)
- basedOn: https://github.com/zenstruck/foundry/blob/2.x/README.md (read 2026-11-17)
- runtime: https://github.com/zenstruck/foundry/blob/v2.16.0/composer.json (read 2026-11-17)
- runtimeMin: https://github.com/zenstruck/foundry/blob/v2.16.0/composer.json (read 2026-11-17)
- runsAs: https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html (read 2026-11-17)
- installMethod: https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html (read 2026-11-17)
- license: https://api.github.com/repos/zenstruck/foundry (read 2026-11-17)
- licenseModel: https://github.com/zenstruck/foundry/blob/2.x/LICENSE (read 2026-11-17)
- currentMajor: https://github.com/zenstruck/foundry/releases/tag/v2.16.0 (read 2026-11-17)
- latestReleaseDate: https://github.com/zenstruck/foundry/releases/tag/v2.16.0 (read 2026-11-17)
- packagistDownloads: https://packagist.org/packages/zenstruck/foundry.json (read 2026-11-17)
- packagistDownloads: https://packagist.org/packages/zenstruck/foundry.json (read 2026-11-17)
- githubStargazers: https://api.github.com/repos/zenstruck/foundry (read 2026-11-17)
- contributors: https://api.github.com/repos/zenstruck/foundry/contributors?per_page=1 (read 2026-11-17)

## Notes

Foundry is a PHP library for creating test and development data with factory classes. A factory creates and persists an object, and any field the caller does not set gets random data. Stories extract a specific database state so tests and dev fixtures can reuse it, and the foundry:load-fixtures command loads stories marked with the AsFixture attribute into a database, mainly in dev mode. The README says it supports doctrine/orm and doctrine/mongodb-odm, alone or combined. The [documentation](https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html) also covers a PHPUnit extension and factories declared as services.

## Worth knowing

The docs say the library requires the database to be reset before each test, which the packaged ResetDatabase attribute handles. Without Symfony Flex, the bundle has to be enabled by hand in the test and dev environments, and the make:* commands need Symfony MakerBundle. The Behat integration is a separate package that the docs call experimental.

---

Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Attributes are recorded, never scored; absent means unknown.
Credit, in full: FindSoftware, CC BY 4.0
