NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1912 most downloaded on Packagist
PHP implementation of Circuit Breaker pattern
Latest stable
4.0.0
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 1.5 years
Nearly every release is documented
notes for 28 of 28 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
28 releases · first in 2018
Drag across the ruler to compare, or tap a release to open it.
In this release, the minimum supported PHP version has been increased from 8.0 to 8.1. There are no changes to the interfaces and features provided by
In this release, the minimum supported PHP version has been increased from 8.0 to 8.1. There are no changes to the interfaces and features provided by Ganesha in this release.
See the Version Guidance for the supported PHP version in each release.
Full Changelog: https://github.com/ackintosh/ganesha/compare/3.2.0...4.0.0
In this release, the minimum supported PHP version has been increased from 8.0 to 8.1. There are no changes to the interfaces and features provided by Ganesha in this release.
See the Version Guidance for the supported PHP version in each release.
Full Changelog: 3.2.0...4.0.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
As of this release RejectedException::serviceName() is available. It returns the service name that Ganesha deems to be in a fault state. Thank you @ma
As of this release RejectedException::serviceName() is available. It returns the service name that Ganesha deems to be in a fault state. Thank you @marmichalski !
try {
$client->get('http://api.example.com/awesome_resource');
} catch (RejectedException $e) {
// Obtain the service name.
echo $e->serviceName();
}
symfony/http-client 5.3.12 as lowest by @marmichalski in https://github.com/ackintosh/ganesha/pull/125Full Changelog: https://github.com/ackintosh/ganesha/compare/3.1.2...3.2.0
As of this release RejectedException::serviceName() is available. It returns the service name that Ganesha deems to be in a fault state. Thank you @marmichalski !
try {
$client->get('http://api.example.com/awesome_resource');
} catch (RejectedException $e) {
// Obtain the service name.
echo $e->serviceName();
}symfony/http-client 5.3.12 as lowest by @marmichalski in #125Full Changelog: 3.1.2...3.2.0
Loosened requirement for psr/http-message - ^1.0|^2.0 by @Rastusik in https://github.com/ackintosh/ganesha/pull/107
Full Changelog: https://github.com/ackintosh/ganesha/compare/3.1.1...3.1.2
CI: Fix libmemcached installation by @ackintosh in https://github.com/ackintosh/ganesha/pull/103
Full Changelog: https://github.com/ackintosh/ganesha/compare/3.1.0...3.1.1
Failure detector for Guzzle middleware has been introduced in this release. See README for details.
Failure detector for Guzzle middleware has been introduced in this release. See README for details.
Full Changelog: https://github.com/ackintosh/ganesha/compare/3.0.1...3.1.0
Failure detector for Guzzle middleware has been introduced in this release. See README for details.
Full Changelog: 3.0.1...3.1.0
Add psalm types to public interfaces to guide static analysis. by @mad-briller
Since this release, the minimum supported PHP version is bumped from 7.3 to 8.0. Also symfony/http-client version is bumped.
Since this release, the minimum supported PHP version is bumped from 7.3 to 8.0. Also symfony/http-client version is bumped.
Please see Version Guidance for the supported PHP version in each release.
There are no changes to the interfaces and features Ganesha provides.
composer on example client by @ackintoshRedisStore use ClientInterface instead of Client by @fhjbalfoort
RedisStore use ClientInterface instead of Client by @fhjbalfoort
Since this release, RedisStore allows an instance of \Predis\ClientInterface instead of \Predis\Client as a constructor argument.
This allows you to use your custom redis client that implements the \Predis\ClientInterface interface.
Added .gitattributes to reduce the size of package. https://github.com/ackintosh/ganesha/pull/86
Added .gitattributes to reduce the size of package. https://github.com/ackintosh/ganesha/pull/86
It reduces the package size from ~1,600KB to ~200KB. 🚀
Added .gitattributes to reduce the size of package.
#86
It reduces the package size from ~1,600KB to ~200KB. 🚀
Updates in this version is only drop the support for the versions reached EOL. So the interfaces and features ganesha provides has not been changed in
Updates in this version is only drop the support for the versions reached EOL. So the interfaces and features ganesha provides has not been changed in this update.
Support for the versions that reached the EOL has been dropped.
feat: Add option to configure HTTP status codes to consider as failure · Pull Request #82 by @pvgnd
feat: Add option to configure HTTP status codes to consider as failure · Pull Request #82 by @pvgnd
GaheshaHttpClient which provides integration of Symfony HttpClient and Ganesha, now allows an option to trigger failure on 5xx response.
For the details please see README.
Success count now gets cleared when using Redis by ariasmn · Pull Request #74 · ackintosh/ganesha
Fix backward incompatibility in v1.2.1 by ackintosh · Pull Request #81 · ackintosh/ganesha
Fix backward incompatibility in v1.2.1 by ackintosh · Pull Request #81 · ackintosh/ganesha
This release is to ease the backward incompatibility in 1.2.1.
Unfortunately this release does not completely fix the incompatibility. If you are using your custom adapter, please add setContext method like below in order to keep behaviors of your adapter.
If your custom adapter extends a built in adapter like below, it is recommended to use the parent implementation:
class CustomAdapter extends \Ackintosh\Ganesha\Storage\Adapter\Memcached
{
// Comment out to use the parent implementation
// public function setContext(Ganesha\Context $context): void
// {
// }
}
or if your custom adapter using no built in adapter, please add an empty setContext method to satisfy AdapterInterface requirement.
class CustomAdapter implements \Ackintosh\Ganesha\Storage\AdapterInterface
{
public function setContext(Ganesha\Context $context): void
{
// nop
}
}
Fix: Memcached items keep growing by ackintosh · Pull Request #79 · ackintosh/ganesha
feat: Add Symfony HttpClient integration (closes #68) by pvgnd · Pull Request #69 · ackintosh/ganesha
Implement APCu adapter by MikkelPaulson · Pull Request #63 · ackintosh/ganesha
This release comes with breaking changes. Please refer to the following for details.
I'm excited to announce v1.0.0 - the first major release of Ganesha. 🎉 🎉
This release comes with breaking changes. Please refer to the following for details.
Support for the versions that reached the EOL has been dropped.
To make Ganesha more developer-friendly, the way how to pass build parameters has been changed, from an associative array to builder methods.
// Rate strategy
$ganesha = Ackintosh\Ganesha\Builder::build([
'timeWindow' => 30,
'failureRateThreshold' => 90,
'minimumRequests' => 10,
'intervalToHalfOpen' => 5,
'adapter' => new Ackintosh\Ganesha\Storage\Adapter\Memcached($memcached),
]);
// Count strategy
$ganesha = Ackintosh\Ganesha\Builder::buildwithCountStrategy([
'failureCountThreshold' => 100,
'intervalToHalfOpen' => 5,
'adapter' => new Ackintosh\Ganesha\Storage\Adapter\Memcached($memcached),
]);
// Rate strategy
$ganesha = Ackintosh\Ganesha\Builder::withRateStrategy()
->timeWindow(30)
->failureRateThreshold(90)
->minimumRequests(10)
->intervalToHalfOpen(5)
->adapter(new Ackintosh\Ganesha\Storage\Adapter\Memcached($memcached))
->build();
// Count strategy
$ganesha = Ackintosh\Ganesha\Builder::withCountStrategy()
->failureCountThreshold(100)
->intervalToHalfOpen(5)
->adapter(new Ackintosh\Ganesha\Storage\Adapter\Memcached($memcached))
->build();
Thank you for using Ganesha! ✨🐘✨
Enable users to provide suffix and prefix particles by albertojgomez · Pull Request #48 · ackintosh/ganesha
If you want customize the keys to be used when storing circuit breaker information, set an instance which implements StorageKeysInterface.
class YourStorageKeys implements StorageKeysInterface
{
public function prefix()
{
return 'your_prefix_';
}
// (ommitted)
}
$ganesha = Ackintosh\Ganesha\Builder::build([
// The keys which will stored by Ganesha to the storage you specified via `adapter`
// will be prefixed with `your_prefix_`.
'storageKeys' => new YourStorageKeys(),
]);
Some code tweaks by boekkooi-fresh · Pull Request #47 · ackintosh/ganesha
Even though Guzzle is not a core library for Ganesha, it was specified as required dependency. That is useless dependency for developers who wants to
Even though Guzzle is not a core library for Ganesha, it was specified as required dependency. That is useless dependency for developers who wants to use only Ganesha without Guzzle.
From this release, Guzzle is specified "suggest" section in composer.json instead of "require-dev".
Throw exception if an adapter doesn't support the strategy by ackintosh · Pull Request #36 · ackintosh/ganesha
Redis polymorphism: Add redis store wrapper by b1rdex · Pull Request #26 · ackintosh/ganesha
Added MongoDB adapter. by YekitKsv · Pull Request #32 · ackintosh/ganesha
Fix confusing interface name by ackintosh · Pull Request #31 · ackintosh/ganesha
intervalToHalfOpen not work for Redis storage · Issue #29 · ackintosh/ganesha
Fix: Redis Adapter doesn't return initial status properly by ackintosh · Pull Request #28 · ackintosh/ganesha
Add GuzzleMiddleware by ackintosh · Pull Request #12 · ackintosh/ganesha
Ganesha is PHP implementation of Circuit Breaker pattern which has multi strategies to detect failures and supports various storages.
Ganesha is PHP implementation of Circuit Breaker pattern which has multi strategies to detect failures and supports various storages.
One column per quarter.