Skip to content

Commit 8f54bd3

Browse files
authored
PHP 8.4 - implicit nulls are deprecated (#960)
1 parent 9deba9f commit 8f54bd3

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

.github/workflows/4.8.x-test.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ name: 4.8.x on PHP 8.x
44
on:
55
# Allows you to run this workflow manually from the Actions tab
66
workflow_dispatch:
7-
7+
88
push:
99
branches: ['4.8.x']
1010
paths-ignore:
1111
- '*.md'
1212
- '.github/**'
1313
- 'scripts/**'
14-
14+
1515
pull_request:
1616
branches: ['4.8.x']
1717
paths-ignore:
@@ -24,12 +24,10 @@ jobs:
2424
runs-on: ${{ matrix.os }}
2525
strategy:
2626
matrix:
27-
php-version: [8.0, 8.1, 8.2, 8.3]
27+
php-version: [8.0, 8.1, 8.2, 8.3, 8.4]
2828
os: ['ubuntu-latest']
29-
include:
30-
- os: 'ubuntu-latest'
31-
phpunit-version: '9.6.10'
32-
composer-version: 'latest'
29+
composer-version: ['latest']
30+
phpunit-version: ['^9.6.18']
3331
steps:
3432
- name: Checkout
3533
uses: actions/checkout@v3

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
},
2020
"require-dev": {
2121
"friendsofphp/php-cs-fixer": "^v3.35.1",
22-
"phpunit/phpunit": "^9.6",
22+
"phpunit/phpunit": "^9.6.18",
2323
"squizlabs/php_codesniffer": "^3.7",
2424
"phpbench/phpbench": "^1.2",
25-
"phpstan/phpstan": "^1.10"
25+
"phpstan/phpstan": "^1.12.x-dev"
2626
},
2727
"autoload": {
2828
"psr-4": {

src/Cache/CacheException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class CacheException extends \Exception
88
{
9-
public function __construct($message, $code = 0, \Throwable $previous = null)
9+
public function __construct($message, $code = 0, ?\Throwable $previous = null)
1010
{
1111
// some code
1212

src/MobileDetect.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,11 +1028,11 @@ class MobileDetect
10281028
* Construct an instance of this class.
10291029
*/
10301030
public function __construct(
1031-
Cache $cache = null,
1031+
?Cache $cache = null,
10321032
array $config = [],
10331033
) {
10341034
// If no custom cache provided then use our own.
1035-
$this->cache = $cache == null ? new Cache() : $cache;
1035+
$this->cache = $cache ?? new Cache();
10361036
// Override config from user.
10371037
$this->config = array_merge($this->config, $config);
10381038

0 commit comments

Comments
 (0)