Skip to content

Commit a7c6d02

Browse files
authored
Merge pull request #285 from BitBagCommerce/upgrade_gha
Upgrade gha
2 parents 01b2e6f + 2afee64 commit a7c6d02

11 files changed

+290
-6
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
matrix:
2323
php: [ "8.2", "8.3" ]
2424
symfony: [ "^6.4", "^7.1" ]
25-
sylius: [ "^2.0" ]
25+
sylius: ["~2.0.0", "~2.1.0"]
2626
node: [ "20.x" ]
2727
mysql: [ "8.4" ]
2828
env:

tests/Application/config/packages/framework.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ framework:
55
session:
66
handler_id: ~
77
ide: phpstorm
8-
8+
annotations:
9+
enabled: false

tests/PHPUnit/Integration/Api/ProductListingTest.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
namespace PHPUnit\Integration\Api;
1414

1515
use ApiTestCase\JsonApiTestCase;
16+
use Sylius\Bundle\CoreBundle\SyliusCoreBundle;
1617
use Symfony\Component\HttpFoundation\Response;
1718
use Symfony\Component\Process\Process;
1819

@@ -40,6 +41,13 @@ public function test_it_finds_products_by_name(): void
4041
);
4142

4243
$response = $this->client->getResponse();
44+
45+
if (SyliusCoreBundle::VERSION_ID >= 20100) {
46+
$this->assertResponse($response, '2.1_test_it_finds_products_by_name', Response::HTTP_OK);
47+
48+
return;
49+
}
50+
4351
$this->assertResponse($response, 'test_it_finds_products_by_name', Response::HTTP_OK);
4452
}
4553

@@ -54,6 +62,13 @@ public function test_it_finds_products_by_name_and_facets(): void
5462
);
5563

5664
$response = $this->client->getResponse();
65+
66+
if (SyliusCoreBundle::VERSION_ID >= 20100) {
67+
$this->assertResponse($response, '2.1_test_it_finds_products_by_name_and_facets', Response::HTTP_OK);
68+
69+
return;
70+
}
71+
5772
$this->assertResponse($response, 'test_it_finds_products_by_name_and_facets', Response::HTTP_OK);
5873
}
5974

@@ -68,6 +83,13 @@ public function test_it_finds_products_by_name_and_multiple_facets(): void
6883
);
6984

7085
$response = $this->client->getResponse();
86+
87+
if (SyliusCoreBundle::VERSION_ID >= 20100) {
88+
$this->assertResponse($response, '2.1_test_it_finds_products_by_name_and_multiple_facets', Response::HTTP_OK);
89+
90+
return;
91+
}
92+
7193
$this->assertResponse($response, 'test_it_finds_products_by_name_and_multiple_facets', Response::HTTP_OK);
7294
}
7395

@@ -82,6 +104,13 @@ public function test_it_updates_facets(): void
82104
);
83105

84106
$response = $this->client->getResponse();
107+
108+
if (SyliusCoreBundle::VERSION_ID >= 20100) {
109+
$this->assertResponse($response, '2.1_test_it_updates_facets', Response::HTTP_OK);
110+
111+
return;
112+
}
113+
85114
$this->assertResponse($response, 'test_it_updates_facets', Response::HTTP_OK);
86115
}
87116

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"items": [
3+
{
4+
"productTaxons": [
5+
"/api/v2/shop/product-taxons/@string@"
6+
],
7+
"mainTaxon": null,
8+
"averageRating": "@integer@ || @float@",
9+
"images": [],
10+
"id": "@integer@",
11+
"code": "MUG",
12+
"variants": [],
13+
"options": [],
14+
"associations": [],
15+
"createdAt": "@string@",
16+
"updatedAt": "@string@",
17+
"shortDescription": null,
18+
"reviews": [],
19+
"name": "Mug",
20+
"description": "@string@",
21+
"slug": "mug",
22+
"defaultVariant": null,
23+
"defaultVariantData": null
24+
}
25+
],
26+
"facets": {
27+
"taxon": {
28+
"doc_count_error_upper_bound": 0,
29+
"sum_other_doc_count": 0,
30+
"buckets": [
31+
{
32+
"key": "mugs",
33+
"doc_count": 1
34+
}
35+
]
36+
}
37+
},
38+
"pagination": {
39+
"current_page": 1,
40+
"has_previous_page": false,
41+
"has_next_page": false,
42+
"per_page": 9,
43+
"total_items": 1,
44+
"total_pages": 1
45+
}
46+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"items": [
3+
{
4+
"productTaxons": [
5+
"/api/v2/shop/product-taxons/@string@"
6+
],
7+
"mainTaxon": null,
8+
"averageRating": 0,
9+
"images": [],
10+
"id": "@integer@",
11+
"code": "MUG",
12+
"variants": [],
13+
"options": [],
14+
"associations": [],
15+
"createdAt": "@string@",
16+
"updatedAt": "@string@",
17+
"shortDescription": null,
18+
"reviews": [],
19+
"name": "Mug",
20+
"description": "@string@",
21+
"slug": "mug",
22+
"defaultVariant": null,
23+
"defaultVariantData": null
24+
}
25+
],
26+
"facets": {
27+
"color": {
28+
"doc_count_error_upper_bound": 0,
29+
"sum_other_doc_count": 0,
30+
"buckets": [
31+
{
32+
"key": "red",
33+
"doc_count": 1
34+
}
35+
]
36+
},
37+
"taxon": {
38+
"doc_count_error_upper_bound": 0,
39+
"sum_other_doc_count": 0,
40+
"buckets": [
41+
{
42+
"key": "mugs",
43+
"doc_count": 1
44+
}
45+
]
46+
}
47+
},
48+
"pagination": {
49+
"current_page": 1,
50+
"has_previous_page": false,
51+
"has_next_page": false,
52+
"per_page": 9,
53+
"total_items": 1,
54+
"total_pages": 1
55+
}
56+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
{
2+
"items": [
3+
{
4+
"productTaxons": [
5+
"/api/v2/shop/product-taxons/@string@"
6+
],
7+
"mainTaxon": null,
8+
"averageRating": 0,
9+
"images": [],
10+
"id": "@integer@",
11+
"code": "MUG",
12+
"variants": [],
13+
"options": [],
14+
"associations": [],
15+
"createdAt": "@string@",
16+
"updatedAt": "@string@",
17+
"shortDescription": null,
18+
"reviews": [],
19+
"name": "Mug",
20+
"description": "@string@",
21+
"slug": "mug",
22+
"defaultVariant": null,
23+
"defaultVariantData": null
24+
},
25+
{
26+
"productTaxons": [],
27+
"mainTaxon": null,
28+
"averageRating": 0,
29+
"images": [],
30+
"id": "@integer@",
31+
"code": "MUG2",
32+
"variants": [],
33+
"options": [],
34+
"associations": [],
35+
"createdAt": "@string@",
36+
"updatedAt": "@string@",
37+
"shortDescription": null,
38+
"reviews": [],
39+
"name": "Mug 2",
40+
"description": "@string@",
41+
"slug": "mug-2",
42+
"defaultVariant": null,
43+
"defaultVariantData": null
44+
}
45+
],
46+
"facets": {
47+
"material": {
48+
"doc_count_error_upper_bound": 0,
49+
"sum_other_doc_count": 0,
50+
"buckets": [
51+
{
52+
"key": "ceramic",
53+
"doc_count": 2
54+
}
55+
]
56+
},
57+
"color": {
58+
"doc_count_error_upper_bound": 0,
59+
"sum_other_doc_count": 0,
60+
"buckets": [
61+
{
62+
"key": "red",
63+
"doc_count": 2
64+
}
65+
]
66+
},
67+
"taxon": {
68+
"doc_count_error_upper_bound": 0,
69+
"sum_other_doc_count": 0,
70+
"buckets": [
71+
{
72+
"key": "mugs",
73+
"doc_count": 1
74+
}
75+
]
76+
}
77+
},
78+
"pagination": {
79+
"current_page": 1,
80+
"has_previous_page": false,
81+
"has_next_page": false,
82+
"per_page": 9,
83+
"total_items": 2,
84+
"total_pages": 1
85+
}
86+
}
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"items": [
3+
{
4+
"productTaxons": [
5+
"/api/v2/shop/product-taxons/@string@"
6+
],
7+
"mainTaxon": null,
8+
"averageRating": 0,
9+
"images": [],
10+
"id": "@integer@",
11+
"code": "MUG",
12+
"variants": [],
13+
"options": [],
14+
"associations": [],
15+
"createdAt": "@string@",
16+
"updatedAt": "@string@",
17+
"shortDescription": null,
18+
"reviews": [],
19+
"name": "Mug",
20+
"description": "@string@",
21+
"slug": "mug",
22+
"defaultVariant": null,
23+
"defaultVariantData": null
24+
}
25+
],
26+
"facets": {
27+
"material": {
28+
"doc_count_error_upper_bound": 0,
29+
"sum_other_doc_count": 0,
30+
"buckets": [
31+
{
32+
"key": "ceramic",
33+
"doc_count": 1
34+
}
35+
]
36+
},
37+
"color": {
38+
"doc_count_error_upper_bound": 0,
39+
"sum_other_doc_count": 0,
40+
"buckets": [
41+
{
42+
"key": "red",
43+
"doc_count": 1
44+
}
45+
]
46+
},
47+
"taxon": {
48+
"doc_count_error_upper_bound": 0,
49+
"sum_other_doc_count": 0,
50+
"buckets": [
51+
{
52+
"key": "mugs",
53+
"doc_count": 1
54+
}
55+
]
56+
}
57+
},
58+
"pagination": {
59+
"current_page": 1,
60+
"has_previous_page": false,
61+
"has_next_page": false,
62+
"per_page": 9,
63+
"total_items": 1,
64+
"total_pages": 1
65+
}
66+
}

tests/PHPUnit/Integration/Api/Responses/Expected/test_it_finds_products_by_name.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@
4242
"total_items": 1,
4343
"total_pages": 1
4444
}
45-
}
45+
}

tests/PHPUnit/Integration/Api/Responses/Expected/test_it_finds_products_by_name_and_facets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@
5252
"total_items": 1,
5353
"total_pages": 1
5454
}
55-
}
55+
}

tests/PHPUnit/Integration/Api/Responses/Expected/test_it_finds_products_by_name_and_multiple_facets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@
8181
"total_items": 2,
8282
"total_pages": 1
8383
}
84-
}
84+
}

0 commit comments

Comments
 (0)