Skip to content

Commit

Permalink
Merge pull request #79 from byjg/5.0
Browse files Browse the repository at this point in the history
Defining PHP 8.1 as base version
  • Loading branch information
byjg authored Oct 27, 2024
2 parents 2029ffb + 47f4dea commit dfd9e6c
Show file tree
Hide file tree
Showing 45 changed files with 1,040 additions and 782 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ jobs:
strategy:
matrix:
php-version:
- "8.3"
- "8.2"
- "8.1"
- "8.0"
- "7.4"

steps:
- uses: actions/checkout@v4
Expand All @@ -29,6 +28,7 @@ jobs:
SPEC=swagger php -S 127.0.0.1:8080 tests/rest/app.php &
SPEC=openapi php -S 127.0.0.1:8081 tests/rest/app.php &
- run: ./vendor/bin/phpunit
- run: ./vendor/bin/psalm

Documentation:
if: github.ref == 'refs/heads/master'
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/runConfigurations/Psalm.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
"prefer-stable": true,
"license": "MIT",
"require": {
"byjg/webrequest": "4.9.*",
"php": ">=7.4",
"ext-json": "*"
"php": ">=8.1 <8.4",
"ext-json": "*",
"byjg/webrequest": "^5.0"
},
"require-dev": {
"phpunit/phpunit": "5.7.*|7.4.*|^9.5",
"byjg/restserver": "4.9.*"
"phpunit/phpunit": "^9.6",
"byjg/restserver": "^5.0",
"vimeo/psalm": "^5.9"
},
"autoload": {
"psr-4": {
Expand All @@ -20,7 +21,7 @@
},
"autoload-dev": {
"psr-4": {
"Test\\": "tests/"
"Tests\\": "tests/"
}
}
}
6 changes: 3 additions & 3 deletions docs/mock-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class MyTest extends ApiTestCase
{
public function testExpectOK()
{
$expectedResponse = \ByJG\Util\Psr7\Response::getInstance(200)
->withBody(new \ByJG\Util\Psr7\MemoryStream(json_encode([
$expectedResponse = \ByJG\WebRequest\Psr7\Response::getInstance(200)
->withBody(new \ByJG\WebRequest\Psr7\MemoryStream(json_encode([
"id" => 1,
"name" => "Spike",
"photoUrls" => []
Expand All @@ -39,7 +39,7 @@ e.g.
```php
<?php

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

Expand Down
18 changes: 18 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<psalm
errorLevel="4"
resolveFromConfigFile="true"
findUnusedBaselineEntry="true"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="src" />
<directory name="tests" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
</psalm>
Loading

0 comments on commit dfd9e6c

Please sign in to comment.