Skip to content

Commit 73babba

Browse files
authored
feat: added laravel 12, fixed warning that nullable parameter is deprecated (#6)
2 parents 38a526c + ba47294 commit 73babba

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
],
1212
"require": {
1313
"php": "8.1.*|8.2.*|8.3.*|8.4.*",
14-
"illuminate/container": "^10.0|^11.0"
14+
"illuminate/container": "^10.0|^11.0|^12.0"
1515
},
1616
"require-dev": {
1717
"laravel/pint": "^1.19",
1818
"mockery/mockery": "^1.5",
19-
"phpunit/phpunit": "^9.6",
19+
"phpunit/phpunit": "^9.6|^10.5|^11.5",
2020
"roave/security-advisories": "dev-latest",
21-
"vimeo/psalm": "^5.26"
21+
"vimeo/psalm": "^5.26|^6.0"
2222
},
2323
"autoload": {
2424
"psr-4": {

src/DTO/JsonRpcResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class JsonRpcResponse implements JsonRpcInterface, Arrayable, Jsonable, \J
2929
public mixed $result;
3030
public ?JsonRpcError $error;
3131

32-
public function __construct(string|int|null $id = null, mixed $result = null, JsonRpcError $error = null)
32+
public function __construct(string|int|null $id = null, mixed $result = null, ?JsonRpcError $error = null)
3333
{
3434
$this->id = $id ?? self::ID_EMPTY;
3535
$this->result = $result;

src/Exceptions/InternalErrorException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
class InternalErrorException extends JsonRpcException
1111
{
12-
public function __construct(?string $message = null, InternalError $error = null, ?\Throwable $previous = null)
12+
public function __construct(?string $message = null, ?InternalError $error = null, ?\Throwable $previous = null)
1313
{
1414
parent::__construct(self::CODE_INTERNAL_ERROR, $message, $error, $previous);
1515
}

src/Exceptions/JsonRpcException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class JsonRpcException extends \RuntimeException implements JsonRpcExceptionInte
4040

4141
public function __construct(
4242
int $code,
43-
string $message = null,
43+
string|null $message = null,
4444
array|object|null $data = null,
4545
?\Throwable $previous = null,
4646
) {

0 commit comments

Comments
 (0)