PHPackages                             modera/backend-on-steroids-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. modera/backend-on-steroids-bundle

ActiveSymfony-bundle

modera/backend-on-steroids-bundle
=================================

Bundle makes it easier to optimize MJR based backend's loading speed for up to 50%.

v2.0.0(1y ago)055.4k—5.9%2MITPHPPHP &gt;=7.4

Since Sep 15Pushed 7mo ago3 watchersCompare

[ Source](https://github.com/modera/ModeraBackendOnSteroidsBundle)[ Packagist](https://packagist.org/packages/modera/backend-on-steroids-bundle)[ RSS](/packages/modera-backend-on-steroids-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (14)Used By (0)

ModeraBackendOnSteroidsBundle
=============================

[](#moderabackendonsteroidsbundle)

Bundle makes it easier to optimize backend's loading speed for up to 50%, it does it in several ways:

- Provides console commands which can generate shell scripts which can be used to compile all bundle's extjs classes together using Sencha Cmd. Using these scripts you will use Sencha Cmd without the need to learn how to use and configure it, it will be done for you behind the scene. **NB! Generated scripts rely on Docker!**
- Ships a special resources-loader which makes it possible to automatically detect and include MJR.js and a javascript file which is compiled from bundles' javascript extjs-classes (with default configuration it is named `bundles.js`).
- Using a semantic configuration makes it possible to mark certain bundles (using regex-like syntax) and their javascript files as non-blocking resources. This is especially useful when there're bundles whose assets are not designated as non-blocking but in fact they are and you want to override this behaviour, make them load asynchronously.

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

[](#installation)

Add this dependency to your composer.json:

```
"modera/backend-on-steroids-bundle": "~1.0"

```

Update your AppKernel class and add ModeraBackendOnSteroidsBundle declaration there:

```
new Modera\BackendOnSteroidsBundle\ModeraBackendOnSteroidsBundle()

```

Documentation
-------------

[](#documentation)

Once you have installed the bundle please use `modera:backend-on-steroids:generate-scripts` command, once executed it will generated four shell scripts for you:

- `steroids-setup.sh` - This script will prepare an extjs workspace for you that will be used to compile your assets using Sencha Cmd
- `steroids-compile-bundles.sh` - Once you have steroids set up and your extjs classes copied (use `modera:backend-on-steroids:copy-classes-to-workspace`for that) you can invoke this command and have all your installation extjs classes will be compiled together, the result, if no configuration changed, will copied to `web/backend-on-steroids/bundles.js` file.
- `steroids-compile-mjr.sh` - compiles MJR for you and places it, if no semantic configuration is modified, to `web/backend-on-steroids/MJR.js`
- `steroids-cleanup.sh` - If you don't anymore need extjs-workspace then you can use this script and it will delete all developers files that were created to setup extjs-workspace (your compiled extjs classes won't be touched)

See `Modera\BackendOnSteroidsBundle\DependencyInjection\Configuration` for a full list of available configuration properties.

In order to make your extjs classes visible to `modera:backend-on-steroids:copy-classes-to-workspace`, you need to contribute to `modera_backend_on_steroids.extjs_classes_paths` extension-point *or* if you are not going to distribute your bundles you can use `modera_backend_on_steroids/compiler/path_patterns` configuration property.

### Typical workflow

[](#typical-workflow)

1. $ `app/console modera:backend-on-steroids:generate-scripts`
2. Make generated scripts executable (when `modera:backend-on-steroids:generate-scripts` is executed required shell command is printed that you can use)
3. $ `./steroids-setup.sh`
4. $ `app/console modera:backend-on-steroids:copy-classes-to-workspace`
5. $ `./steroids-compile-bundles.sh`
6. $ `./steroids-compile-mjr.sh`

Once this steps are completed, given that you haven't changed this bundle's semantic configuration `compiler/path_patterns` property), when you refresh backend you should see that MJR.js and bundles.js are automatically included using "script" tags. Script `steroids-setup.sh` you need to execute only once per foundation installation or after you have used `steroids-cleanup.sh`.

### Troubleshooting

[](#troubleshooting)

#### Sencha Cmd not finding classes

[](#sencha-cmd-not-finding-classes)

If, while executing `./steroids-compile-bundles.sh` you are getting BUILD FAILED similar to this one:

```
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.ExBuild: Failed to find any files for /var/www/packages/bundles/src/MyCompany/mypackage/CustomerHistory.js::ClassRequire::MyCompany.mypackage.CustomerHistoryActivity
[ERR]
[ERR] Total time: 21 seconds
[ERR] The following error occurred while executing this line:
/var/www/packages/bundles/.sencha/package/build-impl.xml:137: The following error occurred while executing this line:
/var/www/packages/bundles/.sencha/package/js-impl.xml:32: com.sencha.exceptions.ExBuild: Failed to find any files for
/var/www/packages/bundles/src/MyCompany/mypackage/CustomerHistory.js::ClassRequire::MyCompany.mypackage.CustomerHistoryActivity

```

It means that your file, which in this case is located at `/var/www/packages/bundles/src/MyCompany/mypackage/CustomerHistory.js`is referencing a class `MyCompany.mypackage.CustomerHistoryActivity` which Sencha Cmd compiler cannot find. This usually means one of two things:

- `modera:backend-on-steroids:copy-classes-to-workspace` command didn't find a directory where `MyCompany.mypackage.CustomerHistoryActivity` is located and therefore could not properly prepare steroids' workspace. To solve this problem you need to find where CustomerHistoryActivity.js file is located and update `modera_backend_on_steroids/path_patterns` configuration property. For more details please see `\Modera\BackendOnSteroidsBundle\DependencyInjection\Configuration`. Once configuration property is updated, don't forget to run `modera:backend-on-steroids:copy-classes-to-workspace` again. If you checked your project and still couldn't find `CustomerHistoryActivity.js` file anywhere, chances are that you are dealing with the second case:
- `CustomerHistoryActivity` class has been deleted, but developer simply forgot to update `CustomerHistory` class to remove `CustomerHistoryActivity` from its dependencies. In this case what you need to do is to open `CustomerHistory.js` file, locate its `requires` or similar dependency declaration block and remove `CustomerHistoryActivity` from there. Once its done you can run `modera:backend-on-steroids:copy-classes-to-workspace` and then `./steroids-compile-bundles.sh`.

Licensing
---------

[](#licensing)

This bundle is under the MIT license. See the complete license in the bundle: Resources/meta/LICENSE

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance52

Moderate activity, may be stable

Popularity31

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 59.6% of commits — single point of failure

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 ~273 days

Recently: every ~708 days

Total

13

Last Release

624d ago

Major Versions

v1.4.0 → v2.0.02024-09-02

PHP version history (3 changes)v1.0PHP &gt;=5.4.0

v1.4.0PHP &gt;=5.6

v2.0.0PHP &gt;=7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6311198?v=4)[Modera Software](/maintainers/modera)[@modera](https://github.com/modera)

---

Top Contributors

[![sergeil](https://avatars.githubusercontent.com/u/425579?v=4)](https://github.com/sergeil "sergeil (28 commits)")[![cravler](https://avatars.githubusercontent.com/u/157440?v=4)](https://github.com/cravler "cravler (15 commits)")[![LiSinCin](https://avatars.githubusercontent.com/u/6211954?v=4)](https://github.com/LiSinCin "LiSinCin (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/modera-backend-on-steroids-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/modera-backend-on-steroids-bundle/health.svg)](https://phpackages.com/packages/modera-backend-on-steroids-bundle)
```

PHPackages © 2026

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