Skip to content

Commit

Permalink
new plugin version for cakePHP 2.0 with PHP 8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Mitterhauser committed Mar 5, 2024
1 parent db25f69 commit 3ddaf67
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 1,869 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,40 +28,34 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check PHP syntax of config/phinx.php
- name: Check PHP syntax of plugin code
run: php -l Lib/ tests/

phpunit:
name: PHPUnit tests
runs-on: ubuntu-latest
strategy:
matrix:
php_version: [ 8.0, 8.1, 8.2 ]
steps:
- uses: actions/checkout@v3
- uses: php-actions/composer@v6
with:
php_version: 7.4
- uses: php-actions/phpunit@v3
with:
version: 4.8
php_version: 7.4
configuration: phpunit.xml
bootstrap: vendor/autoload.php
coverage_clover: clover.xml
php_version: ${{ matrix.php_version }}
- run: vendor/bin/phpunit --coverage-clover clover.xml

# phpstan for several php versions
phpstan:
runs-on: ubuntu-latest
strategy:
matrix:
php_version: [7.2, 7.4, 8.0, 8.1, 8.2]
php_version: [ 8.0, 8.1, 8.2 ]
steps:
- uses: actions/checkout@v3
- uses: php-actions/composer@v6
with:
php_version: 7.4
#php_extensions: redis intl

php_version: ${{ matrix.php_version }}
- name: PHPStan Static Analysis
uses: php-actions/phpstan@v3
with:
php_version: ${{ matrix.php_version }}
configuration: phpstan.neon
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/vendor/
/composer.lock
2 changes: 1 addition & 1 deletion Lib/Log/Engine/GraylogLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ private function buildTransport()
$this->_config['ssl_options']
);
}
throw new LogicException('Unkown transport scheme for GreyLog!');
throw new LogicException('Unknown transport scheme for GreyLog!');
}

/**
Expand Down
74 changes: 40 additions & 34 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
{
"name": "kba-team/cakephp-graylog",
"description": "Graylog engine for CakePHP",
"type": "cakephp-plugin",
"license": "MIT",
"minimum-stability": "stable",
"require": {
"php": ">7.2, <8.4",
"ext-json": "*",
"cakephp/cakephp": "^2.4",
"graylog2/gelf-php": "^1.6",
"composer/installers": "^1.9",
"kba-team/php-backtrace": "^1.0",
"kba-team/graylog-utilities": "^1.0"
},
"extra": {
"installer-name": "Graylog"
},
"require-dev": {
"phpunit/phpunit": "^4.8"
},
"autoload-dev": {
"classmap": [
"vendor/cakephp/cakephp/lib/Cake/Core/App.php",
"vendor/cakephp/cakephp/lib/Cake/Log/CakeLogInterface.php",
"vendor/cakephp/cakephp/lib/Cake/Log/Engine/BaseLog.php",
"vendor/cakephp/cakephp/lib/Cake/Utility/Hash.php",
"Lib/Log/Engine/GraylogLog.php",
"tests/PublicGraylogLog.php"
]
},
"config": {
"allow-plugins": {
"composer/installers": true
}
"name": "kba-team/cakephp-graylog",
"description": "Graylog engine for CakePHP",
"type": "cakephp-plugin",
"license": "MIT",
"minimum-stability": "stable",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/kamilwylegala/cakephp2-php8"
}
],
"require": {
"php": "^8.0",
"ext-json": "*",
"cakephp/cakephp": "dev-master",
"graylog2/gelf-php": "^1.6",
"composer/installers": "^1.9",
"kba-team/php-backtrace": "^1.0",
"kba-team/graylog-utilities": "^2.0"
},
"extra": {
"installer-name": "Graylog"
},
"require-dev": {
"phpunit/phpunit": "^9.5"
},
"autoload-dev": {
"classmap": [
"vendor/cakephp/cakephp/lib/Cake/Core/App.php",
"vendor/cakephp/cakephp/lib/Cake/Log/CakeLogInterface.php",
"vendor/cakephp/cakephp/lib/Cake/Log/Engine/BaseLog.php",
"vendor/cakephp/cakephp/lib/Cake/Utility/Hash.php",
"Lib/Log/Engine/GraylogLog.php",
"tests/PublicGraylogLog.php"
]
},
"config": {
"allow-plugins": {
"composer/installers": true
}
}
}
Loading

0 comments on commit 3ddaf67

Please sign in to comment.