Allow PHP 8 and fix a test
This commit is contained in:
parent
5de690956f
commit
9755994539
|
|
@ -2,7 +2,7 @@
|
|||
"name": "tobyz/json-api-server",
|
||||
"description": "A fully automated JSON:API server implementation in PHP.",
|
||||
"require": {
|
||||
"php": "^7.2",
|
||||
"php": "^7.2|^8.0",
|
||||
"doctrine/inflector": "^1.3",
|
||||
"json-api-php/json-api": "^2.2",
|
||||
"nyholm/psr7": "^1.3",
|
||||
|
|
@ -31,9 +31,10 @@
|
|||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"dms/phpunit-arraysubset-asserts": "^0.1.0",
|
||||
"dms/phpunit-arraysubset-asserts": "^0.2",
|
||||
"helmich/phpunit-json-assert": "^3.0",
|
||||
"phpunit/phpunit": "^8.0"
|
||||
"phpspec/prophecy-phpunit": "^2.0",
|
||||
"phpunit/phpunit": "^9.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "phpunit"
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ class Index
|
|||
continue;
|
||||
}
|
||||
|
||||
if (isset($filters[$name]) && evaluate($filters[$name]->getVisible(), [$this->context])) {
|
||||
if (isset($filters[$name]) && evaluate($filters[$name]->getVisible(), [$context])) {
|
||||
$filters[$name]->getCallback()($query, $value, $context);
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
namespace Tobyz\Tests\JsonApiServer\feature;
|
||||
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use Tobyz\JsonApiServer\Adapter\AdapterInterface;
|
||||
use Tobyz\JsonApiServer\Exception\ForbiddenException;
|
||||
use Tobyz\JsonApiServer\JsonApi;
|
||||
|
|
@ -21,6 +22,8 @@ use Tobyz\Tests\JsonApiServer\MockAdapter;
|
|||
|
||||
class CreateTest extends AbstractTestCase
|
||||
{
|
||||
use ProphecyTrait;
|
||||
|
||||
/**
|
||||
* @var JsonApi
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Tobyz\Tests\JsonApiServer\feature;
|
||||
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use Tobyz\JsonApiServer\Adapter\AdapterInterface;
|
||||
use Tobyz\JsonApiServer\Exception\ForbiddenException;
|
||||
use Tobyz\JsonApiServer\JsonApi;
|
||||
|
|
@ -22,6 +22,8 @@ use Tobyz\Tests\JsonApiServer\MockAdapter;
|
|||
|
||||
class DeleteTest extends AbstractTestCase
|
||||
{
|
||||
use ProphecyTrait;
|
||||
|
||||
/**
|
||||
* @var JsonApi
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue