Skip to content
This repository was archived by the owner on Apr 7, 2025. It is now read-only.

Commit 772c962

Browse files
Merge pull request #46 from TheDragonCode/2.x
Added Symfony 7 support
2 parents 3398288 + b050b2e commit 772c962

File tree

4 files changed

+55
-5
lines changed

4 files changed

+55
-5
lines changed

.github/workflows/phpunit.yml

+46-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,52 @@ jobs:
88
strategy:
99
fail-fast: true
1010
matrix:
11-
php: [ "7.3", "7.4", "8.0", "8.1" ]
11+
php: [ "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ]
12+
symfony: [ "4.0", "5.0", "6.0", "7.0" ]
13+
exclude:
14+
- php: "7.4"
15+
symfony: "4.0"
16+
17+
- php: "8.0"
18+
symfony: "4.0"
19+
20+
- php: "8.1"
21+
symfony: "4.0"
22+
23+
- php: "8.2"
24+
symfony: "4.0"
25+
26+
- php: "8.3"
27+
symfony: "4.0"
28+
29+
- php: "8.2"
30+
symfony: "5.0"
31+
32+
- php: "8.3"
33+
symfony: "5.0"
34+
35+
- php: "7.3"
36+
symfony: "6.0"
37+
38+
- php: "7.4"
39+
symfony: "6.0"
40+
41+
- php: "8.0"
42+
symfony: "6.0"
43+
44+
- php: "7.3"
45+
symfony: "7.0"
46+
47+
- php: "7.4"
48+
symfony: "7.0"
49+
50+
- php: "8.0"
51+
symfony: "7.0"
52+
53+
- php: "8.1"
54+
symfony: "7.0"
1255

13-
name: PHP ${{ matrix.php }}
56+
name: PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}
1457

1558
steps:
1659
- name: Checkout code
@@ -24,7 +67,7 @@ jobs:
2467
coverage: none
2568

2669
- name: Install dependencies
27-
run: composer update --prefer-stable --prefer-dist --no-progress --no-interaction
70+
run: composer require symfony/http-foundation:^${{ matrix.symfony }} --prefer-dist --no-progress --no-interaction
2871

2972
- name: Execute tests
3073
run: sudo vendor/bin/phpunit

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea/
2+
build/
23

34
node_modules/
45
vendor/

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
"ext-json": "*",
4141
"dragon-code/contracts": "^2.17",
4242
"dragon-code/support": "^5.0 || ^6.0",
43-
"symfony/http-foundation": "^4.0 || ^5.0 || ^6.0"
43+
"symfony/http-foundation": "^4.0 || ^5.0 || ^6.0 || ^7.0"
4444
},
4545
"require-dev": {
4646
"phpunit/phpunit": "^9.6",
47-
"symfony/var-dumper": "^4.3 || ^5.4 || ^6.0"
47+
"symfony/var-dumper": "^4.3 || ^5.4 || ^6.0 || ^7.0"
4848
},
4949
"conflict": {
5050
"andrey-helldar/simple-data-transfer-object": "*"

tests/Unit/FromTest.php

+6
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ public function testObjectArrayable()
7676

7777
public function testRequest()
7878
{
79+
if (! method_exists(Request::class, 'toArray')) {
80+
$this->assertTrue(true);
81+
82+
return;
83+
}
84+
7985
$content = json_encode([
8086
'foo' => $this->foo,
8187
'bar' => $this->bar,

0 commit comments

Comments
 (0)