Skip to content

Commit 51dfcb6

Browse files
feat(log): Allow monolog v3 (#35)
1 parent ec06c00 commit 51dfcb6

File tree

6 files changed

+20
-8
lines changed

6 files changed

+20
-8
lines changed

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ The [public API](https://semver.org/spec/v2.0.0.html#spec-item-1) of this libra
1313
As far as possible, we try to adhere to [Symfony guidelines](https://symfony.com/doc/current/contributing/code/bc.html#working-on-symfony-code) when deciding whether a change is a breaking change or not.
1414

1515

16+
---
17+
18+
## [4.2.0](https://github.com/crowdsecurity/php-remediation-engine/releases/tag/v4.2.0) - 2025-01-31
19+
[_Compare with previous release_](https://github.com/crowdsecurity/php-remediation-engine/compare/v4.1.0...v4.2.0)
20+
21+
22+
### Changed
23+
24+
- Allow Monolog 3 packages
25+
1626
---
1727

1828
## [4.1.0](https://github.com/crowdsecurity/php-remediation-engine/releases/tag/v4.1.0) - 2025-01-16
@@ -23,7 +33,6 @@ As far as possible, we try to adhere to [Symfony guidelines](https://symfony.com
2333

2434
- Allow Symfony 7 packages
2535

26-
2736
---
2837

2938
## [4.0.0](https://github.com/crowdsecurity/php-remediation-engine/releases/tag/v4.0.0) - 2025-01-09

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@
4545
"ext-json": "*",
4646
"symfony/config": "^4.4.27 || ^5.2 || ^6.0 || ^7.2",
4747
"symfony/cache": "^5.4.11 || ^6.0.11 || ^7.2.1",
48-
"crowdsec/common": "^2.4.0",
48+
"crowdsec/common": "^3.0.0",
4949
"crowdsec/capi-client": "^3.3.0",
5050
"crowdsec/lapi-client": "^3.5.0",
51-
"monolog/monolog": "^1.17 || ^2.1",
5251
"mlocati/ip-lib": "^1.18",
53-
"geoip2/geoip2": "^2.13.0"
52+
"geoip2/geoip2": "^2.13.0",
53+
"monolog/monolog": "^1.17 || ^2.1 || ^3.8",
54+
"psr/log": "^1.0 || ^2.0 || ^3.0",
55+
"psr/cache": "^1.0 || ^2.0 || ^3.0"
5456
},
5557
"require-dev": {
5658
"phpunit/phpunit": "^8.5.30 || ^9.3",

src/Constants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,5 @@ class Constants extends CommonConstants
8989
/**
9090
* @var string The current version of this library
9191
*/
92-
public const VERSION = 'v4.1.0';
92+
public const VERSION = 'v4.2.0';
9393
}

tests/Unit/CacheTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function setUp(): void
133133
$currentDate = date('Y-m-d');
134134
$this->debugFile = 'debug-' . $currentDate . '.log';
135135
$this->prodFile = 'prod-' . $currentDate . '.log';
136-
$this->logger = new FileLog(['log_directory_path' => $this->root->url(), 'debug_mode' => true]);
136+
$this->logger = new FileLog(['log_directory_path' => $this->root->url(), 'debug_mode' => true, 'log_rotator' => true]);
137137

138138
$cachePhpfilesConfigs = ['fs_cache_path' => $this->root->url()];
139139
$this->phpFileStorage = new PhpFiles($cachePhpfilesConfigs, $this->logger);

tests/Unit/CapiRemediationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function setUp(): void
193193
$currentDate = date('Y-m-d');
194194
$this->debugFile = 'debug-' . $currentDate . '.log';
195195
$this->prodFile = 'prod-' . $currentDate . '.log';
196-
$this->logger = new FileLog(['log_directory_path' => $this->root->url(), 'debug_mode' => true]);
196+
$this->logger = new FileLog(['log_directory_path' => $this->root->url(), 'debug_mode' => true, 'log_rotator' => true]);
197197
$this->watcher = $this->getWatcherMock();
198198

199199
$cachePhpfilesConfigs = ['fs_cache_path' => $this->root->url()];

tests/Unit/LapiRemediationTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ public function setUp(): void
204204
$currentDate = date('Y-m-d');
205205
$this->debugFile = 'debug-' . $currentDate . '.log';
206206
$this->prodFile = 'prod-' . $currentDate . '.log';
207-
$this->logger = new FileLog(['log_directory_path' => $this->root->url(), 'debug_mode' => true]);
207+
$this->logger = new FileLog(['log_directory_path' => $this->root->url(), 'debug_mode' => true, 'log_rotator'
208+
=> true]);
208209
$this->bouncer = $this->getBouncerMock();
209210

210211
$cachePhpfilesConfigs = ['fs_cache_path' => $this->root->url()];

0 commit comments

Comments
 (0)