Skip to content

Commit 2a1810d

Browse files
feat(log): Allow symfony v7 and monolog v3 (#136)
1 parent 71e93e2 commit 2a1810d

File tree

4 files changed

+24
-7
lines changed

4 files changed

+24
-7
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,24 @@ As far as possible, we try to adhere to [Symfony guidelines](https://symfony.com
1111

1212
---
1313

14+
## [4.2.0](https://github.com/crowdsecurity/php-cs-bouncer/releases/tag/v4.1.0) - 2025-01-31
15+
[_Compare with previous release_](https://github.com/crowdsecurity/php-cs-bouncer/compare/v4.1.0...v4.2.0)
16+
17+
18+
### Changed
19+
20+
- Allow Monolog 3 package and Symfony 7 packages
21+
22+
---
23+
1424

1525
## [4.1.0](https://github.com/crowdsecurity/php-cs-bouncer/releases/tag/v4.1.0) - 2025-01-10
1626
[_Compare with previous release_](https://github.com/crowdsecurity/php-cs-bouncer/compare/v4.0.0...v4.1.0)
1727

1828

1929
### Changed
2030

21-
- Do not save origins count when the bouncer does not bounce the IP, due to business logic. This avoids sending a
31+
- Do not save origins count when the bouncer does not bounce the IP, due to business logic. This avoids sending a
2232
"processed" usage metrics to the LAPI when the IP is not bounced at all.
2333

2434
---

composer.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,25 @@
4141
],
4242
"require": {
4343
"php": ">=7.2.5",
44-
"crowdsec/remediation-engine": "^4.0.0",
45-
"crowdsec/common": "^2.3.2",
46-
"symfony/config": "^4.4.27 || ^5.2 || ^6.0",
44+
"crowdsec/remediation-engine": "^4.2.0",
45+
"crowdsec/lapi-client": "^3.6.0",
46+
"crowdsec/common": "^3.0.0",
47+
"symfony/config": "^4.4.27 || ^5.2 || ^6.0 || ^7.2",
48+
"monolog/monolog": "^1.17 || ^2.1 || ^3.8",
49+
"psr/log": "^1.0 || ^2.0 || ^3.0",
4750
"twig/twig": "^3.4.2",
4851
"gregwar/captcha": "^1.2.1",
4952
"mlocati/ip-lib": "^1.18",
5053
"ext-json": "*",
5154
"ext-gd": "*"
5255
},
56+
"suggest": {
57+
"ext-curl": "*"
58+
},
5359
"require-dev": {
5460
"phpunit/phpunit": "^8.5.30 || ^9.3",
5561
"mikey179/vfsstream": "^1.6.11",
56-
"nikic/php-parser": "^4.18"
62+
"nikic/php-parser": "^4.18",
63+
"ext-curl": "*"
5764
}
5865
}

src/Constants.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Constants extends RemConstants
3131
/** @var string Path for html templates folder (e.g. ban and captcha wall) */
3232
public const TEMPLATES_DIR = __DIR__ . '/templates';
3333
/** @var string The last version of this library */
34-
public const VERSION = 'v4.1.0';
34+
public const VERSION = 'v4.2.0';
3535
/** @var string The "disabled" x-forwarded-for setting */
3636
public const X_FORWARDED_DISABLED = 'no_forward';
3737
}

tests/Integration/AbstractBouncerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ protected function setUp(): void
126126
$currentDate = date('Y-m-d');
127127
$this->debugFile = 'debug-' . $currentDate . '.log';
128128
$this->prodFile = 'prod-' . $currentDate . '.log';
129-
$this->logger = new FileLog(['log_directory_path' => $this->root->url(), 'debug_mode' => true]);
129+
$this->logger = new FileLog(['log_directory_path' => $this->root->url(), 'debug_mode' => true, 'log_rotator' => true]);
130130

131131
$bouncerConfigs = [
132132
'auth_type' => $this->useTls ? \CrowdSec\LapiClient\Constants::AUTH_TLS : Constants::AUTH_KEY,

0 commit comments

Comments
 (0)