Download the PHP package zenstruck/foundry without Composer
On this page you can find all versions of the php package zenstruck/foundry. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package foundry
Foundry
"Fixtures you'll actually enjoy writing!"
Foundry turns fixture creation into a joy, via an expressive, auto-completable, on-demand fixtures system with Symfony and Doctrine:
The factories can be used inside DoctrineFixturesBundle to load fixtures or inside your tests, where it has even more features.
Foundry supports doctrine/orm (with doctrine/doctrine-bundle),
doctrine/mongodb-odm (with doctrine/mongodb-odm-bundle)
or a combination of these.
Want to watch a screencast 🎥 about it? Check out https://symfonycasts.com/foundry
How to contribute
Running the Test Suite
The test suite of this library needs one or more databases, then it comes with a docker compose configuration.
[!NOTE] Docker and PHP installed locally (with
mysql,pgsql&mongodbextensions) is required.
You can start the containers and run the test suite:
Overriding the default configuration
You can override default environment variables by creating a .env.local file, to easily enable permutations:
The .env.local file can also be used to override the port of the database containers,
if it does not meet your local requirements. You'll also need to override docker compose configuration:
Here is an example to use MySQL on port 3308:
Run the tests locally faster
As long as you don't want to test Mongo, you can use the following .env.local file to run the tests faster locally:
"maker" tests are also quite slow, so you can skip them with using the following command:
Enjoy blazing fast tests! :rocket:
Running the documentation linter locally
This section provides guidance on how to run the documentation linter, contained within a Docker image, locally on your machine. This linter is designed to verify and ensure that the document syntax adheres to the required standards.
The following command runs the linter in the local directory:
Credit
The AAA style of testing was first introduced to me by Adam Wathan's excellent Test Driven Laravel Course. The inspiration for this libraries API comes from Laravel factories and christophrumpel/laravel-factories-reloaded.
Security Policy
If you discover a security vulnerability, please do not open a public issue or pull request. Instead, please review this repository's Security Policy for instructions on how to report it responsibly.
All versions of foundry with dependencies
fakerphp/faker Version ^1.24
symfony/deprecation-contracts Version ^2.2|^3.0
symfony/polyfill-php84 Version ^1.32
symfony/polyfill-php85 Version ^1.33
symfony/property-access Version ^6.4|^7.0|^8.0
symfony/property-info Version ^6.4|^7.0|^8.0
symfony/var-exporter Version ^6.4.9|~7.0.9|^7.1.2|^8.0
zenstruck/assert Version ^1.4