Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3']
php: ['8.5']
os: ['ubuntu-24.04']

steps:
Expand All @@ -32,7 +32,7 @@ jobs:
tools: phpcs

- name: Setup dependencies
run: composer require -n --no-progress overtrue/phplint
run: composer install

- name: PHP Lint
if: success() || matrix.allow_failure
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
.PHONY: lint phpcs
.PHONY: setup test lint phpcs coverage

setup:
mkdir -p _libraries &&\
git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-library.git _libraries/ipl &&\
git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-thirdparty.git _libraries/vendor &&\
git clone --depth 1 https://github.com/Icinga/icingaweb2.git _icingaweb2
test:
ICINGAWEB_LIBDIR=_libraries ./vendor/bin/phpunit
coverage:
ICINGAWEB_LIBDIR=_libraries ./vendor/bin/phpunit --coverage-html reports/
lint:
phplint application/ library/
phpcs:
Expand Down
23 changes: 23 additions & 0 deletions application/clicommands/CacheCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Icinga\Module\Feeds\Clicommands;

use Icinga\Module\Feeds\FeedCache;

use Icinga\Cli\Command;

class CacheCommand extends Command
{
/**
* Clears the entire FileCache used by the Feeds module
*
* USAGE
*
* icingacli feeds cache clear
*/
public function clearAction(): void
{
$cache = FeedCache::instance('feeds');
$cache->clearAll();
}
}
13 changes: 13 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"require-dev": {
"overtrue/phplint": "^9.7",
"phpunit/phpunit": "^13.2"
},
"autoload-dev": {
"psr-4": {
"Icinga\\": "_icingaweb2/library/Icinga/",
"Icinga\\Module\\Feeds\\": "library/Feeds/",
"GuzzleHttp\\Psr7\\": "_libraries/vendor/vendor/guzzlehttp/psr7/src/"
}
}
}
Loading