Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.5.3](https://github.com/crowdsecurity/php-capi-client/releases/tag/v3.5.3) - 2026-06-02
[_Compare with previous release_](https://github.com/crowdsecurity/php-capi-client/compare/v3.5.2...v3.5.3)


### Changed

- Push signals in batches of 50 to avoid issues with large payloads

---

## [3.5.2](https://github.com/crowdsecurity/php-capi-client/releases/tag/v3.5.2) - 2026-02-06
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.5.2';
public const VERSION = 'v3.5.3';
}
10 changes: 8 additions & 2 deletions src/Watcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,16 @@
* @throws ClientException
*/
public function pushSignals(array $signals): array
{
{

Check warning on line 250 in src/Watcher.php

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove the useless trailing whitespaces at the end of this line.

See more on https://sonarcloud.io/project/issues?id=crowdsecurity_php-capi-client&issues=AZ6I-Etp8MEXqSsfePMz&open=AZ6I-Etp8MEXqSsfePMz&pullRequest=42
$batchSize = 50;
$indexedSignals = array_values($signals);
$chunks = array_chunk($indexedSignals, $batchSize);
$result = [];
foreach ($chunks as $chunk) {
$result = $this->manageRequest('POST', Constants::SIGNALS_ENDPOINT, $chunk);
}

return $this->manageRequest('POST', Constants::SIGNALS_ENDPOINT, $indexedSignals);
return $result;
}

/**
Expand Down
Loading