Skip to content

Commit 227c805

Browse files
authored
Support PHP 8.5 (#171)
PHP 8.3 -> PHP 8.4: * Function parameters that are null by default must be declared nullable. PHP 8.4 -> PHP 8.5: * Using null as an array offset is deprecated; use empty string instead.
2 parents 90450a5 + 8a3f3c1 commit 227c805

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

application/forms/DimensionsForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function assemble()
7979
$allDimensions = $this->cube->listAdditionalDimensions();
8080

8181
$this->addElement('select', 'addDimension', [
82-
'options' => [null => $this->translate('+ Add a dimension')] + $allDimensions,
82+
'options' => ['' => $this->translate('+ Add a dimension')] + $allDimensions,
8383
'class' => 'autosubmit'
8484
]);
8585
}

library/Cube/Cube.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,10 +327,10 @@ public function listColumns()
327327

328328
/**
329329
* @param View $view
330-
* @param CubeRenderer $renderer
330+
* @param ?CubeRenderer $renderer
331331
* @return string
332332
*/
333-
public function render(View $view, CubeRenderer $renderer = null)
333+
public function render(View $view, ?CubeRenderer $renderer = null)
334334
{
335335
if ($renderer === null) {
336336
$renderer = $this->getRenderer();

library/Cube/Hook/IcingaDbActionsHook.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ final protected function addActionLink(Url $url, string $title, string $descript
7171
* Helper method instantiating an Url object
7272
*
7373
* @param string $path
74-
* @param array $params
74+
* @param ?array $params
7575
* @return Url
7676
*/
77-
final protected function makeUrl(string $path, array $params = null): Url
77+
final protected function makeUrl(string $path, ?array $params = null): Url
7878
{
7979
$url = Url::fromPath($path);
8080
if ($params !== null) {

library/Cube/Ido/DataView/Hoststatus.php

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

1010
class Hoststatus extends \Icinga\Module\Monitoring\DataView\Hoststatus
1111
{
12-
public function __construct(ConnectionInterface $connection, array $columns = null)
12+
public function __construct(ConnectionInterface $connection, ?array $columns = null)
1313
{
1414
$this->connection = $connection;
1515
$this->query = new HoststatusQuery($connection->getResource(), $columns);

0 commit comments

Comments
 (0)