Skip to content

Commit 21ffb54

Browse files
feat(*): Update to last crowdsec packages version (#29)
1 parent 70f2f71 commit 21ffb54

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@
4141
],
4242
"require": {
4343
"php": ">=7.2.5",
44-
"crowdsec/bouncer": "^4.1.0",
45-
"cweagans/composer-patches": "^1.7"
44+
"crowdsec/bouncer": "^4.2.0",
45+
"crowdsec/remediation-engine": "^4.2.0",
46+
"crowdsec/common": "^3.0.0",
47+
"cweagans/composer-patches": "^1.7",
48+
"mlocati/ip-lib": "^1.18"
4649
},
4750
"require-dev": {
4851
"phpunit/phpunit": "^8.5.30 || ^9.3",

src/Bouncer.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ class Bouncer extends AbstractBouncer
3030
*/
3131
public function __construct(array $configs, ?LoggerInterface $logger = null)
3232
{
33-
$logConfigs = array_merge($configs, ['no_rotation' => true]);
34-
$this->logger = $logger ?: new FileLog($logConfigs, 'php_standalone_bouncer');
33+
$this->logger = $logger ?: new FileLog($configs, 'php_standalone_bouncer');
3534
$configs = $this->handleTrustedIpsConfig($configs);
3635
$configs['user_agent_version'] = Constants::VERSION;
3736
$configs['user_agent_suffix'] = Constants::USER_AGENT_SUFFIX;

tests/Integration/IpVerificationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ protected function setUp(): void
7676
$currentDate = date('Y-m-d');
7777
$this->debugFile = 'debug-' . $currentDate . '.log';
7878
$this->prodFile = 'prod-' . $currentDate . '.log';
79-
$this->logger = new FileLog(['log_directory_path' => $this->root->url(), 'debug_mode' => true]);
79+
$this->logger = new FileLog(['log_directory_path' => $this->root->url(), 'debug_mode' => true, 'log_rotator' => true], 'php_standalone_bouncer');
8080

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

0 commit comments

Comments
 (0)