File tree Expand file tree Collapse file tree 4 files changed +60
-0
lines changed Expand file tree Collapse file tree 4 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ when@dev : &dev
2+ # See full configuration: https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#full-default-bundle-configuration
3+ zenstruck_foundry :
4+ persistence :
5+ # Flush only once per call of `PersistentObjectFactory::create()`
6+ flush_once : true
7+
8+ when@test : *dev
Original file line number Diff line number Diff line change 1+ {
2+ "copy-from-recipe" : {
3+ "config/" : " %CONFIG_DIR%/" ,
4+ "src/" : " %SRC_DIR%/"
5+ },
6+ "bundles" : {
7+ "Zenstruck\\ Foundry\\ ZenstruckFoundryBundle" : [" dev" , " test" ]
8+ },
9+ "conflict" : {
10+ "doctrine/persistence" : " <2.0" ,
11+ "symfony/flex" : " <1.23.0 || >=2.0.0,<2.8.0" ,
12+ "symfony/framework-bundle" : " <6.4"
13+ },
14+ "aliases" : [" foundry" ],
15+ "add-lines" : [
16+ {
17+ "file" : " phpunit.dist.xml" ,
18+ "content" : " <bootstrap class=\" Zenstruck\\ Foundry\\ PHPUnit\\ FoundryExtension\" />" ,
19+ "position" : " after_target" ,
20+ "target" : " <extensions>" ,
21+ "requires" : " phpunit/phpunit:>=10" ,
22+ "warn_if_missing" : false
23+ },
24+ {
25+ "file" : " config/packages/zenstruck_foundry.yaml" ,
26+ "content" : " enable_auto_refresh_with_lazy_objects: true" ,
27+ "position" : " after_target" ,
28+ "target" : " zenstruck_foundry:" ,
29+ "requires" : " php:>=8.4" ,
30+ "warn_if_missing" : false
31+ }
32+ ]
33+ }
Original file line number Diff line number Diff line change 1+ * You're ready to use zenstruck/foundry. Create your first factory with
2+ <info>bin/console make:factory</>.
3+
4+ * <fg=blue>Read</> the documentation at <comment>https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html</>
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace App \Story ;
4+
5+ use Zenstruck \Foundry \Attribute \AsFixture ;
6+ use Zenstruck \Foundry \Story ;
7+
8+ #[AsFixture(name: 'main ' )]
9+ final class AppStory extends Story
10+ {
11+ public function build (): void
12+ {
13+ // SomeFactory::createOne();
14+ }
15+ }
You can’t perform that action at this time.
0 commit comments