196 search results

Not sure what I did wrong (which is typical). I ran ``` symfony console foundry:load-fixtures ``` It worked correctly in that it did run src/Story/AppStory and did load the Users. But it dropped the "doctrine_migrations_versions" table. Before loading the fixtures: ``` symfony…
JeffJones
JeffJones
Read Full Comment
Hey Ruslan, No problem :) Btw, you can use ResetDatabase trait from Foundry lib in your tests to automatically prepare test DB before each test :) Cheers!
…, Indeed, I used foundry v2.1.0 and browser v1.9.0. I ran `composer update zenstruck/browser`, which brought my browser version to 1.9.1 and it seems to solve the issue. I can now use `browser->actingAs($user)` with `$user` generated with…
… Can you tell me what version of `zenstruck/browser` & `zenstruck/foundry` you are using? ``` composer show zenstruck/browser composer show zenstruck/foundry ``` (I'm thinking you may be on foundry 2+ but your browser version does not support it yet - I'm hoping upgrading `zenstruck…
I reviewed that documentation yes, thank you. It was not clear to me that foundry was *only* for fixtures, as it's use of the 'factory' namespace (to me at least) implies it's purpose as a non-fixture factory also. I was looking to…
Hey Rufnex, Yep, exactly like Ruslan mentioned below in https://symfonycasts.com/screencast/symfony-doctrine/foundry#comment-27727 I.e. you create a faker instance manually via `$faker = Factory::create('fr_FR');` passing the desired locale and then use it below. Cheers!
…talking about how to localize Faker with the Foundry bundle - here's an example: https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#faker . As you can see from the docs, you can do it via Symfony configuration: ```yaml # config/packages/zenstruck_foundry.yaml when@dev: #…
Hallo, i habe a issue with Relation ManyToMany in Foundry 1.21 and Symfony 6 in AppFixtrures: ` TagFactory::createMany(100); $questions = QuestionFactory::createMany(20, function() { return [ 'tags' => TagFactory::randomRange(0, 5), ]; }); ` i got error from doctrine orm : Cannot set attribute "tags" for object…
Tien dat L.
Tien dat L.
Read Full Comment
Struggling with this one. I keep getting the error "The class 'Zenstruck\Foundry\Proxy' was not found in the chain configured namespaces App\Entity" and there are some deprecation warnings if I turn the volume up (-vvv). It happens when I add this code: ` $tag1…
Hey Dang! Yes, mo Foundry is much better than Alice. Foundry didn't exist when I wrote the earlier tutorials that used Alice. I now *much* prefer Foundry of Alice :). So use it instead! Cheers!
weaverryan
weaverryan
Read Full Comment
Oh, yes! We will cover that - just not using Foundry specifically inside of tests :).
weaverryan
weaverryan
Read Full Comment
Hey @Farry7! Right here: https://symfonycasts.com/screencast/symfony-doctrine/foundry Cheers!
weaverryan
weaverryan
Read Full Comment
Hi! I'm trying to work my way around Foundry but I'm facing two issues. First one: I'd like to create dummy users and I've got a `password` property. So I tried to emulate the Symfony Doc tip to encode password into…
Utilisateur
Utilisateur
Read Full Comment
…C.! > So if I see this right zenstruck/foundry acts as a replacement for the hautelook/AliceBundle 💯 I have not been very happy with Alice for awhile now, and have been looking for replacements. Foundry even has (via a simple trait, similar to…
weaverryan
weaverryan
Read Full Comment
Since I haven't found a solution yet. I just doing a work-around: [ ] Run any migrations needed. [ ] Export the "doctrine_migrations_versions" table. [ ] Run the foundry:load-fixtures command [ ] Import the "doctrine_migrations_versions" table. Sigh...
JeffJones
JeffJones
Read Full Comment
Hey |mention:66023| This may sound silly, but did you load the fixtures? `symfony console foundry:load-fixtures` If you did, could you do it again and see if there were any errors or warnings? Another thing to check is whether you're using Docker…
MolloKhan
MolloKhan
Read Full Comment
Hey |mention:71831| That's a bit odd. The `_real()` method gives you the entity object instead of a wrapper coming from Foundry. Are you calling `persist()` on each droid object? You can click on expand to view the entire fixtures file in this code…
MolloKhan
MolloKhan
Read Full Comment
Hey |mention:66023| I just gave this a try (with the new code) and it works fine. Could you copy-paste the AppFixtures code from this code block and try again? https://symfonycasts.com/screencast/doctrine-relations/many-to-many-foundry#codeblock-3d67ea2ef7 Cheers!
MolloKhan
MolloKhan
Read Full Comment
I've updated my fork of the course (https://github.com/survos-sites/easyadmin-cast) with _everything_, foundry:^2, php8.4, Symfony 7.2, doctrine/persistence:^4, I mean everything. And every recipe. AssetMapper instead of Webpack. Attributes instead of annotations. ``` composer outdated Direct dependencies…
Tac-Tacelosky
Tac-Tacelosky
Read Full Comment
…package name now :) Actually, we do recommend `zenstruck/foundry` instead, than in turn has that faker as a dependency, so with Foundry you get double-win with creating your fixtures ;) We also have many videos about Foundry on SymfonyCasts, you can check them here: https…