-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Product reviews API #8772
Product reviews API #8772
Changes from 1 commit
0f6966a
c660fa9
fb337a6
0e2ccc9
0151d20
9785c0e
4aa26f9
de75e27
ca4a90a
3c1048f
bc07098
5e41ae6
e998b59
dd37af3
0228602
d571b9c
3933ed2
3cf247a
859021c
ca795cb
78d2c96
aca53a4
27086bd
e386f37
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,10 +50,10 @@ public function findAcceptedByProductSlugAndChannel(string $slug, string $locale | |
public function createQueryBuilderByProductCode(string $locale, string $productCode): QueryBuilder; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding methods to an interface is a BC break. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pamil, in this case how can proceed next? Should we put the methods only into the ProductReviewRepository? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to our proposed BC promise (#8901), it isn't a BC break 🎉 |
||
|
||
/** | ||
* @param integer $id | ||
* @param mixed $id | ||
* @param string $productCode | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doubled space after |
||
* | ||
* @return ReviewInterface|null | ||
*/ | ||
public function findOneByIdAndProductCode(string $id, string $productCode): ?ReviewInterface; | ||
public function findOneByIdAndProductCode($id, string $productCode): ?ReviewInterface; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ Sylius\Component\Core\Model\Customer: | |
lastName: King | ||
email: example.king@example.com | ||
emailCanonical: example.king@example.com | ||
|
||
Sylius\Component\Core\Model\Product: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing blank line before this line |
||
product1: | ||
fallbackLocale: en_US | ||
|
@@ -39,4 +40,4 @@ Sylius\Component\Core\Model\ProductReview: | |
comment: "mug_review_bad_comment" | ||
author: "@customer_example1" | ||
status: "accepted" | ||
reviewSubject: "@product1" | ||
reviewSubject: "@product1" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,92 @@ | ||
{ | ||
"id": @integer@, | ||
"title": "mug_review_best", | ||
"rating": 4, | ||
"comment": "mug_review_best_comment", | ||
"author": { | ||
"id": @integer@, | ||
"email": "example.queen@example.com", | ||
"emailCanonical": "example.queen@example.com", | ||
"firstName": "Example", | ||
"lastName": "Queen", | ||
"gender": "u", | ||
"_links": { | ||
"self": { | ||
"href": @string@ | ||
} | ||
} | ||
}, | ||
"status": "accepted", | ||
"reviewSubject": { | ||
"id": @integer@, | ||
"code": "MUG_REVIEW_BEST", | ||
"attributes": [], | ||
"options": [], | ||
"associations": [], | ||
"translations": { | ||
"en": { | ||
"locale": "en" | ||
} | ||
}, | ||
"productTaxons": [], | ||
"channels": [], | ||
"reviews": { | ||
"1": { | ||
"title": "mug_review_best", | ||
"rating": 4, | ||
"comment": "mug_review_best_comment", | ||
"author": { | ||
"id": @integer@, | ||
"title": "mug_review_good", | ||
"rating": 3, | ||
"comment": "mug_review_good_comment", | ||
"author": { | ||
"id": @integer@, | ||
"email": "example.queen@example.com", | ||
"emailCanonical": "example.queen@example.com", | ||
"firstName": "Example", | ||
"lastName": "Queen", | ||
"gender": "u", | ||
"_links": { | ||
"email": "example.queen@example.com", | ||
"emailCanonical": "example.queen@example.com", | ||
"firstName": "Example", | ||
"lastName": "Queen", | ||
"gender": "u", | ||
"_links": { | ||
"self": { | ||
"href": @string@ | ||
"href": @string@ | ||
} | ||
} | ||
}, | ||
"status": "rejected", | ||
"createdAt": @string@, | ||
"updatedAt": @string@ | ||
}, | ||
"2": { | ||
} | ||
}, | ||
"status": "accepted", | ||
"reviewSubject": { | ||
"id": @integer@, | ||
"title": "mug_review_bad", | ||
"rating": 1, | ||
"comment": "mug_review_bad_comment", | ||
"author": { | ||
"id": @integer@, | ||
"email": "example.queen@example.com", | ||
"emailCanonical": "example.queen@example.com", | ||
"firstName": "Example", | ||
"lastName": "Queen", | ||
"gender": "u", | ||
"_links": { | ||
"self": { | ||
"href": @string@ | ||
"code": "MUG_REVIEW_BEST", | ||
"attributes": [], | ||
"options": [], | ||
"associations": [], | ||
"translations": { | ||
"en": { | ||
"locale": "en" | ||
} | ||
} | ||
}, | ||
"status": "accepted", | ||
"createdAt": @string@, | ||
"updatedAt": @string@ | ||
} | ||
"productTaxons": [], | ||
"channels": [], | ||
"reviews": { | ||
"1": { | ||
"id": @integer@, | ||
"title": "mug_review_good", | ||
"rating": 3, | ||
"comment": "mug_review_good_comment", | ||
"author": { | ||
"id": @integer@, | ||
"email": "example.queen@example.com", | ||
"emailCanonical": "example.queen@example.com", | ||
"firstName": "Example", | ||
"lastName": "Queen", | ||
"gender": "u", | ||
"_links": { | ||
"self": { | ||
"href": @string@ | ||
} | ||
} | ||
}, | ||
"status": "rejected", | ||
"createdAt": @string@, | ||
"updatedAt": @string@ | ||
}, | ||
"2": { | ||
"id": @integer@, | ||
"title": "mug_review_bad", | ||
"rating": 1, | ||
"comment": "mug_review_bad_comment", | ||
"author": { | ||
"id": @integer@, | ||
"email": "example.queen@example.com", | ||
"emailCanonical": "example.queen@example.com", | ||
"firstName": "Example", | ||
"lastName": "Queen", | ||
"gender": "u", | ||
"_links": { | ||
"self": { | ||
"href": @string@ | ||
} | ||
} | ||
}, | ||
"status": "accepted", | ||
"createdAt": @string@, | ||
"updatedAt": @string@ | ||
} | ||
}, | ||
"averageRating": 2.5, | ||
"images": [], | ||
"_links": { | ||
"self": { | ||
"href": "/api/v1/products/MUG_REVIEW_BEST" | ||
}, | ||
"variants": { | ||
"href": "/api/v1/products/MUG_REVIEW_BEST/variants/" | ||
} | ||
} | ||
}, | ||
"averageRating": 2.5, | ||
"images": [], | ||
"_links": { | ||
"self": { | ||
"href": "/api/v1/products/MUG_REVIEW_BEST" | ||
}, | ||
"variants": { | ||
"href": "/api/v1/products/MUG_REVIEW_BEST/variants/" | ||
} | ||
} | ||
}, | ||
"createdAt": @string@, | ||
"updatedAt": @string@ | ||
} | ||
"createdAt": @string@, | ||
"updatedAt": @string@ | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"code":400, | ||
"message":"" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,4 +109,4 @@ | |
}, | ||
"createdAt": @string@, | ||
"updatedAt": @string@ | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,4 @@ | |
} | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,4 @@ | |
"_embedded": { | ||
"items": [] | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that product_review should be before product_variant to keep alphabetical order