Skip to content

Commit dfd9e6c

Browse files
authored
Merge pull request #79 from byjg/5.0
Defining PHP 8.1 as base version
2 parents 2029ffb + 47f4dea commit dfd9e6c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1040
-782
lines changed

.github/workflows/phpunit.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ jobs:
1616
strategy:
1717
matrix:
1818
php-version:
19+
- "8.3"
1920
- "8.2"
2021
- "8.1"
21-
- "8.0"
22-
- "7.4"
2322

2423
steps:
2524
- uses: actions/checkout@v4
@@ -29,6 +28,7 @@ jobs:
2928
SPEC=swagger php -S 127.0.0.1:8080 tests/rest/app.php &
3029
SPEC=openapi php -S 127.0.0.1:8081 tests/rest/app.php &
3130
- run: ./vendor/bin/phpunit
31+
- run: ./vendor/bin/psalm
3232

3333
Documentation:
3434
if: github.ref == 'refs/heads/master'

.idea/runConfigurations/Test_Project.xml .idea/runConfigurations/Main.xml

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Psalm.xml

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.travis.yml

-21
This file was deleted.

composer.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
"prefer-stable": true,
66
"license": "MIT",
77
"require": {
8-
"byjg/webrequest": "4.9.*",
9-
"php": ">=7.4",
10-
"ext-json": "*"
8+
"php": ">=8.1 <8.4",
9+
"ext-json": "*",
10+
"byjg/webrequest": "^5.0"
1111
},
1212
"require-dev": {
13-
"phpunit/phpunit": "5.7.*|7.4.*|^9.5",
14-
"byjg/restserver": "4.9.*"
13+
"phpunit/phpunit": "^9.6",
14+
"byjg/restserver": "^5.0",
15+
"vimeo/psalm": "^5.9"
1516
},
1617
"autoload": {
1718
"psr-4": {
@@ -20,7 +21,7 @@
2021
},
2122
"autoload-dev": {
2223
"psr-4": {
23-
"Test\\": "tests/"
24+
"Tests\\": "tests/"
2425
}
2526
}
2627
}

docs/mock-requests.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class MyTest extends ApiTestCase
1111
{
1212
public function testExpectOK()
1313
{
14-
$expectedResponse = \ByJG\Util\Psr7\Response::getInstance(200)
15-
->withBody(new \ByJG\Util\Psr7\MemoryStream(json_encode([
14+
$expectedResponse = \ByJG\WebRequest\Psr7\Response::getInstance(200)
15+
->withBody(new \ByJG\WebRequest\Psr7\MemoryStream(json_encode([
1616
"id" => 1,
1717
"name" => "Spike",
1818
"photoUrls" => []
@@ -39,7 +39,7 @@ e.g.
3939
```php
4040
<?php
4141

42-
$psr7Request = \ByJG\Util\Psr7\Request::getInstance(new Uri("/method_to_be_tested?param1=value1"))
42+
$psr7Request = \ByJG\WebRequest\Psr7\Request::getInstance(new Uri("/method_to_be_tested?param1=value1"))
4343
->withMethod("GET")
4444
->withBody('{"foo":"bar"}');
4545

psalm.xml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0"?>
2+
<psalm
3+
errorLevel="4"
4+
resolveFromConfigFile="true"
5+
findUnusedBaselineEntry="true"
6+
findUnusedCode="false"
7+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8+
xmlns="https://getpsalm.org/schema/config"
9+
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
10+
>
11+
<projectFiles>
12+
<directory name="src" />
13+
<directory name="tests" />
14+
<ignoreFiles>
15+
<directory name="vendor" />
16+
</ignoreFiles>
17+
</projectFiles>
18+
</psalm>

0 commit comments

Comments
 (0)