Skip to content

Commit

Permalink
Added data fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
TomHAnderson committed Apr 10, 2024
1 parent 9dc63fc commit f32ce20
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ Documentation
* GraphQL-php - https://webonyx.github.io/graphql-php/
* magidoc - https://magidoc.js.org/introduction/welcome
* graphiql - https://github.com/graphql/graphiql/blob/main/packages/graphiql/README.md
* migrations - https://laraveldoctrine.org/docs/1.8/migrations
* data fixtures - https://github.com/API-Skeletons/laravel-doctrine-data-fixtures/blob/main/README.md
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"require": {
"php": "^8.3",
"api-skeletons/doctrine-orm-graphql": "^10.2",
"api-skeletons/laravel-doctrine-data-fixtures": "^1.0",
"guzzlehttp/guzzle": "^7.2",
"laravel-doctrine/migrations": "^3.1",
"laravel-doctrine/orm": "^2.0",
Expand Down
143 changes: 142 additions & 1 deletion composer.lock

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

26 changes: 26 additions & 0 deletions config/doctrine-data-fixtures.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

/**
* In the default values listed below, ORM fixtures are configured. You may
* configure other Doctrine fixture group types:
*
* ORMExecutor | PHPCRExecutor | MongoDBExecutor
* ORMPurger | PHPCRPurger | MongoDBPurger
*/

return [
'default' => [ // Group name
'objectManager' => 'Doctrine\ORM\EntityManager',
'executor' => \Doctrine\Common\DataFixtures\Executor\ORMExecutor::class,
'purger' => \Doctrine\Common\DataFixtures\Purger\ORMPurger::class,
'fixtures' => [
// The order of fixtures in this list is not the order in which
// they will be executed. See
// https://github.com/doctrine/data-fixtures#fixture-ordering
/**
Fixture1::class,
Fixture2::class,
*/
],
],
];

0 comments on commit f32ce20

Please sign in to comment.