Skip to content

Commit 8b94f6b

Browse files
fbourigaultdunglas
authored andcommitted
Fix fixtures loading (#13)
1 parent 6e0bec9 commit 8b94f6b

File tree

5 files changed

+22
-15
lines changed

5 files changed

+22
-15
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ script:
77
- docker-compose build
88
- docker-compose run web composer install -o -n
99
- docker-compose run web bin/console security:check
10+
- docker-compose run web bin/console doctrine:schema:validate --skip-sync
11+
- docker-compose up -d
12+
- docker-compose run web bin/console doctrine:schema:create
13+
- docker-compose run web bin/console hautelook:fixtures:load -n

app/config/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ doctrine:
4949
user: "%database_user%"
5050
password: "%database_password%"
5151
charset: UTF8
52+
server_version: 5.7
5253
# if using pdo_sqlite as your database driver:
5354
# 1. add the path in parameters.yml
5455
# e.g. database_path: "%kernel.root_dir%/data/data.db3"

src/AppBundle/Entity/Book.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public function getAuthor()
177177
/**
178178
* Get title.
179179
*
180-
* @return title
180+
* @return string
181181
*/
182182
public function getTitle()
183183
{
@@ -187,7 +187,7 @@ public function getTitle()
187187
/**
188188
* Set title.
189189
*
190-
* @param title the value to set
190+
* @param string $title the value to set
191191
*/
192192
public function setTitle($title)
193193
{
@@ -197,7 +197,7 @@ public function setTitle($title)
197197
/**
198198
* Get publicationDate.
199199
*
200-
* @return publicationDate
200+
* @return \DateTime
201201
*/
202202
public function getPublicationDate()
203203
{
@@ -207,7 +207,7 @@ public function getPublicationDate()
207207
/**
208208
* Set publicationDate.
209209
*
210-
* @param publicationDate the value to set
210+
* @param \DateTime the value to set
211211
*/
212212
public function setPublicationDate($publicationDate)
213213
{

src/AppBundle/Entity/Review.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function getRating()
120120
/**
121121
* Get body.
122122
*
123-
* @return body
123+
* @return string
124124
*/
125125
public function getBody()
126126
{
@@ -130,7 +130,7 @@ public function getBody()
130130
/**
131131
* Set body.
132132
*
133-
* @param body the value to set
133+
* @param string $body the value to set
134134
*/
135135
public function setBody($body)
136136
{
@@ -150,7 +150,7 @@ public function getBook()
150150
/**
151151
* Set book.
152152
*
153-
* @param book the value to set
153+
* @param Book $book the value to set
154154
*/
155155
public function setBook(Book $book)
156156
{
@@ -160,7 +160,7 @@ public function setBook(Book $book)
160160
/**
161161
* Get author.
162162
*
163-
* @return author
163+
* @return string
164164
*/
165165
public function getAuthor()
166166
{
@@ -170,7 +170,7 @@ public function getAuthor()
170170
/**
171171
* Set author.
172172
*
173-
* @param author the value to set
173+
* @param string $author the value to set
174174
*/
175175
public function setAuthor($author)
176176
{
@@ -180,7 +180,7 @@ public function setAuthor($author)
180180
/**
181181
* Get publicationDate.
182182
*
183-
* @return publicationDate
183+
* @return \DateTime
184184
*/
185185
public function getPublicationDate()
186186
{
@@ -190,7 +190,7 @@ public function getPublicationDate()
190190
/**
191191
* Set publicationDate.
192192
*
193-
* @param publicationDate the value to set
193+
* @param \DateTime $publicationDate the value to set
194194
*/
195195
public function setPublicationDate(\DateTime $publicationDate)
196196
{
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
'AppBundle\Entity\Book':
22
book_{1..100}:
33
isbn: <isbn13()>
4-
name: <sentence()>
4+
title: <sentence()>
55
description: <paragraph()>
66
author: <name()>
7-
dateCreated: <dateTime()>
7+
publicationDate: <dateTime()>
88

99
'AppBundle\Entity\Review':
1010
review_{1..500}:
11-
reviewBody: <paragraph()>
11+
body: <paragraph()>
1212
rating: <numberBetween(0, 5)>
13-
itemReviewed: '@book_*'
13+
book: '@book_*'
14+
author: <name()>
15+
publicationDate: <dateTime()>

0 commit comments

Comments
 (0)