Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Phystrix Bundle

Phystrix Bundle Laravel Package

odesk/phystrix-bundle

A Symfony bundle for integrating Phystrix, the PHP circuit breaker library inspired by Netflix Hystrix. It helps protect applications from failing or slow remote services by wrapping calls with circuit-breaking, fallback, and fault-tolerance behavior.

View on GitHub
Deep Wiki
Context7

Phystrix integration with Symfony2 framework. This bundle provides phystrix command factory service: phystrix.command_factory with default configuration.

Frequently asked questions about Phystrix Bundle
What is odesk/phystrix-bundle used for?
It is a Symfony2 bundle that integrates Phystrix, the PHP circuit breaker library inspired by Netflix Hystrix. The bundle provides a phystrix.command_factory service with default configuration so you can wrap calls to remote services with circuit-breaking and fault-tolerance behavior. It is intended for Symfony2 applications, not Laravel.
How do I install odesk/phystrix-bundle with Composer?
Install it with Composer using the package name odesk/phystrix-bundle. You will also need to register the bundle in your Symfony2 application kernel and configure it if the defaults do not fit your service calls. Check the repository README for the exact bundle registration class and any required Phystrix dependency details.
Does odesk/phystrix-bundle work with Laravel?
No. The package is described as a Symfony2 bundle and exposes a Symfony service named phystrix.command_factory. Laravel applications would need a different integration or a framework-agnostic wrapper around the underlying Phystrix library. Do not expect Laravel service providers or package discovery support from this bundle.
Which Symfony versions are supported by this bundle?
The package context explicitly identifies it as a Symfony2 bundle. It does not claim support for Symfony 3, 4, 5, 6, or later versions. You should inspect the bundle's composer.json constraints and repository activity before assuming compatibility with modern Symfony releases.
How do I configure the phystrix.command_factory service?
The bundle ships the phystrix.command_factory service with default configuration. In a Symfony2 application you can override bundle parameters or service definitions through your application configuration to adjust Phystrix settings. Review the bundle's service definition and README for the exact configuration keys before changing defaults.
What is the phystrix.command_factory service responsible for?
It is the bundle's main integration point for creating Phystrix commands. Phystrix commands encapsulate calls to remote services so circuit-breaking, fallback, and fault-tolerance rules can be applied consistently. The factory uses the bundle's default configuration unless you override it.
How does Phystrix protect an application from slow or failing remote services?
Phystrix implements the circuit breaker pattern inspired by Netflix Hystrix. When a remote dependency fails or becomes slow, the circuit can open and short-circuit further calls, allowing fallback behavior instead of cascading failures. This bundle wires that library into Symfony2 through the command factory service.
Can I define fallbacks for failed remote calls with this bundle?
Yes, fallback behavior comes from the underlying Phystrix library, which this bundle integrates into Symfony2. You define fallback logic within your Phystrix command classes and create those commands through the phystrix.command_factory service. The bundle itself mainly provides the factory service and default configuration.
How can I test circuit breaker behavior in a Symfony2 app using this bundle?
Test your Phystrix command classes independently by mocking the remote service client and simulating failures, timeouts, and recoveries. In Symfony2 functional tests, you can replace the phystrix.command_factory service with a test double or adjust configuration to use short timeouts. Verify that fallbacks execute and that the circuit opens and closes as expected.
Is odesk/phystrix-bundle actively maintained, and what are the alternatives?
The repository should be checked directly for recent commits, releases, and open issues before adopting it, because the bundle targets Symfony2 and may not be actively maintained. Alternatives include integrating the Phystrix library directly, using a framework-agnostic circuit breaker library, or choosing a more current Symfony bundle. For Laravel applications, look for Laravel-specific circuit breaker packages instead.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource