msp / apienhancer
msp/apienhancer
MSP APIEnhancer
This module replaces MSP_APIBoost.
Install procedure
composer require msp/apienhancer
php bin/magento setup:upgrade
NOTE: If you are using Varnish see below
Features
- Internal cache support
- Varnish external support (see below)
- Products and categories automatic invalidation
- Support for group based catalog rules
Magento2 REST-API features enhancements:
- FIX: Catalog rules are not applied in REST-API
Varnish users should read below
Why you may need it?
While using Magento 2 REST API for decoupled frontend (e.g.: a ReactJS or AngularJS frontends), you need to access catalog, search and products.
Every time you perform a REST API call, no matter if you have a FPC configured or not, Magento will compute your request as it was the first one.
With this simple module you will be able to cache API REST requests and get up to a 50x performance boost.
Important: For Varnish users
In order to correctly handle cache invalidation and contents variation you should apply small variations to your varnish VCL file.
Add the following code to your Varnish configuration file at the beginning of vcl_hash section:
hash_data(regsub(std.tolower(req.http.Authorization), "^bearer\s\x22(\w+?):\w+?\x22", "\1"));
Implementation example:
import std
...
sub vcl_hash {
hash_data(regsub(std.tolower(req.http.Authorization), "^bearer\s\x22(\w+?):\w+?\x22", "\1"));
...
}
...
No changelog yet
The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.
| Version | Stability | QA Status | Compatibility | Released |
|---|---|---|---|---|
| 1.0.3 | stable | Fail | Not yet tested Details | 2018-09-26 08:18:14 |
| 1.0.2 | stable | Not tested | Not yet tested Details | 2017-09-28 11:36:36 |
| 1.0.1 | stable | Not tested | Not yet tested Details | 2017-09-14 13:49:40 |
| 1.0.0 | stable | Not tested | Not yet tested Details | 2017-06-12 12:18:03 |
Requires 2
| Package | Constraint |
|---|---|
| msp/common | * |
| php | ^7.0|^7.1 |
Compatibility
Each Magento release line is installed on its supported PHP versions, then the module is built (DI compilation + static-content deploy) and its unit and integration suites are run. The matrix shows the lines and PHP versions the module is confirmed to install and run on. Code-quality results further down (phpstan, phpcs, …) are reported separately and never affect compatibility.
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | not tested | not tested | ||
| 2.4.8 | not tested | not tested | ||
| 2.4.9 | not tested | not tested |
Code Quality
Advisory checks against the module's source. Static analysis runs once across the whole module; PHPStan re-runs per Magento + PHP version because resolvable symbols differ between releases. These NEVER affect the Compatibility badge. A phpcs finding can't make a module incompatible.
Static analysis
Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.
| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 26 | 8 errors, 18 warnings (ruleset: Magento2) — 4 auto-fixable with phpcbf |
| PHPMD | Warning | 10 | 10 rule violations (UnusedFormalParameter:4, IfStatementAssignment:3, UnusedLocalVariable:3) |
| Cpd | Pass | 0 | |
| Composer validate | Fail | 3 | 1 error, 2 warnings (composer validate --strict) |
PHPStan
Type-checks the module's PHP against a real Magento install at the configured gate level. Re-runs per Magento and PHP version because resolvable symbols differ between releases.
Tests
Unit and integration suites, run for each applicable Magento and PHP version. A test failure speaks to the module's behaviour, not its compatibility with a Magento line, so it is reported here separately and never reddens the compatibility matrix.
Unit tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Integration tests
| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | ||
| 2.4.8 | N/A | N/A | ||
| 2.4.9 | N/A | N/A |
Security
Security checks run directly against the module: an audit of its declared dependencies for known vulnerabilities (composer audit) and a scan of its source for malware and web-shell signatures. Each runs once. A malware detection fails the version outright.
More from msp
View vendorTurn an existing module into recurring revenue.
If you already maintain a Magento 2 module on GitHub or GitLab, listing it on Packagento takes about five minutes. We mirror your tags, handle distribution signing, and route paid licenses through Stripe Connect, so you can keep shipping the way you already do.