Skip to content

Commit b289dec

Browse files
authored
Drop PHP 7 and fix compatibility with SF6 (#121)
* Drop PHP 7 and fix compatibility with SF6 * Fixed ci * Update PHP cs fixer * tryign to fix more CI issues * Update psalm baseline * Upgrade to larvel 9
1 parent d58bbbd commit b289dec

File tree

26 files changed

+54
-65
lines changed

26 files changed

+54
-65
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
fail-fast: false
3333
matrix:
3434
package: ${{ fromJson(needs.matrix.outputs.list) }}
35-
php: [ '7.4', '8.0' ]
35+
php: [ '8.0', '8.1' ]
3636
strategy: [ 'highest', 'lowest' ]
3737

3838
steps:

.github/workflows/static.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup PHP
2323
uses: shivammathur/setup-php@v2
2424
with:
25-
php-version: 7.4
25+
php-version: 8.1
2626
coverage: none
2727
tools: phpstan:1.4.6, cs2pr
2828

@@ -50,9 +50,9 @@ jobs:
5050
- name: Setup PHP
5151
uses: shivammathur/setup-php@v2
5252
with:
53-
php-version: 8.0
53+
php-version: 8.1
5454
coverage: none
55-
tools: php-cs-fixer:2.19.0, cs2pr
55+
tools: php-cs-fixer:3.8.0, cs2pr
5656

5757
- name: PHP-CS-Fixer
5858
run: php-cs-fixer fix --dry-run --format=checkstyle | cs2pr
@@ -74,9 +74,9 @@ jobs:
7474
- name: Setup PHP
7575
uses: shivammathur/setup-php@v2
7676
with:
77-
php-version: 8.0
77+
php-version: 8.1
7878
coverage: none
79-
tools: vimeo/psalm:4.8.1
79+
tools: vimeo/psalm:4.23.0
8080

8181
- name: Download dependencies
8282
uses: ramsey/composer-install@v2
@@ -92,7 +92,7 @@ jobs:
9292
- name: Setup PHP
9393
uses: shivammathur/setup-php@v2
9494
with:
95-
php-version: 7.4
95+
php-version: 8.1
9696
coverage: none
9797
tools: composer-normalize
9898

.php_cs renamed to .php-cs-fixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
->in(__DIR__.'/src')
55
;
66

7-
return PhpCsFixer\Config::create()
7+
return (new PhpCsFixer\Config())
88
->setCacheFile(__DIR__.'/.github/.cache/php-cs-fixer/.php_cs.cache')
99
->setRiskyAllowed(true)
1010
->setRules([

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
}
1111
],
1212
"require": {
13+
"php": ">=8.0.5",
1314
"bref/bref": "^1.3",
1415
"clue/arguments": "^2.1",
1516
"guzzlehttp/psr7": "^1.8 || ^2.0",

psalm.baseline.xml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="4.20.0@f82a70e7edfc6cf2705e9374c8a0b6a974a779ed">
3-
<file src="src/bref/src/BrefRunner.php">
4-
<InvalidReturnType occurrences="1">
5-
<code>int</code>
6-
</InvalidReturnType>
7-
</file>
8-
<file src="src/bref/src/ConsoleApplicationRunner.php">
9-
<InvalidReturnType occurrences="1">
10-
<code>int</code>
11-
</InvalidReturnType>
12-
</file>
2+
<files psalm-version="4.22.0@fc2c6ab4d5fa5d644d8617089f012f3bb84b8703">
133
<file src="src/bref/src/SymfonyRequestBridge.php">
144
<InvalidArgument occurrences="1">
155
<code>$response-&gt;headers-&gt;all()</code>
166
</InvalidArgument>
177
</file>
8+
<file src="src/google-cloud/router.php">
9+
<MissingFile occurrences="1">
10+
<code>require_once $_SERVER['SCRIPT_FILENAME'] = $defaultSource</code>
11+
</MissingFile>
12+
</file>
1813
<file src="src/psr-laminas/src/Runtime.php">
1914
<InvalidArgument occurrences="2">
2015
<code>['emitter' =&gt; $this-&gt;options['laminas_emitter'] ?? null]</code>

src/bref/composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,20 @@
1010
}
1111
],
1212
"require": {
13+
"php": ">=8.0.5",
1314
"ext-json": "*",
1415
"ext-sockets": "*",
1516
"clue/arguments": "^2.1",
1617
"psr/http-server-handler": "^1.0",
17-
"riverline/multipart-parser": "^2.0",
18+
"riverline/multipart-parser": "^2.0.9",
1819
"runtime/bref-layer": "^1.3",
19-
"symfony/runtime": "^5.3 || ^6.0"
20+
"symfony/runtime": "^5.4 || ^6.0"
2021
},
2122
"require-dev": {
2223
"bref/bref": "^1.3",
2324
"guzzlehttp/test-server": "^0.1",
2425
"phpunit/phpunit": "^9.5",
25-
"symfony/http-foundation": "^5.3 || ^6.0",
26+
"symfony/http-foundation": "^5.4 || ^6.0",
2627
"symfony/http-kernel": "^5.4 || ^6.0"
2728
},
2829
"minimum-stability": "dev",

src/google-cloud/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=7.2.5",
13+
"php": ">=8.0.5",
1414
"ext-json": "*",
15-
"symfony/runtime": "^5.3 || ^6.0"
15+
"symfony/runtime": "^5.4 || ^6.0"
1616
},
1717
"require-dev": {
1818
"phpunit/phpunit": "^9.5"

src/google-cloud/google/CloudEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public static function fromArray(array $arr)
130130
return new static(...$args);
131131
}
132132

133-
public function jsonSerialize()
133+
public function jsonSerialize(): mixed
134134
{
135135
return [
136136
'id' => $this->id,

src/google-cloud/src/Runtime.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ class Runtime extends GenericRuntime
2828
'time',
2929
];
3030

31-
/**
32-
* @return mixed
33-
*/
34-
protected function getArgument(\ReflectionParameter $parameter, ?string $type)
31+
protected function getArgument(\ReflectionParameter $parameter, ?string $type): mixed
3532
{
3633
if (CloudEvent::class === $type) {
3734
return $this->createCloudEvent();

src/laravel/composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
}
1111
],
1212
"require": {
13+
"php": ">=8.0.5",
1314
"illuminate/contracts": "^8.33",
14-
"symfony/runtime": "^5.3 || ^6.0"
15+
"symfony/runtime": "^5.4 || ^6.0"
1516
},
1617
"require-dev": {
1718
"illuminate/http": "^8.33",
1819
"phpunit/phpunit": "^9.5",
19-
"symfony/console": "^4.4 || ^5.2 || ^6.0"
20+
"symfony/console": "^5.4 || ^6.0"
2021
},
2122
"minimum-stability": "dev",
2223
"prefer-stable": true,

0 commit comments

Comments
 (0)