Skip to content

Commit 8063740

Browse files
committed
make php 8 and lowest dependency work
zircote/swagger-php: "^2.0.14" is required for operationId to be initialized as undefined
1 parent 0551950 commit 8063740

12 files changed

Lines changed: 86 additions & 91 deletions

File tree

.github/workflows/checks.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 67 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,72 @@
11
name: CI
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
88

99
jobs:
10-
build-lowest-version:
11-
name: Build lowest version
12-
runs-on: ubuntu-latest
13-
14-
steps:
15-
- name: Set up PHP
16-
uses: shivammathur/setup-php@v2
17-
with:
18-
php-version: '7.2'
19-
coverage: 'none'
20-
21-
- name: Checkout code
22-
uses: actions/checkout@v2
23-
24-
- name: Install dependencies
25-
run: composer update --no-interaction --prefer-stable --prefer-lowest --no-progress --prefer-dist
26-
27-
- name: Run tests
28-
run: vendor/bin/simple-phpunit
29-
30-
build:
31-
name: Build
32-
runs-on: ubuntu-latest
33-
strategy:
34-
max-parallel: 10
35-
matrix:
36-
php: ['7.2', '7.3', '7.4', '8.0']
37-
38-
steps:
39-
- name: Set up PHP
40-
uses: shivammathur/setup-php@v2
41-
with:
42-
php-version: ${{ matrix.php }}
43-
coverage: 'none'
44-
45-
- name: Checkout code
46-
uses: actions/checkout@v2
47-
48-
- name: Install dependencies
49-
run: composer update --no-interaction --no-progress --prefer-dist
50-
51-
- name: Run tests
52-
run: vendor/bin/simple-phpunit
10+
build-lowest-version:
11+
name: Build lowest version
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Set up PHP
16+
uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: '7.2'
19+
coverage: 'none'
20+
21+
- name: Checkout code
22+
uses: actions/checkout@v2
23+
24+
- name: Install dependencies
25+
run: composer update --no-interaction --prefer-stable --prefer-lowest --no-progress --prefer-dist
26+
27+
- name: Run tests
28+
run: vendor/bin/simple-phpunit
29+
30+
build:
31+
name: Build
32+
runs-on: ubuntu-latest
33+
strategy:
34+
max-parallel: 10
35+
matrix:
36+
php: ['7.2', '7.3', '7.4']
37+
38+
steps:
39+
- name: Set up PHP
40+
uses: shivammathur/setup-php@v2
41+
with:
42+
php-version: ${{ matrix.php }}
43+
coverage: 'none'
44+
45+
- name: Checkout code
46+
uses: actions/checkout@v2
47+
48+
- name: Install dependencies
49+
run: composer update --no-interaction --prefer-stable --no-progress --prefer-dist
50+
51+
- name: Run tests
52+
run: vendor/bin/simple-phpunit
53+
54+
build-php8:
55+
name: Build (PHP 8)
56+
runs-on: ubuntu-latest
57+
58+
steps:
59+
- name: Set up PHP
60+
uses: shivammathur/setup-php@v2
61+
with:
62+
php-version: 8.0
63+
coverage: 'none'
64+
65+
- name: Checkout code
66+
uses: actions/checkout@v2
67+
68+
- name: Install dependencies
69+
run: composer update --no-interaction --no-progress --prefer-dist
70+
71+
- name: Run tests
72+
run: vendor/bin/simple-phpunit

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616
"symfony/finder": "^4.4|^5.0",
1717
"symfony/framework-bundle": "^4.4|^5.0",
1818
"symfony/routing": "^4.4|^5.0",
19-
"zircote/swagger-php": "^2.0"
19+
"zircote/swagger-php": "^2.0.14"
2020
},
2121
"require-dev": {
2222
"symfony/phpunit-bridge": "^5.0@dev"
2323
},
24+
"minimum-stability": "dev",
2425
"autoload": {
2526
"psr-4": {
2627
"Tobion\\OpenApiSymfonyRouting\\": "src/"

tests/Fixtures/Basic/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Controller
2121
* path="/foobar",
2222
* @SWG\Response(
2323
* response="200",
24-
* description="Success",
24+
* description="Success"
2525
* )
2626
* )
2727
*/

tests/Fixtures/FormatSuffix/Controller.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Controller
2424
* path="/a",
2525
* @SWG\Response(
2626
* response="200",
27-
* description="Success",
27+
* description="Success"
2828
* )
2929
* )
3030
*/
@@ -40,7 +40,7 @@ public function inheritEnabledFormatSuffix(): void
4040
* }},
4141
* @SWG\Response(
4242
* response="200",
43-
* description="Success",
43+
* description="Success"
4444
* )
4545
* )
4646
*/
@@ -54,7 +54,7 @@ public function defineFormatPattern(): void
5454
* x={"format-suffix": false},
5555
* @SWG\Response(
5656
* response="200",
57-
* description="Success",
57+
* description="Success"
5858
* )
5959
* )
6060
*/

tests/Fixtures/OperationId/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Controller
2222
* operationId="my-name",
2323
* @SWG\Response(
2424
* response="200",
25-
* description="Success",
25+
* description="Success"
2626
* )
2727
* )
2828
*/

tests/Fixtures/PathParameterPattern/Controller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Controller
2727
* ),
2828
* @SWG\Response(
2929
* response="200",
30-
* description="Success",
30+
* description="Success"
3131
* )
3232
* )
3333
*/
@@ -47,7 +47,7 @@ public function noPattern(): void
4747
* ),
4848
* @SWG\Response(
4949
* response="200",
50-
* description="Success",
50+
* description="Success"
5151
* )
5252
* )
5353
*/

tests/Fixtures/SeveralClasses/BarController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class BarController
2121
* path="/bar",
2222
* @SWG\Response(
2323
* response="200",
24-
* description="Success",
24+
* description="Success"
2525
* )
2626
* )
2727
*/

tests/Fixtures/SeveralClasses/FooController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class FooController
1313
* path="/foo",
1414
* @SWG\Response(
1515
* response="200",
16-
* description="Success",
16+
* description="Success"
1717
* )
1818
* )
1919
*/

tests/Fixtures/SeveralClasses/SubNamespace/SubController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class SubController
1313
* path="/sub",
1414
* @SWG\Response(
1515
* response="200",
16-
* description="Success",
16+
* description="Success"
1717
* )
1818
* )
1919
*/

0 commit comments

Comments
 (0)