Support PHP 8.5 (#343)
Some checks failed
L10n Update / update (push) Has been cancelled
CI / PHP (push) Has been cancelled

PHP 8.4:

- Function parameters that are null by default must be declared nullable.

No further changes are required to support PHP 8.5.
This commit is contained in:
Eric Lippmann 2026-01-09 13:16:40 +01:00 committed by GitHub
commit 5f6714b3e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View file

@ -62,7 +62,7 @@ class MetricsQuery implements Queryable, Filterable, Fetchable
$this->dataSource = $dataSource;
}
public function from($target, array $fields = null)
public function from($target, ?array $fields = null)
{
if ($fields !== null) {
throw new InvalidArgumentException('Fields are not applicable to this kind of query');

View file

@ -41,7 +41,7 @@ final class TimeRangePickerTools
*
* @return UrlParams The copy
*/
public static function copyAllRangeParameters(UrlParams $copy = null, UrlParams $origin = null)
public static function copyAllRangeParameters(?UrlParams $copy = null, ?UrlParams $origin = null)
{
if ($origin === null) {
$origin = Url::fromRequest()->getParams();

View file

@ -23,11 +23,11 @@ trait TimeRangePickerTrait
/**
* Process the given request using the forms
*
* @param Request $request The request to be processed
* @param ?Request $request The request to be processed
*
* @return Request The request supposed to be processed
*/
protected function handleTimeRangePickerRequest(Request $request = null)
protected function handleTimeRangePickerRequest(?Request $request = null)
{
$this->getTimeRangePickerCommonForm()->handleRequest($request);
return $this->getTimeRangePickerCustomForm()->handleRequest($request);

View file

@ -204,11 +204,11 @@ abstract class Graphs extends AbstractWidget
/**
* Process the given request using this widget
*
* @param Request $request The request to be processed
* @param ?Request $request The request to be processed
*
* @return $this
*/
public function handleRequest(Request $request = null)
public function handleRequest(?Request $request = null)
{
if ($request === null) {
$request = Icinga::app()->getRequest();