reach-digital / magento2-inventory-source-reservations
reach-digital/magento2-inventory-source-reservations
Magento 2 Inventory Source Reservations
Ability to register reservations on sources. Allows us to defer the actual
source deduction further by allowing us to reserve qty's on the source.
This allows us to create other functionalities on top:
- https://github.com/ho-nl/magento2-ReachDigital_InventoryOrderSourceReservations Introduce source reservation for all orders placed.
- https://github.com/ho-nl/magento2-ReachDigital_ShConnector Specific warehouse integration.
- [https://github.com/ho-nl/magento2-ReachDigital-TransferOrdersES] Reserve incoming inventory
API
- AppendReservations:
Allows us to append new reservations for a given SKU. - GetSourceReservationsQuantity
Allows us to get the reservations for a certain source.
Indexer
First we create an inventory*source_reservation table where source reservations
can be appended to. When the inventory_stock*\* is indexed it will also add
the source reservation sums. This updates the aggregated stock ('salable qty')
with all the source reservations.
We now have an accurate stock index with all the source reservations included.
There are other parts that don't use the indexed amount, and we need to append the
source reservation to the stock reservation:
GetSourceReservationsQuantityInterface
Commits
A commit is validated with https://github.com/conventional-changelog/commitlint
Gittower: Gittower doesn't properly read your PATH variable and thus commit
validation doesn't work. Use gittower . to open this repo.
No changelog yet
The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.
| Version | Stability | QA Status | Compatibility | Released |
|---|---|---|---|---|
| 1.4.3 | stable | Fail | Not compatible Details | 2021-07-14 10:55:11 |
| 1.4.3-canary.1 | stable | Not tested | Not yet tested Details | 2020-10-08 18:59:07 |
| 1.4.2 | stable | Not tested | Not yet tested Details | 2020-10-08 16:56:43 |
| 1.4.1 | stable | Not tested | Not yet tested Details | 2020-08-04 21:42:06 |
| 1.4.0 | stable | Not tested | Not yet tested Details | 2020-08-04 21:32:34 |
| 1.3.0 | stable | Not tested | Not yet tested Details | 2020-06-23 12:23:31 |
| 1.2.0 | stable | Not tested | Not yet tested Details | 2020-06-19 12:45:46 |
| 1.1.0 | stable | Not tested | Not yet tested Details | 2020-06-19 12:44:31 |
| 1.0.1 | stable | Not tested | Not yet tested Details | 2020-01-20 15:23:11 |
| 1.0.0 | stable | Not tested | Not yet tested Details | 2019-10-11 09:46:57 |
Requires 2
| Package | Constraint |
|---|---|
| php | ~7.1.3||~7.2.0||~7.3.0||~7.4.0 |
| magento/framework | * |
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 | Fail unknown | 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 | Warning | 9 | 9 warnings (ruleset: Magento2) — 1 auto-fixable with phpcbf |
| PHPMD | Warning | 8 | 8 rule violations (UnusedFormalParameter:8) |
| Cpd | Warning | 1 | 1 duplicated chunk spanning 18 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Info | 1 | valid; 1 advisory note (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. Cell → details modal.
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
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 reach-digital
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.