Skip to content

Commit 03058d7

Browse files
committed
PHP 8.4 support
1 parent 7f9f1c7 commit 03058d7

File tree

14 files changed

+192
-194
lines changed

14 files changed

+192
-194
lines changed

app/controller/api.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ abstract class Api extends \Controller
99
public function __construct()
1010
{
1111
$f3 = \Base::instance();
12-
$f3->set("ONERROR", function (\Base $f3) {
12+
$f3->set("ONERROR", function (\Base $f3): void {
1313
if (!headers_sent()) {
1414
header("Content-type: application/json");
1515
}

app/controller/issues.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ public function single_related($f3, $params)
10051005
$orderParams = ["order" => "status_closed, priority DESC, due_date"];
10061006
$f3->set("issues", $issues->find($searchParams, $orderParams));
10071007

1008-
$searchParams[0] = $searchParams[0] . " AND status_closed = 0";
1008+
$searchParams[0] .= " AND status_closed = 0";
10091009
$openIssues = $issues->count($searchParams);
10101010

10111011
$this->_printJson([

app/controller/issues/project.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function overview($f3, $params)
5757
* @param int $level
5858
* @var callable $renderTree This function, required for recursive calls
5959
*/
60-
$renderTree = function (\Model\Issue &$issue, $level = 0) use ($parentMap, &$renderTree) {
60+
$renderTree = function (\Model\Issue &$issue, $level = 0) use ($parentMap, &$renderTree): void {
6161
if ($issue->id) {
6262
$f3 = \Base::instance();
6363
$children = $parentMap[$issue->id] ?? [];

app/helper/dashboard.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public function issue_tree()
261261
* @param array $issue
262262
* @var callable $renderTree This function, required for recursive calls
263263
*/
264-
$renderTree = function (&$issue, $level = 0) use (&$renderTree) {
264+
$renderTree = function (&$issue, $level = 0) use (&$renderTree): void {
265265
if (!empty($issue['id'])) {
266266
$f3 = \Base::instance();
267267
$hive = ["issue" => $issue, "dict" => $f3->get("dict"), "BASE" => $f3->get("BASE"), "level" => $level, "issue_type" => $f3->get("issue_type")];

app/helper/view.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function parseText($str, $options = [], $ttl = null)
2828
if ($options === null) {
2929
$options = [];
3030
}
31-
$options = $options + \Base::instance()->get("parse");
31+
$options += \Base::instance()->get("parse");
3232

3333
// Check for cached value if $ttl is set
3434
$cache = \Cache::instance();

app/model/config.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static function importAll()
5454

5555
// Import existing config
5656
$ini = parse_ini_file($root . "/config.ini");
57-
$ini = $ini + parse_ini_file($root . "/config-base.ini");
57+
$ini += parse_ini_file($root . "/config-base.ini");
5858
foreach ($ini as $key => $val) {
5959
if (substr($key, 0, 3) == "db.") {
6060
continue;

app/model/issue.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ public function descendantIds(): array
571571
$ids = [$this->id];
572572
foreach ($this->getChildren() as $child) {
573573
$ids[] = $child->id;
574-
$ids = $ids + $child->descendantIds();
574+
$ids += $child->descendantIds();
575575
}
576576
return array_unique($ids);
577577
}

app/view/admin/index.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h4>{{ @dict.database }}</h4>
4242
<b>{{ @dict.username }}:</b> {{ @db.user | esc }}<br>
4343
<b>{{ @dict.password }}:</b> ********<br>
4444
<b>{{ @dict.current_version }}:</b> {{@version}}<br>
45-
<b>MySQL version:</b> {{ @db.instance->getAttribute(\PDO::ATTR_SERVER_VERSION) }}
45+
<b>MySQL:</b> {{ @db.instance->getAttribute(\PDO::ATTR_SERVER_VERSION) }}
4646
</div>
4747
<div class="col-md-3 col-sm-6">
4848
<div class="clearfix">
@@ -84,6 +84,7 @@ <h4>{{ @dict.incoming_mail }}</h4>
8484
<div class="col-md-3 col-sm-6">
8585
<h4>{{ @dict.miscellaneous }}</h4>
8686
<p>
87+
<b>PHP:</b> {{ phpversion() }}<br>
8788
<b>{{ @dict.debug_level }}:</b> {{ @DEBUG }}<br>
8889
<b>{{ @dict.session_lifetime }}:</b> {{ gmdate("z\\d G\\h", @JAR.expire) }}<br>
8990
<b>{{ @dict.max_upload_size }}:</b> {{ round(@files.maxsize/1024/1024, 2) }}MB

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
},
2525
"require-dev": {
2626
"squizlabs/php_codesniffer": "3.*",
27-
"rector/rector": "^0.15"
27+
"rector/rector": "^2.0"
2828
}
2929
}

0 commit comments

Comments
 (0)