From d0be9ad7b4de9ad98de8bee7a8a85dcf10317695 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Thu, 5 Feb 2026 15:26:35 -0500 Subject: [PATCH 1/7] Update workflow --- .github/workflows/plugin-ci-workflow.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index 5d553d6..b97e187 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -38,12 +38,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.1', '8.2', '8.3'] + php: ['8.1', '8.2', '8.3', '8.4'] os: [ubuntu-latest] services: mysql: - image: mysql:8.0 + image: mariadb:11.8 env: MYSQL_ROOT_PASSWORD: cactiroot MYSQL_DATABASE: cacti @@ -81,7 +81,6 @@ jobs: - name: Check PHP version run: php -v - - name: Run apt-get update run: sudo apt-get update @@ -141,7 +140,6 @@ jobs: sed -r "s/'cactiuser'/'cactiuser'/g" > ${{ github.workspace }}/cacti/include/config.php sudo chmod 664 ${{ github.workspace }}/cacti/include/config.php - - name: Configure Apache run: | cat << 'EOF' | sed 's#GITHUB_WORKSPACE#${{ github.workspace }}#g' > /tmp/cacti.conf @@ -180,7 +178,6 @@ jobs: exit 1 fi - - name: Run Cacti Poller run: | cd ${{ github.workspace }}/cacti @@ -191,12 +188,10 @@ jobs: exit 1 fi - - - name: View Cacti Logs if: always() run: | if [ -f ${{ github.workspace }}/cacti/log/cacti.log ]; then echo "=== Cacti Log ===" sudo cat ${{ github.workspace }}/cacti/log/cacti.log - fi \ No newline at end of file + fi From 398dee934319f672c9f9120ff519c28f0925f501 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Thu, 5 Feb 2026 15:32:08 -0500 Subject: [PATCH 2/7] Update workflow --- .github/workflows/plugin-ci-workflow.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index b97e187..b3a8bc5 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -177,6 +177,22 @@ jobs: echo "Syntax errors found!" exit 1 fi + + - name: Remove the plugins directory exclusion from the .phpstan.neon + run: sed '/plugins/d' -i .phpstan.neon + working-directory: ${{ github.workspace }}/cacti + + - name: Run Linter on base code + run: composer run-script lint ${{ github.workspace }}/cacti/plugins/servcheck + working-directory: ${{ github.workspace }}/cacti + + - name: Checking coding standards on base code + run: composer run-script phpcsfixer ${{ github.workspace }}/cacti/plugins/servcheck + working-directory: ${{ github.workspace }}/cacti + +# - name: Run PHPStan at Level 6 on base code outside of Composer due to technical issues +# run: ./include/vendor/bin/phpstan analyze --level 6 ${{ github.workspace }}/cacti/plugins/servcheck +# working-directory: ${{ github.workspace }}/cacti - name: Run Cacti Poller run: | From f277e905b74b09453af5549fa69fdb4289394eb2 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Thu, 5 Feb 2026 15:40:24 -0500 Subject: [PATCH 3/7] Updating workflows --- .github/workflows/plugin-ci-workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index b3a8bc5..f265db3 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -42,8 +42,8 @@ jobs: os: [ubuntu-latest] services: - mysql: - image: mariadb:11.8 + mariadb: + image: mariadb:10.6 env: MYSQL_ROOT_PASSWORD: cactiroot MYSQL_DATABASE: cacti From 0031663218a59276aafe763874ab46cc7071ce26 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Thu, 5 Feb 2026 15:43:20 -0500 Subject: [PATCH 4/7] Add the development component --- .github/workflows/plugin-ci-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index f265db3..642ef2d 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -128,7 +128,7 @@ jobs: run: | cd ${{ github.workspace }}/cacti if [ -f composer.json ]; then - sudo composer install --prefer-dist --no-progress + sudo composer install --dev --no-progress fi - name: Create Cacti config.php From 77ce1f0a0939b2ea184e4b2f369926ce13f9e92d Mon Sep 17 00:00:00 2001 From: TheWitness Date: Thu, 5 Feb 2026 15:47:09 -0500 Subject: [PATCH 5/7] Script Permissions --- .github/workflows/plugin-ci-workflow.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index 642ef2d..3cd7738 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -182,6 +182,9 @@ jobs: run: sed '/plugins/d' -i .phpstan.neon working-directory: ${{ github.workspace }}/cacti + - name: Mark composer scripts executable + run: chmod +x ${{ github.workspace }}/cacti/include/vendor/bin/* + - name: Run Linter on base code run: composer run-script lint ${{ github.workspace }}/cacti/plugins/servcheck working-directory: ${{ github.workspace }}/cacti From 0042d5d87e1b5c999a7c324064578afee68ad8df Mon Sep 17 00:00:00 2001 From: TheWitness Date: Thu, 5 Feb 2026 15:49:30 -0500 Subject: [PATCH 6/7] Script Permissions --- .github/workflows/plugin-ci-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index 3cd7738..cb0715d 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -183,7 +183,7 @@ jobs: working-directory: ${{ github.workspace }}/cacti - name: Mark composer scripts executable - run: chmod +x ${{ github.workspace }}/cacti/include/vendor/bin/* + run: sudo chmod +x ${{ github.workspace }}/cacti/include/vendor/bin/* - name: Run Linter on base code run: composer run-script lint ${{ github.workspace }}/cacti/plugins/servcheck From 40e77ff5182e23376ef5a5ec44f6a808b9bfabbb Mon Sep 17 00:00:00 2001 From: TheWitness Date: Thu, 5 Feb 2026 15:52:12 -0500 Subject: [PATCH 7/7] Fix php-cs-fixer issues --- setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.php b/setup.php index d58ae71..ebd00b5 100644 --- a/setup.php +++ b/setup.php @@ -75,7 +75,7 @@ function plugin_servcheck_upgrade() { } if (!db_column_exists('plugin_servcheck_test', 'external_id')) { - db_add_column('plugin_servcheck_test', array('name' => 'external_id', 'type' => 'varchar(20)', 'NULL' => false, 'default' => '', 'after' => 'notes')); + db_add_column('plugin_servcheck_test', ['name' => 'external_id', 'type' => 'varchar(20)', 'NULL' => false, 'default' => '', 'after' => 'notes']); } // 0.3 contains a lot of changes. I tried to convert old data but for sure make a backup