diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index e9dd76c..0b1b657 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -43,7 +43,7 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.3', '8.4'] + php: ['8.3', '8.4', '8.5'] os: [ubuntu-latest] services: diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..6baef75 --- /dev/null +++ b/composer.json @@ -0,0 +1,16 @@ +{ + "name": "cacti/plugin_reportit", + "description": "Reporting tool for Cacti", + "homepage": "https://github.com/Cacti/plugin_reportit", + "license": "GPL-2.0-or-later", + "authors": [ + { + "name": "The Cacti Group", + "email": "reportit@outlook.com", + "homepage": "https://www.cacti.net" + } + ], + "require": { + "php": ">=8.3" + } +} diff --git a/tests/Security/PhpCompatibilityTest.php b/tests/Security/PhpCompatibilityTest.php index 8647ce0..333ecc6 100644 --- a/tests/Security/PhpCompatibilityTest.php +++ b/tests/Security/PhpCompatibilityTest.php @@ -23,9 +23,9 @@ */ /* - * Verify plugin source files do not use PHP 8.4-only syntax. + * Verify plugin source files do not use PHP 8.4+/8.5-only syntax. * This plugin's floor version is PHP 8.3, matching the shared CI test - * matrix (php: ['8.3', '8.4']) - this repo tracks Cacti's `develop` branch + * matrix (php: ['8.3', '8.4', '8.5']) - this repo tracks Cacti's `develop` branch * rather than `1.2.x`, which requires PHP 8.3+. */ diff --git a/tests/bin/check-i18n-pot.php b/tests/bin/check-i18n-pot.php index 1e45fb6..cddc4ef 100644 --- a/tests/bin/check-i18n-pot.php +++ b/tests/bin/check-i18n-pot.php @@ -65,13 +65,13 @@ '__date' => [1], ]; -/* Repository-relative path of the template the plugin must keep in sync. */ +// Repository-relative path of the template the plugin must keep in sync. $pot_path = 'locales/po/cacti.pot'; $base_ref = isset($argv[1]) ? trim($argv[1]) : ''; if ($base_ref === '') { - $env = getenv('GITHUB_BASE_REF'); + $env = getenv('GITHUB_BASE_REF'); $base_ref = ($env !== false) ? trim($env) : ''; } @@ -85,12 +85,12 @@ * Make sure the base commit is present. With fetch-depth: 0 it already is, but * a branch-name ref may still need fetching on a shallow checkout. */ -$probe = []; +$probe = []; $probe_status = 0; exec('git rev-parse --verify --quiet ' . escapeshellarg($base_ref . '^{commit}'), $probe, $probe_status); if ($probe_status !== 0) { - $ignore = []; + $ignore = []; $ignore_status = 0; exec('git fetch --quiet --no-tags --depth=200 origin ' . escapeshellarg($base_ref), $ignore, $ignore_status); } @@ -202,7 +202,7 @@ function template_files($ref) { exec('git ls-tree -r --name-only ' . escapeshellarg($ref), $output, $status); if ($status !== 0) { - fwrite(STDERR, "git ls-tree failed for " . $ref . "\n"); + fwrite(STDERR, 'git ls-tree failed for ' . $ref . "\n"); exit(2); }