PHPackages                             pixelfederation/phystrix-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. pixelfederation/phystrix-bundle

ActiveSymfony-bundle

pixelfederation/phystrix-bundle
===============================

Phystrix integration with Symfony2 framework.

4.0.1(5y ago)15.1k2Apache-2.0PHPPHP &gt;=7.4

Since Mar 31Pushed 5y ago4 watchersCompare

[ Source](https://github.com/pixelfederation/phystrix-bundle)[ Packagist](https://packagist.org/packages/pixelfederation/phystrix-bundle)[ RSS](/packages/pixelfederation-phystrix-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (5)Dependencies (17)Versions (13)Used By (0)

[![SensioLabsInsight](https://camo.githubusercontent.com/b822e67c5a6c9be4adb25b93b57617249c0d384d62c36f779382a9a08438db4b/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f65623536626139352d643832612d346138312d623230372d6330343337326635653761312f6d696e692e706e67)](https://insight.sensiolabs.com/projects/eb56ba95-d82a-4a81-b207-c04372f5e7a1)[![Build Status](https://camo.githubusercontent.com/af420aefecb99e41754823a670c6776479785e8b12b71d0b9661db60a6413a09/68747470733a2f2f7472617669732d63692e6f72672f706978656c66656465726174696f6e2f70687973747269782d62756e646c652e737667)](https://travis-ci.org/pixelfederation/phystrix-bundle)

Phystrix Bundle
===============

[](#phystrix-bundle)

This bundle provides phystrix command factory service: `phystrix.command_factory` with default configuration

Installation
------------

[](#installation)

Install component by using [Composer](https://getcomposer.org). Update your project's `composer.json` file to include dependency.

```
"require": {
    "pixelfederation/phystrix-bundle": "~1.1"
}
```

Register bundle in your `AppKernel`

```
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Odesk\Bundle\PhystrixBundle\OdeskPhystrixBundle()
            // ...
        );
    }
}
```

Configuration
-------------

[](#configuration)

Default configuration:

### app/config/config.yml

[](#appconfigconfigyml)

```
odesk_phystrix:
  default:
    fallback: ~
    circuitBreaker:
      errorThresholdPercentage: 50
      forceOpen: false
      forceClosed: false
      requestVolumeThreshold: 20
      sleepWindowInMilliseconds: 5000
    metrics:
      healthSnapshotIntervalInMilliseconds: 1000
      rollingStatisticalWindowInMilliseconds: 10000
      rollingStatisticalWindowBuckets: 10
    requestCache: ~
    requestLog: ~
```

Web Profiler
------------

[](#web-profiler)

Phystrix bundles comes with a web profiler plugin, it is enabled automatically whenever Symfony profiler is enabled. You only need to make sure requestLog feature is turned on:

```
odesk_phystrix:
  default:
    requestLog:
      enabled: true
```

Only do this in mode/environment where profiler is active.

Usage
-----

[](#usage)

You may use `phystrix.service_locator` to provide additional dependencies in runtime:

```
$container->get('phystrix.service_locator')->set('somekey', $somevalue);
```

How to create and run a command:

```
$command = $container->get('phystrix.command_factory')->getCommand('MyCommand', $parameter1, $parameter2);
$command->execute();
```

### Logger

[](#logger)

How to add logger to Commands: define `logger.phystrix` service

```
# config.yml
monolog:
    channels: ['phystrix']
```

and

```
# services.yml
services:
    logger.phystrix:
        alias: monolog.logger.phystrix
```

### Redis state storage

[](#redis-state-storage)

Require redis state storage [pixelfederation/phystrix-redis](https://github.com/pixelfederation/phystrix-redis) package:

```
composer require pixelfederation/phystrix-redis
```

Override state storage configuration:

```
# services.yml
services:
    PixelFederation\Phystrix\Storage\RedisStateStorage:
        arguments:
            - '@snc_redis.cache'

    phystrix.state_storage:
        alias: PixelFederation\Phystrix\Storage\RedisStateStorage
```

### License

[](#license)

This file is a part of the Phystrix Bundle

Copyright 2013-2017 Upwork Global Inc. All Rights Reserved.

This file is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~215 days

Recently: every ~304 days

Total

11

Last Release

1902d ago

Major Versions

v1.1.8 → v2.0.02017-09-29

v2.1.0 → v3.0.02017-10-24

v3.0.2 → 4.0.02021-02-24

PHP version history (3 changes)v1.1.4PHP &gt;=5.3.3

v2.0.0PHP &gt;=7.0

4.0.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f41a9b6b3fcc495a546791e3993b29832b7a4b08f34ad094a1131e2e8784d01?d=identicon)[pixelfederation](/maintainers/pixelfederation)

---

Top Contributors

[![tmihalicka](https://avatars.githubusercontent.com/u/1620790?v=4)](https://github.com/tmihalicka "tmihalicka (5 commits)")[![mskorupa-pixel](https://avatars.githubusercontent.com/u/141940674?v=4)](https://github.com/mskorupa-pixel "mskorupa-pixel (5 commits)")[![speto](https://avatars.githubusercontent.com/u/421634?v=4)](https://github.com/speto "speto (4 commits)")[![mxnr](https://avatars.githubusercontent.com/u/1383089?v=4)](https://github.com/mxnr "mxnr (3 commits)")[![Rastusik](https://avatars.githubusercontent.com/u/1735097?v=4)](https://github.com/Rastusik "Rastusik (2 commits)")[![lcf](https://avatars.githubusercontent.com/u/185882?v=4)](https://github.com/lcf "lcf (2 commits)")[![bpaulin](https://avatars.githubusercontent.com/u/115711?v=4)](https://github.com/bpaulin "bpaulin (1 commits)")

---

Tags

symfonyodeskphystrix

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/pixelfederation-phystrix-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/pixelfederation-phystrix-bundle/health.svg)](https://phpackages.com/packages/pixelfederation-phystrix-bundle)
```

###  Alternatives

[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[sineflow/clamav

ClamAV PHP Client for Symfony

10168.5k](/packages/sineflow-clamav)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
