Skip to content

Commit 2f2730c

Browse files
committed
add fixtures packages
1 parent a617830 commit 2f2730c

File tree

5 files changed

+200
-1
lines changed

5 files changed

+200
-1
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"symfony/yaml": "6.0.*"
2020
},
2121
"require-dev": {
22+
"doctrine/doctrine-fixtures-bundle": "^3.4",
2223
"phpunit/phpunit": "^9.5",
2324
"symfony/browser-kit": "6.0.*",
2425
"symfony/css-selector": "6.0.*",

composer.lock

Lines changed: 166 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/bundles.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@
88
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
99
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
1010
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
11+
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
1112
];

src/DataFixtures/AppFixtures.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace App\DataFixtures;
4+
5+
use Doctrine\Bundle\FixturesBundle\Fixture;
6+
use Doctrine\Persistence\ObjectManager;
7+
8+
class AppFixtures extends Fixture
9+
{
10+
public function load(ObjectManager $manager): void
11+
{
12+
// $product = new Product();
13+
// $manager->persist($product);
14+
15+
$manager->flush();
16+
}
17+
}

symfony.lock

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
"doctrine/common": {
1818
"version": "3.3.0"
1919
},
20+
"doctrine/data-fixtures": {
21+
"version": "1.5.3"
22+
},
2023
"doctrine/dbal": {
2124
"version": "3.3.6"
2225
},
@@ -37,6 +40,18 @@
3740
"src/Repository/.gitignore"
3841
]
3942
},
43+
"doctrine/doctrine-fixtures-bundle": {
44+
"version": "3.4",
45+
"recipe": {
46+
"repo": "github.com/symfony/recipes",
47+
"branch": "main",
48+
"version": "3.0",
49+
"ref": "1f5514cfa15b947298df4d771e694e578d4c204d"
50+
},
51+
"files": [
52+
"src/DataFixtures/AppFixtures.php"
53+
]
54+
},
4055
"doctrine/doctrine-migrations-bundle": {
4156
"version": "3.2",
4257
"recipe": {

0 commit comments

Comments
 (0)