Skip to content

Commit

Permalink
feat(log): Allow monolog v3 (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienloizelet authored Jan 31, 2025
1 parent 64dd0c2 commit 4560687
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ The [public API](https://semver.org/spec/v2.0.0.html#spec-item-1) of this librar
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.


---

## [3.4.0](https://github.com/crowdsecurity/php-capi-client/releases/tag/v3.4.0) - 2025-01-31
[_Compare with previous release_](https://github.com/crowdsecurity/php-capi-client/compare/v3.3.0...v3.4.0)


### Changed

- Allow Monolog 3 package (Use `crowdsec/common` `^3.0.0` dependency)

---

## [3.3.0](https://github.com/crowdsecurity/php-capi-client/releases/tag/v3.3.0) - 2025-01-16
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@
},
"require": {
"php": "^7.2.5 || ^8.0",
"crowdsec/common": "^2.4.0",
"crowdsec/common": "^3.0.0",
"ext-json": "*",
"symfony/config": "^4.4.44 || ^5.4.11 || ^6.0.11 || ^7.2.0",
"symfony/uid": "^5.4.19 || ^6.2.5 || ^7.2.0",
"monolog/monolog": "^1.17 || ^2.1"
"symfony/uid": "^5.4.19 || ^6.2.5 || ^7.2.0"
},
"require-dev": {
"phpunit/phpunit": "^8.5.30 || ^9.3",
Expand Down
2 changes: 1 addition & 1 deletion src/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ class Constants extends CommonConstants
/**
* @var string The current version of this library
*/
public const VERSION = 'v3.3.0';
public const VERSION = 'v3.4.0';
}
2 changes: 1 addition & 1 deletion tests/Integration/WatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public 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]);
}

public function requestHandlerProvider(): array
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/WatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@ public function testBuildSimpleSignal()
);

// Test 3
$startTime = new \DateTime('1979-03-06 10:55:28');
$startTime = (new \DateTime('1979-03-06 10:55:28'))->setTimezone(new \DateTimeZone('UTC'));
$signal = $client->buildSimpleSignalForIp('1.2.3.4', TestConstants::SCENARIOS[0], $startTime);
$signalCreated = new \DateTime($signal['created_at']);
$signalCreatedTimestamp = $signalCreated->getTimestamp();
Expand Down

0 comments on commit 4560687

Please sign in to comment.