mirror of
https://github.com/Cacti/cacti.git
synced 2026-10-23 03:27:02 +09:00
deps: update Composer tooling and resolve PHPStan 2.3 diagnostics (#8357)
* deps(deps-dev): bump the composer group with 2 updates Bumps the composer group with 2 updates: [phpstan/phpstan](https://github.com/phpstan/phpstan-phar-composer-source) and [rector/rector](https://github.com/rectorphp/rector). Updates `phpstan/phpstan` from 2.2.17 to 2.3.0 - [Commits](https://github.com/phpstan/phpstan-phar-composer-source/commits) Updates `rector/rector` from 2.6.7 to 2.7.0 - [Release notes](https://github.com/rectorphp/rector/releases) - [Commits](https://github.com/rectorphp/rector/compare/2.6.7...2.7.0) --- updated-dependencies: - dependency-name: phpstan/phpstan dependency-version: 2.3.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: composer - dependency-name: rector/rector dependency-version: 2.7.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: composer ... Signed-off-by: dependabot[bot] <support@github.com> * fix: resolve PHPStan 2.3 dependency upgrade diagnostics Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Thomas Vincent <thomasvincent@gmail.com>
This commit is contained in:
1 parent
c226f2a1a5
commit
2be8a7f5fe
6 files changed
+35
-59
No files matched your search
@@ -0,0 +1 @@
|
||||
Resolve PHPStan 2.3 diagnostics while preserving poller cleanup, remote replication, log filtering, and sensor output
|
||||
@@ -594,7 +594,7 @@ if (cacti_sizeof($poller_items) && read_config_option('poller_enabled') == 'on')
|
||||
'POLLER');
|
||||
}
|
||||
|
||||
if ($using_proc_function && $script_server_calls > 0) {
|
||||
if ($using_proc_function) {
|
||||
// close php server process
|
||||
@fwrite($pipes[0], "quit\r\n");
|
||||
fclose($pipes[0]);
|
||||
|
||||
Generated
+11
-11
@@ -6478,11 +6478,11 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "2.2.17",
|
||||
"version": "2.3.1",
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/e676a49fa70cee9f5bf6ff4796186b928a08673f",
|
||||
"reference": "e676a49fa70cee9f5bf6ff4796186b928a08673f",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/6155239b488e95d26d1ebd95c6b4bb294d7f09db",
|
||||
"reference": "6155239b488e95d26d1ebd95c6b4bb294d7f09db",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -6538,7 +6538,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2026-10-04T19:40:09+00:00"
|
||||
"time": "2026-10-08T21:09:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
@@ -7609,21 +7609,21 @@
|
||||
},
|
||||
{
|
||||
"name": "rector/rector",
|
||||
"version": "2.6.7",
|
||||
"version": "2.7.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rectorphp/rector.git",
|
||||
"reference": "f4aa224edb9b0630fb43826d4cb6a49b62e48d4c"
|
||||
"reference": "4d6a39b7fff302cac0ce90cd959a53c2f6a32776"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/rectorphp/rector/zipball/f4aa224edb9b0630fb43826d4cb6a49b62e48d4c",
|
||||
"reference": "f4aa224edb9b0630fb43826d4cb6a49b62e48d4c",
|
||||
"url": "https://api.github.com/repos/rectorphp/rector/zipball/4d6a39b7fff302cac0ce90cd959a53c2f6a32776",
|
||||
"reference": "4d6a39b7fff302cac0ce90cd959a53c2f6a32776",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.4|^8.0",
|
||||
"phpstan/phpstan": "^2.2.14"
|
||||
"phpstan/phpstan": "^2.3.0"
|
||||
},
|
||||
"conflict": {
|
||||
"rector/rector-doctrine": "*",
|
||||
@@ -7654,7 +7654,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/rectorphp/rector/issues",
|
||||
"source": "https://github.com/rectorphp/rector/tree/2.6.7"
|
||||
"source": "https://github.com/rectorphp/rector/tree/2.7.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -7662,7 +7662,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2026-09-13T20:17:44+00:00"
|
||||
"time": "2026-10-06T08:46:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
|
||||
+12
-36
@@ -855,27 +855,21 @@ function api_device_replicate_out(int $device_id, int $poller_id = 1) : bool {
|
||||
WHERE h.id = ?',
|
||||
[$device_id]);
|
||||
|
||||
if ($poller_id > 1) {
|
||||
replicate_table_to_poller($rcnn_id, $data, 'host_snmp_query', $poller_id);
|
||||
}
|
||||
replicate_table_to_poller($rcnn_id, $data, 'host_snmp_query', $poller_id);
|
||||
|
||||
$data = db_fetch_assoc_prepared('SELECT pi.*
|
||||
FROM poller_item AS pi
|
||||
WHERE pi.host_id = ?',
|
||||
[$device_id]);
|
||||
|
||||
if ($poller_id > 1) {
|
||||
replicate_table_to_poller($rcnn_id, $data, 'poller_item', $poller_id);
|
||||
}
|
||||
replicate_table_to_poller($rcnn_id, $data, 'poller_item', $poller_id);
|
||||
|
||||
$data = db_fetch_assoc_prepared('SELECT h.*
|
||||
FROM host AS h
|
||||
WHERE h.id = ?',
|
||||
[$device_id]);
|
||||
|
||||
if ($poller_id > 1) {
|
||||
replicate_table_to_poller($rcnn_id, $data, 'host', $poller_id);
|
||||
}
|
||||
replicate_table_to_poller($rcnn_id, $data, 'host', $poller_id);
|
||||
|
||||
$data = db_fetch_assoc_prepared('SELECT hsc.*
|
||||
FROM host_snmp_cache AS hsc
|
||||
@@ -884,9 +878,7 @@ function api_device_replicate_out(int $device_id, int $poller_id = 1) : bool {
|
||||
WHERE h.id = ?',
|
||||
[$device_id]);
|
||||
|
||||
if ($poller_id > 1) {
|
||||
replicate_table_to_poller($rcnn_id, $data, 'host_snmp_cache', $poller_id);
|
||||
}
|
||||
replicate_table_to_poller($rcnn_id, $data, 'host_snmp_cache', $poller_id);
|
||||
|
||||
$data = db_fetch_assoc_prepared('SELECT hsc.*
|
||||
FROM host_value_cache AS hsc
|
||||
@@ -895,9 +887,7 @@ function api_device_replicate_out(int $device_id, int $poller_id = 1) : bool {
|
||||
WHERE h.id = ?',
|
||||
[$device_id]);
|
||||
|
||||
if ($poller_id > 1) {
|
||||
replicate_table_to_poller($rcnn_id, $data, 'host_value_cache', $poller_id);
|
||||
}
|
||||
replicate_table_to_poller($rcnn_id, $data, 'host_value_cache', $poller_id);
|
||||
|
||||
$data = db_fetch_assoc_prepared('SELECT pri.*
|
||||
FROM poller_reindex AS pri
|
||||
@@ -906,9 +896,7 @@ function api_device_replicate_out(int $device_id, int $poller_id = 1) : bool {
|
||||
WHERE h.id = ?',
|
||||
[$device_id]);
|
||||
|
||||
if ($poller_id > 1) {
|
||||
replicate_table_to_poller($rcnn_id, $data, 'poller_reindex', $poller_id);
|
||||
}
|
||||
replicate_table_to_poller($rcnn_id, $data, 'poller_reindex', $poller_id);
|
||||
|
||||
$data = db_fetch_assoc_prepared('SELECT dl.*
|
||||
FROM data_local AS dl
|
||||
@@ -917,9 +905,7 @@ function api_device_replicate_out(int $device_id, int $poller_id = 1) : bool {
|
||||
WHERE h.id = ?',
|
||||
[$device_id]);
|
||||
|
||||
if ($poller_id > 1) {
|
||||
replicate_table_to_poller($rcnn_id, $data, 'data_local', $poller_id);
|
||||
}
|
||||
replicate_table_to_poller($rcnn_id, $data, 'data_local', $poller_id);
|
||||
|
||||
$data = db_fetch_assoc_prepared('SELECT gl.*
|
||||
FROM graph_local AS gl
|
||||
@@ -928,9 +914,7 @@ function api_device_replicate_out(int $device_id, int $poller_id = 1) : bool {
|
||||
WHERE h.id = ?',
|
||||
[$device_id]);
|
||||
|
||||
if ($poller_id > 1) {
|
||||
replicate_table_to_poller($rcnn_id, $data, 'graph_local', $poller_id);
|
||||
}
|
||||
replicate_table_to_poller($rcnn_id, $data, 'graph_local', $poller_id);
|
||||
|
||||
$data = db_fetch_assoc_prepared('SELECT dtd.*
|
||||
FROM data_template_data AS dtd
|
||||
@@ -941,9 +925,7 @@ function api_device_replicate_out(int $device_id, int $poller_id = 1) : bool {
|
||||
WHERE h.id = ?',
|
||||
[$device_id]);
|
||||
|
||||
if ($poller_id > 1) {
|
||||
replicate_table_to_poller($rcnn_id, $data, 'data_template_data', $poller_id);
|
||||
}
|
||||
replicate_table_to_poller($rcnn_id, $data, 'data_template_data', $poller_id);
|
||||
|
||||
$data = db_fetch_assoc_prepared('SELECT dtr.*
|
||||
FROM data_template_rrd AS dtr
|
||||
@@ -954,9 +936,7 @@ function api_device_replicate_out(int $device_id, int $poller_id = 1) : bool {
|
||||
WHERE h.id = ?',
|
||||
[$device_id]);
|
||||
|
||||
if ($poller_id > 1) {
|
||||
replicate_table_to_poller($rcnn_id, $data, 'data_template_rrd', $poller_id);
|
||||
}
|
||||
replicate_table_to_poller($rcnn_id, $data, 'data_template_rrd', $poller_id);
|
||||
|
||||
$data = db_fetch_assoc_prepared('SELECT gti.*
|
||||
FROM graph_templates_item AS gti
|
||||
@@ -967,9 +947,7 @@ function api_device_replicate_out(int $device_id, int $poller_id = 1) : bool {
|
||||
WHERE h.id = ?',
|
||||
[$device_id]);
|
||||
|
||||
if ($poller_id > 1) {
|
||||
replicate_table_to_poller($rcnn_id, $data, 'graph_templates_item', $poller_id);
|
||||
}
|
||||
replicate_table_to_poller($rcnn_id, $data, 'graph_templates_item', $poller_id);
|
||||
|
||||
$data = db_fetch_assoc_prepared('SELECT did.*
|
||||
FROM data_input_data AS did
|
||||
@@ -982,9 +960,7 @@ function api_device_replicate_out(int $device_id, int $poller_id = 1) : bool {
|
||||
WHERE h.id = ?',
|
||||
[$device_id]);
|
||||
|
||||
if ($poller_id > 1) {
|
||||
replicate_table_to_poller($rcnn_id, $data, 'data_input_data', $poller_id);
|
||||
}
|
||||
replicate_table_to_poller($rcnn_id, $data, 'data_input_data', $poller_id);
|
||||
|
||||
api_plugin_hook_function('replicate_out', ['remote_poller_id' => $poller_id, 'rcnn_id' => $rcnn_id, 'class' => 'all']);
|
||||
|
||||
|
||||
+1
-1
@@ -402,7 +402,7 @@ function clog_view_logfile() : void {
|
||||
}
|
||||
|
||||
// respect the exclusion filter
|
||||
if ($exclude_regex != '' && !$clogAdmin) {
|
||||
if ($exclude_regex != '') {
|
||||
if (validate_is_regex($exclude_regex)) {
|
||||
if (preg_match($exclude_regex, $new_item)) {
|
||||
continue;
|
||||
|
||||
@@ -275,7 +275,11 @@ function ss_netsnmp_lmsensors(int $host_id = 0, string $sensor_type = '', string
|
||||
|
||||
return null;
|
||||
} else {
|
||||
$sensor_array[$sensor_count]['index'] = $scratch[1];
|
||||
$sensor_array[$sensor_count] = [
|
||||
'index' => $scratch[1],
|
||||
'name' => '',
|
||||
'reading' => ''
|
||||
];
|
||||
}
|
||||
|
||||
$sensor_count++;
|
||||
@@ -285,9 +289,7 @@ function ss_netsnmp_lmsensors(int $host_id = 0, string $sensor_type = '', string
|
||||
// requests for data other than index values require additional processing
|
||||
//
|
||||
if ($data_request != 'sensordevice' && cacti_sizeof($sensor_array)) {
|
||||
$sensor_count = 0;
|
||||
|
||||
foreach ($sensor_array as $sensor) {
|
||||
foreach ($sensor_array as $sensor_key => $sensor) {
|
||||
switch ($data_request) {
|
||||
case 'sensordevice':
|
||||
//
|
||||
@@ -337,7 +339,7 @@ function ss_netsnmp_lmsensors(int $host_id = 0, string $sensor_type = '', string
|
||||
//
|
||||
// store the sensor name
|
||||
//
|
||||
$sensor_array[$sensor_count]['name'] = $scratch;
|
||||
$sensor['name'] = $scratch;
|
||||
|
||||
break;
|
||||
case 'sensorreading':
|
||||
@@ -378,15 +380,12 @@ function ss_netsnmp_lmsensors(int $host_id = 0, string $sensor_type = '', string
|
||||
//
|
||||
// store the sensor reading
|
||||
//
|
||||
$sensor_array[$sensor_count]['reading'] = $scratch;
|
||||
$sensor['reading'] = $scratch;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
// increment the sensor counter
|
||||
//
|
||||
$sensor_count++;
|
||||
$sensor_array[$sensor_key] = $sensor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user