Skip to content

Commit

Permalink
feat(*): Update to last crowdsec packages version (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienloizelet authored Jan 31, 2025
1 parent 70f2f71 commit 21ffb54
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@
],
"require": {
"php": ">=7.2.5",
"crowdsec/bouncer": "^4.1.0",
"cweagans/composer-patches": "^1.7"
"crowdsec/bouncer": "^4.2.0",
"crowdsec/remediation-engine": "^4.2.0",
"crowdsec/common": "^3.0.0",
"cweagans/composer-patches": "^1.7",
"mlocati/ip-lib": "^1.18"
},
"require-dev": {
"phpunit/phpunit": "^8.5.30 || ^9.3",
Expand Down
3 changes: 1 addition & 2 deletions src/Bouncer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ class Bouncer extends AbstractBouncer
*/
public function __construct(array $configs, ?LoggerInterface $logger = null)
{
$logConfigs = array_merge($configs, ['no_rotation' => true]);
$this->logger = $logger ?: new FileLog($logConfigs, 'php_standalone_bouncer');
$this->logger = $logger ?: new FileLog($configs, 'php_standalone_bouncer');
$configs = $this->handleTrustedIpsConfig($configs);
$configs['user_agent_version'] = Constants::VERSION;
$configs['user_agent_suffix'] = Constants::USER_AGENT_SUFFIX;
Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/IpVerificationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function setUp(): void
$currentDate = date('Y-m-d');
$this->debugFile = 'debug-' . $currentDate . '.log';
$this->prodFile = 'prod-' . $currentDate . '.log';
$this->logger = new FileLog(['log_directory_path' => $this->root->url(), 'debug_mode' => true]);
$this->logger = new FileLog(['log_directory_path' => $this->root->url(), 'debug_mode' => true, 'log_rotator' => true], 'php_standalone_bouncer');

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

0 comments on commit 21ffb54

Please sign in to comment.