From 184cda71910515ef80016b18c98924e242848c67 Mon Sep 17 00:00:00 2001 From: Steven Lewis Date: Fri, 11 Oct 2024 14:02:07 +0100 Subject: [PATCH 1/2] Compatability with php 8.4 Deprecate implicitly nullable parameter types https://wiki.php.net/rfc/deprecate-implicitly-nullable-types --- src/CrawlerDetect.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CrawlerDetect.php b/src/CrawlerDetect.php index b9d9eab..9a047fa 100644 --- a/src/CrawlerDetect.php +++ b/src/CrawlerDetect.php @@ -76,7 +76,7 @@ class CrawlerDetect /** * Class constructor. */ - public function __construct(array $headers = null, $userAgent = null) + public function __construct(?array $headers = null, $userAgent = null) { $this->crawlers = new Crawlers(); $this->exclusions = new Exclusions(); From b1d125ae7c25eb900f827ca6d84542361e823a4d Mon Sep 17 00:00:00 2001 From: Steven Lewis Date: Mon, 21 Oct 2024 08:15:03 +0100 Subject: [PATCH 2/2] Update composer and tests to a minimum of PHP 7.1 --- .github/workflows/test.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b35321d..cf7d78b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: true matrix: - php: [5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4] + php: [7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3, 8.4] name: PHP:${{ matrix.php }} diff --git a/composer.json b/composer.json index 4774117..f2891e4 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ } ], "require": { - "php": ">=5.3.0" + "php": ">=7.1.0" }, "require-dev": { "phpunit/phpunit": "^4.8|^5.5|^6.5|^9.4"