Skip to content

[zenstruck/foundry] Add 2.6 config & one story as fixture #1415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ when@dev: &dev
# See full configuration: https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#full-default-bundle-configuration
zenstruck_foundry:
persistence:
# Flush only once per call of `PersistentObjectFactory::create()` in userland
# Flush only once per call of `PersistentObjectFactory::create()`
flush_once: true

when@test: *dev
8 changes: 8 additions & 0 deletions zenstruck/foundry/2.6/config/packages/zenstruck_foundry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
when@dev: &dev
# See full configuration: https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#full-default-bundle-configuration
zenstruck_foundry:
persistence:
# Flush only once per call of `PersistentObjectFactory::create()`
flush_once: true

when@test: *dev
14 changes: 14 additions & 0 deletions zenstruck/foundry/2.6/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
},
"bundles": {
"Zenstruck\\Foundry\\ZenstruckFoundryBundle": ["dev", "test"]
},
"conflict": {
"doctrine/persistence": "<2.0",
"symfony/framework-bundle": "<6.4"
},
"aliases": ["foundry"]
}
4 changes: 4 additions & 0 deletions zenstruck/foundry/2.6/post-install.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* You're ready to use zenstruck/foundry. Create your first factory with
<info>bin/console make:factory</>.

* <fg=blue>Read</> the documentation at <comment>https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html</>
15 changes: 15 additions & 0 deletions zenstruck/foundry/2.6/src/Story/AppStory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace App\Story;

use Zenstruck\Foundry\Attribute\AsFixture;
use Zenstruck\Foundry\Story;

#[AsFixture(name: 'main')]
final class AppStory extends Story
{
public function build(): void
{
// SomeFactory::createOne();
}
}
Loading