Skip to content

Commit

Permalink
Add PHP 8.4 (alpha build) tests support
Browse files Browse the repository at this point in the history
  • Loading branch information
SerafimArts committed Jul 28, 2024
1 parent 6e3e4da commit 8d88751
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ErrorInformationRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
namespace Phplrt\Exception;

use Phplrt\Contracts\Lexer\TokenInterface;
use Phplrt\Contracts\Position\PositionInterface;
use Phplrt\Contracts\Source\ReadableInterface;
use Phplrt\Position\Position;
use Phplrt\Contracts\Position\PositionInterface;

class ErrorInformationRenderer
{
Expand Down
1 change: 0 additions & 1 deletion src/LineReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public function readLine(int $line): string
/**
* @param int<1, max> $from
* @param int<1, max> $to
*
* @return iterable<int<1, max>, string>
*/
public function readLines(int $from, int $to): iterable
Expand Down
7 changes: 5 additions & 2 deletions src/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

use Phplrt\Contracts\Exception\RuntimeExceptionInterface;
use Phplrt\Contracts\Lexer\TokenInterface;
use Phplrt\Contracts\Position\PositionInterface;
use Phplrt\Contracts\Source\FileInterface;
use Phplrt\Contracts\Source\ReadableInterface;
use Phplrt\Position\Position;
use Phplrt\Contracts\Position\PositionInterface;
use Phplrt\Source\File;

abstract class RuntimeException extends \RuntimeException implements RuntimeExceptionInterface
Expand All @@ -20,7 +20,10 @@ abstract class RuntimeException extends \RuntimeException implements RuntimeExce

private string $original;

public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null)
/**
* @param \Throwable|null $previous
*/
public function __construct(string $message = '', int $code = 0, \Throwable $previous = null)
{
$this->original = $message;

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/LineReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function dataProvider(): array
}

return [
'\n' => [self::create($lines, "\n"), self::MAX_LINES_PER_TEST],
'\n' => [self::create($lines, "\n"), self::MAX_LINES_PER_TEST],
'\r\n' => [self::create($lines, "\r\n"), self::MAX_LINES_PER_TEST],
];
}
Expand Down

0 comments on commit 8d88751

Please sign in to comment.