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

PHP 8.4 - implicit nulls are deprecated #960

Merged
merged 1 commit into from
Aug 12, 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
12 changes: 5 additions & 7 deletions .github/workflows/4.8.x-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ name: 4.8.x on PHP 8.x
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

push:
branches: ['4.8.x']
paths-ignore:
- '*.md'
- '.github/**'
- 'scripts/**'

pull_request:
branches: ['4.8.x']
paths-ignore:
Expand All @@ -24,12 +24,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
php-version: [8.0, 8.1, 8.2, 8.3]
php-version: [8.0, 8.1, 8.2, 8.3, 8.4]
os: ['ubuntu-latest']
include:
- os: 'ubuntu-latest'
phpunit-version: '9.6.10'
composer-version: 'latest'
composer-version: ['latest']
phpunit-version: ['^9.6.18']
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^v3.35.1",
"phpunit/phpunit": "^9.6",
"phpunit/phpunit": "^9.6.18",
"squizlabs/php_codesniffer": "^3.7",
"phpbench/phpbench": "^1.2",
"phpstan/phpstan": "^1.10"
"phpstan/phpstan": "^1.12.x-dev"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/Cache/CacheException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class CacheException extends \Exception
{
public function __construct($message, $code = 0, \Throwable $previous = null)
public function __construct($message, $code = 0, ?\Throwable $previous = null)
{
// some code

Expand Down
4 changes: 2 additions & 2 deletions src/MobileDetect.php
Original file line number Diff line number Diff line change
Expand Up @@ -1028,11 +1028,11 @@ class MobileDetect
* Construct an instance of this class.
*/
public function __construct(
Cache $cache = null,
?Cache $cache = null,
array $config = [],
) {
// If no custom cache provided then use our own.
$this->cache = $cache == null ? new Cache() : $cache;
$this->cache = $cache ?? new Cache();
// Override config from user.
$this->config = array_merge($this->config, $config);

Expand Down
Loading