From 6ba609e09b51517816da205fbc18b21656fded84 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 23 May 2023 17:24:39 +0200 Subject: [PATCH 1/2] [7.0] Bump to PHP 8.2 minimum --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c08fdc2..a753a1a 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ } ], "require": { - "php": ">=8.1" + "php": ">=8.2" }, "autoload": { "psr-4": { "Symfony\\Component\\CssSelector\\": "" }, From c9ffa750679e233b084a2a0f3d02b7f9c1d53d08 Mon Sep 17 00:00:00 2001 From: Wouter de Jong Date: Sun, 2 Jul 2023 23:52:21 +0200 Subject: [PATCH 2/2] [Components] Convert to native return types --- Parser/Reader.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Parser/Reader.php b/Parser/Reader.php index 7f6ae7a..a280a48 100644 --- a/Parser/Reader.php +++ b/Parser/Reader.php @@ -53,10 +53,7 @@ public function getSubstring(int $length, int $offset = 0): string return substr($this->source, $this->position + $offset, $length); } - /** - * @return int|false - */ - public function getOffset(string $string): int|bool + public function getOffset(string $string): int|false { $position = strpos($this->source, $string, $this->position);