Skip to content

Commit db74180

Browse files
committed
[zenstruc/foundry] Add 2.6 config & one story as fixture
1 parent 62e545f commit db74180

File tree

5 files changed

+41
-1
lines changed

5 files changed

+41
-1
lines changed

zenstruck/foundry/2.5/config/packages/zenstruck_foundry.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ when@dev: &dev
22
# See full configuration: https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#full-default-bundle-configuration
33
zenstruck_foundry:
44
persistence:
5-
# Flush only once per call of `PersistentObjectFactory::create()` in userland
5+
# Flush only once per call of `PersistentObjectFactory::create()`
66
flush_once: true
77

88
when@test: *dev
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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

zenstruck/foundry/2.6/manifest.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"copy-from-recipe": {
3+
"config/": "%CONFIG_DIR%/"
4+
},
5+
"bundles": {
6+
"Zenstruck\\Foundry\\ZenstruckFoundryBundle": ["dev", "test"]
7+
},
8+
"conflict": {
9+
"doctrine/persistence": "<2.0",
10+
"symfony/framework-bundle": "<6.4"
11+
},
12+
"aliases": ["foundry"]
13+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
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</>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace App\Fixtures;
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+
}

0 commit comments

Comments
 (0)