Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PHP 8.4 nightly to tests #1051

Merged
merged 5 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
php: ["8.1", "8.2", "8.3"]
php: ["8.1", "8.2", "8.3", "8.4"]
stability: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
Expand Down
12 changes: 6 additions & 6 deletions src/Protocols/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function __construct(protected string $buffer) {}
* @param mixed $default
* @return mixed
*/
public function get(string $name = null, mixed $default = null): mixed
public function get(?string $name = null, mixed $default = null): mixed
{
if (!isset($this->data['get'])) {
$this->parseGet();
Expand All @@ -137,7 +137,7 @@ public function get(string $name = null, mixed $default = null): mixed
* @param mixed $default
* @return mixed
*/
public function post(string $name = null, mixed $default = null): mixed
public function post(?string $name = null, mixed $default = null): mixed
{
if (!isset($this->data['post'])) {
$this->parsePost();
Expand All @@ -155,7 +155,7 @@ public function post(string $name = null, mixed $default = null): mixed
* @param mixed $default
* @return mixed
*/
public function header(string $name = null, mixed $default = null): mixed
public function header(?string $name = null, mixed $default = null): mixed
{
if (!isset($this->data['headers'])) {
$this->parseHeaders();
Expand All @@ -174,7 +174,7 @@ public function header(string $name = null, mixed $default = null): mixed
* @param mixed $default
* @return mixed
*/
public function cookie(string $name = null, mixed $default = null): mixed
public function cookie(?string $name = null, mixed $default = null): mixed
{
if (!isset($this->data['cookie'])) {
$this->data['cookie'] = [];
Expand All @@ -192,7 +192,7 @@ public function cookie(string $name = null, mixed $default = null): mixed
* @param string|null $name
* @return array|null
*/
public function file(string $name = null)
public function file(?string $name = null)
{
if (!isset($this->data['files'])) {
$this->parsePost();
Expand Down Expand Up @@ -295,7 +295,7 @@ public function session(): Session
* @return string
* @throws Exception
*/
public function sessionId(string $sessionId = null): string
public function sessionId(?string $sessionId = null): string
{
if ($sessionId) {
unset($this->sid);
Expand Down
2 changes: 1 addition & 1 deletion src/Protocols/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public function getHeaders(): array
* @param string|null $reasonPhrase
* @return $this
*/
public function withStatus(int $code, string $reasonPhrase = null): static
public function withStatus(int $code, ?string $reasonPhrase = null): static
{
$this->status = $code;
$this->reason = $reasonPhrase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Pest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function something()
// ..
}

function testWithConnectionClose(Closure $closure, string $dataContains = null, $connectionClass = TcpConnection::class): void
function testWithConnectionClose(Closure $closure, ?string $dataContains = null, $connectionClass = TcpConnection::class): void
{
$tcpConnection = Mockery::spy($connectionClass);
$closure($tcpConnection);
Expand Down
Loading