Skip to content

Commit

Permalink
Merge branch 'master' into fix/port-as-string
Browse files Browse the repository at this point in the history
  • Loading branch information
akrabat authored Jun 8, 2024
2 parents 655fd1f + 3a1dd1d commit 132ae65
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.0, 8.1, 8.2]
php: [8.0, 8.1, 8.2, 8.3]
experimental: [false]
include:
- php: 8.2
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@
"psr/http-factory": "^1.0",
"psr/http-message": "^1.0 || ^2.0",
"ralouphie/getallheaders": "^3.0",
"symfony/polyfill-php80": "^1.28"
"symfony/polyfill-php80": "^1.29"
},
"require-dev": {
"ext-json": "*",
"adriansuter/php-autoload-override": "^1.4",
"http-interop/http-factory-tests": "^0.9.0",
"http-interop/http-factory-tests": "^1.1.0",
"php-http/psr7-integration-tests": "1.3.0",
"phpspec/prophecy": "^1.17",
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/phpstan": "^1.10",
"phpspec/prophecy": "^1.19",
"phpspec/prophecy-phpunit": "^2.2",
"phpstan/phpstan": "^1.11",
"phpunit/phpunit": "^9.6",
"squizlabs/php_codesniffer": "^3.7"
"squizlabs/php_codesniffer": "^3.10"
},
"provide": {
"psr/http-message-implementation": "^1.0 || ^2.0",
Expand Down
3 changes: 2 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
parameters:
level: max
checkMissingIterableValueType: false
ignoreErrors:
- identifier: missingType.iterableValue
paths:
- src
4 changes: 2 additions & 2 deletions src/Factory/StreamFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function createStream(string $content = ''): StreamInterface
public function createStreamFromFile(
string $filename,
string $mode = 'r',
StreamInterface $cache = null
?StreamInterface $cache = null
): StreamInterface {
set_error_handler(
static function (int $errno, string $errstr) use ($filename, $mode): void {
Expand Down Expand Up @@ -82,7 +82,7 @@ static function (int $errno, string $errstr) use ($filename, $mode): void {
/**
* {@inheritdoc}
*/
public function createStreamFromResource($resource, StreamInterface $cache = null): StreamInterface
public function createStreamFromResource($resource, ?StreamInterface $cache = null): StreamInterface
{
if (!is_resource($resource)) {
throw new InvalidArgumentException(
Expand Down
1 change: 0 additions & 1 deletion src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ public function getQueryParams(): array
// Decode URL data
parse_str($this->uri->getQuery(), $this->queryParams);

// @phpstan-ignore-next-line
return is_array($this->queryParams) ? $this->queryParams : [];
}

Expand Down
2 changes: 1 addition & 1 deletion src/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public function read($length): string
{
$data = false;

if ($this->isReadable() && $this->stream && $length >= 0) {
if ($this->isReadable() && $this->stream && $length > 0) {
$data = fread($this->stream, $length);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}
],
Message::class => [
'header' => function (string $string, bool $replace = true, int $statusCode = null): void {
'header' => function (string $string, bool $replace = true, ?int $statusCode = null): void {
HeaderStack::push(
[
'header' => $string,
Expand Down

0 comments on commit 132ae65

Please sign in to comment.