Skip to content

Commit

Permalink
add fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
mykiwi committed May 4, 2022
1 parent a617830 commit 6bf1258
Show file tree
Hide file tree
Showing 5 changed files with 200 additions and 1 deletion.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"symfony/yaml": "6.0.*"
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4",
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "6.0.*",
"symfony/css-selector": "6.0.*",
Expand Down
167 changes: 166 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
];
17 changes: 17 additions & 0 deletions src/DataFixtures/AppFixtures.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace App\DataFixtures;

use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;

class AppFixtures extends Fixture
{
public function load(ObjectManager $manager): void
{
// $product = new Product();
// $manager->persist($product);

$manager->flush();
}
}
15 changes: 15 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"doctrine/common": {
"version": "3.3.0"
},
"doctrine/data-fixtures": {
"version": "1.5.3"
},
"doctrine/dbal": {
"version": "3.3.6"
},
Expand All @@ -37,6 +40,18 @@
"src/Repository/.gitignore"
]
},
"doctrine/doctrine-fixtures-bundle": {
"version": "3.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "3.0",
"ref": "1f5514cfa15b947298df4d771e694e578d4c204d"
},
"files": [
"src/DataFixtures/AppFixtures.php"
]
},
"doctrine/doctrine-migrations-bundle": {
"version": "3.2",
"recipe": {
Expand Down

0 comments on commit 6bf1258

Please sign in to comment.