Skip to content

Commit 9878719

Browse files
authored
Fix random CS stuff so CI passes (#112)
* Fixed CS * More fixes * Normalize composer * baseline * etter baseline * Fixed typo
1 parent 67601e7 commit 9878719

File tree

19 files changed

+81
-76
lines changed

19 files changed

+81
-76
lines changed

.github/workflows/static.yml

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

2929
- name: Download dependencies
3030
uses: ramsey/composer-install@v1

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "runtime/runtime",
3-
"type": "library",
43
"description": "Includes all runtimes",
54
"license": "MIT",
5+
"type": "library",
66
"authors": [
77
{
88
"name": "Tobias Nyholm",
@@ -32,6 +32,8 @@
3232
"illuminate/http": "^8.33",
3333
"swoole/ide-helper": "^4.8"
3434
},
35+
"minimum-stability": "dev",
36+
"prefer-stable": true,
3537
"autoload": {
3638
"psr-4": {
3739
"Runtime\\Bref\\": "src/bref/src",
@@ -53,7 +55,5 @@
5355
"psr-4": {
5456
"Swoole\\": "vendor/swoole/ide-helper/src/swoole/Swoole"
5557
}
56-
},
57-
"minimum-stability": "dev",
58-
"prefer-stable": true
58+
}
5959
}

phpstan-baseline.neon

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: "#^While loop condition is always true\\.$#"
5+
count: 1
6+
path: src/bref/src/ConsoleApplicationRunner.php
7+
8+
-
9+
message: "#CurlHandle#"
10+
count: 2
11+
path: src/bref/src/Lambda/LambdaClient.php

phpstan.neon.dist

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
includes:
2+
- ./phpstan-baseline.neon
3+
14
parameters:
25
level: 5
36
reportUnmatchedIgnoredErrors: false
47
paths:
58
- src
69
tmpDir: .github/.cache/phpstan/
710

8-
excludes_analyse:
11+
excludePaths:
912
- src/*/tests/*
1013
- src/*/vendor/*

psalm.baseline.xml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="4.8.1@f73f2299dbc59a3e6c4d66cff4605176e728ee69">
2+
<files psalm-version="4.20.0@f82a70e7edfc6cf2705e9374c8a0b6a974a779ed">
33
<file src="src/bref/src/BrefRunner.php">
4-
<InternalClass occurrences="1">
5-
<code>LambdaRuntime::fromEnvironmentVariable('symfony-runtime')</code>
6-
</InternalClass>
7-
<InternalMethod occurrences="2">
8-
<code>LambdaRuntime::fromEnvironmentVariable('symfony-runtime')</code>
9-
<code>processNextEvent</code>
10-
</InternalMethod>
114
<InvalidReturnType occurrences="1">
125
<code>int</code>
136
</InvalidReturnType>
147
</file>
158
<file src="src/bref/src/ConsoleApplicationRunner.php">
16-
<InternalClass occurrences="1">
17-
<code>LambdaRuntime::fromEnvironmentVariable('symfony-runtime-console')</code>
18-
</InternalClass>
19-
<InternalMethod occurrences="2">
20-
<code>LambdaRuntime::fromEnvironmentVariable('symfony-runtime-console')</code>
21-
<code>processNextEvent</code>
22-
</InternalMethod>
239
<InvalidReturnType occurrences="1">
2410
<code>int</code>
2511
</InvalidReturnType>
2612
</file>
13+
<file src="src/bref/src/SymfonyRequestBridge.php">
14+
<InvalidArgument occurrences="1">
15+
<code>$response-&gt;headers-&gt;all()</code>
16+
</InvalidArgument>
17+
</file>
2718
<file src="src/psr-laminas/src/Runtime.php">
2819
<InvalidArgument occurrences="2">
2920
<code>['emitter' =&gt; $this-&gt;options['laminas_emitter'] ?? null]</code>

src/bref/composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "runtime/bref",
3-
"type": "library",
43
"description": "Bref runtime",
54
"license": "MIT",
5+
"type": "library",
66
"authors": [
77
{
88
"name": "Tobias Nyholm",
@@ -25,6 +25,8 @@
2525
"symfony/http-kernel": "^5.4 || ^6.0",
2626
"symfony/phpunit-bridge": "^5.3"
2727
},
28+
"minimum-stability": "dev",
29+
"prefer-stable": true,
2830
"autoload": {
2931
"psr-4": {
3032
"Runtime\\Bref\\": "src/"
@@ -38,8 +40,6 @@
3840
"Runtime\\Bref\\Tests\\": "tests/"
3941
}
4042
},
41-
"minimum-stability": "dev",
42-
"prefer-stable": true,
4343
"bin": [
4444
"bin/bref-local-handler.php"
4545
]

src/google-cloud/composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "runtime/google-cloud",
3-
"type": "library",
43
"description": "Google Cloud runtime",
54
"license": "MIT",
5+
"type": "library",
66
"authors": [
77
{
88
"name": "Tobias Nyholm",
@@ -17,6 +17,8 @@
1717
"require-dev": {
1818
"symfony/phpunit-bridge": "^5.3"
1919
},
20+
"minimum-stability": "dev",
21+
"prefer-stable": true,
2022
"autoload": {
2123
"psr-4": {
2224
"Runtime\\GoogleCloud\\": "src/",
@@ -30,8 +32,6 @@
3032
"Google\\CloudFunctions\\Tests\\": "tests/google/"
3133
}
3234
},
33-
"minimum-stability": "dev",
34-
"prefer-stable": true,
3535
"bin": [
3636
"router.php"
3737
]

src/laravel/composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "runtime/laravel",
3-
"type": "library",
43
"description": "Laravel runtime",
54
"license": "MIT",
5+
"type": "library",
66
"authors": [
77
{
88
"name": "Tobias Nyholm",
@@ -18,6 +18,8 @@
1818
"symfony/console": "^4.4 || ^5.2 || ^6.0",
1919
"symfony/phpunit-bridge": "^5.3"
2020
},
21+
"minimum-stability": "dev",
22+
"prefer-stable": true,
2123
"autoload": {
2224
"psr-4": {
2325
"Runtime\\Laravel\\": "src/",
@@ -28,7 +30,5 @@
2830
"psr-4": {
2931
"Runtime\\Laravel\\Tests\\": "tests/"
3032
}
31-
},
32-
"minimum-stability": "dev",
33-
"prefer-stable": true
33+
}
3434
}

src/psr-17/composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "runtime/psr-17",
3-
"type": "library",
43
"description": "PSR runtime with support for any PSR-17 implementation",
54
"license": "MIT",
5+
"type": "library",
66
"authors": [
77
{
88
"name": "Tobias Nyholm",
@@ -19,6 +19,8 @@
1919
"nyholm/psr7": "^1.4",
2020
"symfony/phpunit-bridge": "^5.3"
2121
},
22+
"minimum-stability": "dev",
23+
"prefer-stable": true,
2224
"autoload": {
2325
"psr-4": {
2426
"Runtime\\Psr17\\": "src/",
@@ -29,7 +31,5 @@
2931
"psr-4": {
3032
"Runtime\\Psr17\\Tests\\": "tests/"
3133
}
32-
},
33-
"minimum-stability": "dev",
34-
"prefer-stable": true
34+
}
3535
}

src/psr-guzzle/composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "runtime/psr-guzzle",
3-
"type": "library",
43
"description": "PSR runtime with guzzlehttp/psr7 ",
54
"license": "MIT",
5+
"type": "library",
66
"authors": [
77
{
88
"name": "Tobias Nyholm",
@@ -17,6 +17,8 @@
1717
"require-dev": {
1818
"symfony/phpunit-bridge": "^5.3"
1919
},
20+
"minimum-stability": "dev",
21+
"prefer-stable": true,
2022
"autoload": {
2123
"psr-4": {
2224
"Runtime\\PsrGuzzle\\": "src/",
@@ -27,7 +29,5 @@
2729
"psr-4": {
2830
"Runtime\\PsrGuzzle\\Tests\\": "tests/"
2931
}
30-
},
31-
"minimum-stability": "dev",
32-
"prefer-stable": true
32+
}
3333
}

0 commit comments

Comments
 (0)