Skip to content

Commit

Permalink
ci: Remove unsupported PHP versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaumgartl committed Sep 24, 2024
1 parent d0ac454 commit 4818e1c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: 'ubuntu-latest'
strategy:
matrix:
php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
php-versions: ['8.2', '8.3']
phpunit-versions: ['latest']
steps:
- name: Checkout
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,12 @@
},
"prefer-stable": true,
"require": {
"php": "^7.3 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0",
"ext-json": "*",
"php": "~8.2.0 || ~8.3.0",
"guzzlehttp/guzzle": "^7.4"
},
"require-dev": {
"http-interop/http-factory-guzzle": "^1.0",
"phpunit/phpunit": "^9.0 || ^10.5"
"phpunit/phpunit": "^11.3.0"
},
"archive": {
"exclude": [".github/", "tests/", "phpunit.xml.dist"]
Expand Down
6 changes: 3 additions & 3 deletions tests/ExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
use Flora\Exception\UnauthorizedException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\{Request};
use PHPUnit\Framework\TestCase;
use PHPUnit;
use Psr\Http\Message\ResponseInterface;

class ExceptionTest extends TestCase
class ExceptionTest extends PHPUnit\Framework\TestCase
{
/**
* @param string $exceptionClass
* @param string $message
* @param ResponseInterface $response
* @dataProvider requestExceptionDataProvider
*/
#[PHPUnit\Framework\Attributes\DataProvider('requestExceptionDataProvider')]
public function testRequestExceptions(string $exceptionClass, string $message, ResponseInterface $response): void
{
$this->expectException($exceptionClass);
Expand Down
9 changes: 4 additions & 5 deletions tests/ParameterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@

use Flora\ApiRequestFactory;
use GuzzleHttp\Psr7\Uri;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use PHPUnit;
use Psr\Http\Message\RequestInterface;
use Flora\AuthProviderInterface;
use Psr\Http\Message\UriInterface;

class ParameterTest extends TestCase
class ParameterTest extends PHPUnit\Framework\TestCase
{
/** @var UriInterface */
private $uri;
Expand All @@ -22,11 +21,11 @@ public function setUp(): void
}

/**
* @dataProvider parameters
* @param string $name Parameter name
* @param string|int $value Parameter value
* @param string $encoded URL-encoded parameter value
*/
#[PHPUnit\Framework\Attributes\DataProvider('parameters')]
public function testRequestParameter($name, $value, $encoded): void
{
$request = (new ApiRequestFactory($this->uri))->create(['resource' => 'user', $name => $value]);
Expand Down Expand Up @@ -107,7 +106,7 @@ public function testParameterOrder(): void

public function testAuthorizeParameter(): void
{
/** @var MockObject|AuthProviderInterface $authProviderMock */
/** @var PHPUnit\Framework\MockObject\MockObject|AuthProviderInterface $authProviderMock */
$authProviderMock = $this->getMockBuilder(AuthProviderInterface::class)
->disableOriginalConstructor()
->onlyMethods(['auth'])
Expand Down
10 changes: 3 additions & 7 deletions tests/RequestMethodTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

use Flora\ApiRequestFactory;
use GuzzleHttp\Psr7\Uri;
use PHPUnit\Framework\TestCase;
use PHPUnit;
use Psr\Http\Message\UriInterface;

class RequestMethodTest extends TestCase
class RequestMethodTest extends PHPUnit\Framework\TestCase
{
/** @var UriInterface */
private $uri;
Expand All @@ -18,11 +18,7 @@ public function setUp(): void
$this->uri = new Uri('http://api.example.com');
}

/**
* @param array $params
* @param string $message
* @dataProvider defaultHttpMethodDataProvider
*/
#[PHPUnit\Framework\Attributes\DataProvider('defaultHttpMethodDataProvider')]
public function testHttpGetMethod(array $params, string $message): void
{
$request = (new ApiRequestFactory($this->uri))->create($params);
Expand Down

0 comments on commit 4818e1c

Please sign in to comment.