Skip to content

Fix fixtures loading #13

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 5 commits into from
Apr 29, 2017
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
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ script:
- docker-compose build
- docker-compose run web composer install -o -n
- docker-compose run web bin/console security:check
- docker-compose run web bin/console doctrine:schema:validate --skip-sync
- docker-compose up -d
- docker-compose run web bin/console doctrine:schema:create
- docker-compose run web bin/console hautelook:fixtures:load -n
1 change: 1 addition & 0 deletions app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ doctrine:
user: "%database_user%"
password: "%database_password%"
charset: UTF8
server_version: 5.7
# if using pdo_sqlite as your database driver:
# 1. add the path in parameters.yml
# e.g. database_path: "%kernel.root_dir%/data/data.db3"
Expand Down
8 changes: 4 additions & 4 deletions src/AppBundle/Entity/Book.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function getAuthor()
/**
* Get title.
*
* @return title
* @return string
*/
public function getTitle()
{
Expand All @@ -187,7 +187,7 @@ public function getTitle()
/**
* Set title.
*
* @param title the value to set
* @param string $title the value to set
*/
public function setTitle($title)
{
Expand All @@ -197,7 +197,7 @@ public function setTitle($title)
/**
* Get publicationDate.
*
* @return publicationDate
* @return \DateTime
*/
public function getPublicationDate()
{
Expand All @@ -207,7 +207,7 @@ public function getPublicationDate()
/**
* Set publicationDate.
*
* @param publicationDate the value to set
* @param \DateTime the value to set
*/
public function setPublicationDate($publicationDate)
{
Expand Down
14 changes: 7 additions & 7 deletions src/AppBundle/Entity/Review.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function getRating()
/**
* Get body.
*
* @return body
* @return string
*/
public function getBody()
{
Expand All @@ -130,7 +130,7 @@ public function getBody()
/**
* Set body.
*
* @param body the value to set
* @param string $body the value to set
*/
public function setBody($body)
{
Expand All @@ -150,7 +150,7 @@ public function getBook()
/**
* Set book.
*
* @param book the value to set
* @param Book $book the value to set
*/
public function setBook(Book $book)
{
Expand All @@ -160,7 +160,7 @@ public function setBook(Book $book)
/**
* Get author.
*
* @return author
* @return string
*/
public function getAuthor()
{
Expand All @@ -170,7 +170,7 @@ public function getAuthor()
/**
* Set author.
*
* @param author the value to set
* @param string $author the value to set
*/
public function setAuthor($author)
{
Expand All @@ -180,7 +180,7 @@ public function setAuthor($author)
/**
* Get publicationDate.
*
* @return publicationDate
* @return \DateTime
*/
public function getPublicationDate()
{
Expand All @@ -190,7 +190,7 @@ public function getPublicationDate()
/**
* Set publicationDate.
*
* @param publicationDate the value to set
* @param \DateTime $publicationDate the value to set
*/
public function setPublicationDate(\DateTime $publicationDate)
{
Expand Down
10 changes: 6 additions & 4 deletions src/AppBundle/Resources/fixtures/orm/books.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
'AppBundle\Entity\Book':
book_{1..100}:
isbn: <isbn13()>
name: <sentence()>
title: <sentence()>
description: <paragraph()>
author: <name()>
dateCreated: <dateTime()>
publicationDate: <dateTime()>

'AppBundle\Entity\Review':
review_{1..500}:
reviewBody: <paragraph()>
body: <paragraph()>
rating: <numberBetween(0, 5)>
itemReviewed: '@book_*'
book: '@book_*'
author: <name()>
publicationDate: <dateTime()>