jeanmarcos / msi-core
Multi-Source Inventory as the single inventory system for Magento Open Source: one code path for every stock, no special Default Stock, and the cataloginventory_* tables no longer read or written. Derived from magento/inventory (Copyright Adobe), redistributed under AFL-3.0. Not affiliated with or e
Requires
- php: ~8.3.0||~8.4.0||~8.5.0
- magento/framework: >=103.0.9 <103.0.10
- magento/framework-message-queue: *
- magento/module-asynchronous-operations: *
- magento/module-backend: *
- magento/module-bundle: *
- magento/module-bundle-import-export: *
- magento/module-catalog: *
- magento/module-catalog-import-export: *
- magento/module-catalog-inventory: *
- magento/module-catalog-rule: *
- magento/module-catalog-search: *
- magento/module-checkout: *
- magento/module-config: *
- magento/module-configurable-product: *
- magento/module-customer: *
- magento/module-directory: *
- magento/module-eav: *
- magento/module-graph-ql: *
- magento/module-grouped-product: *
- magento/module-import-export: *
- magento/module-page-cache: *
- magento/module-product-alert: *
- magento/module-quote: *
- magento/module-quote-graph-ql: *
- magento/module-reports: *
- magento/module-sales: *
- magento/module-sales-inventory: *
- magento/module-shipping: *
- magento/module-store: *
- magento/module-ui: *
- magento/module-webapi: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
Replaces
- mage-os/module-inventory: *
- mage-os/module-inventory-admin-ui: *
- mage-os/module-inventory-advanced-checkout: *
- mage-os/module-inventory-api: *
- mage-os/module-inventory-bundle-import-export: *
- mage-os/module-inventory-bundle-product: *
- mage-os/module-inventory-bundle-product-admin-ui: *
- mage-os/module-inventory-bundle-product-indexer: *
- mage-os/module-inventory-cache: *
- mage-os/module-inventory-catalog: *
- mage-os/module-inventory-catalog-admin-ui: *
- mage-os/module-inventory-catalog-api: *
- mage-os/module-inventory-catalog-frontend-ui: *
- mage-os/module-inventory-catalog-rule: *
- mage-os/module-inventory-catalog-search: *
- mage-os/module-inventory-catalog-search-bundle-product: *
- mage-os/module-inventory-catalog-search-configurable-product: *
- mage-os/module-inventory-configurable-product: *
- mage-os/module-inventory-configurable-product-admin-ui: *
- mage-os/module-inventory-configurable-product-frontend-ui: *
- mage-os/module-inventory-configurable-product-indexer: *
- mage-os/module-inventory-configuration: *
- mage-os/module-inventory-configuration-api: *
- mage-os/module-inventory-distance-based-source-selection: *
- mage-os/module-inventory-distance-based-source-selection-admin-ui: *
- mage-os/module-inventory-distance-based-source-selection-api: *
- mage-os/module-inventory-elasticsearch: *
- mage-os/module-inventory-export-stock: *
- mage-os/module-inventory-export-stock-api: *
- mage-os/module-inventory-graph-ql: *
- mage-os/module-inventory-grouped-product: *
- mage-os/module-inventory-grouped-product-admin-ui: *
- mage-os/module-inventory-grouped-product-indexer: *
- mage-os/module-inventory-import-export: *
- mage-os/module-inventory-in-store-pickup: *
- mage-os/module-inventory-in-store-pickup-admin-ui: *
- mage-os/module-inventory-in-store-pickup-api: *
- mage-os/module-inventory-in-store-pickup-frontend: *
- mage-os/module-inventory-in-store-pickup-graph-ql: *
- mage-os/module-inventory-in-store-pickup-multishipping: *
- mage-os/module-inventory-in-store-pickup-quote: *
- mage-os/module-inventory-in-store-pickup-quote-graph-ql: *
- mage-os/module-inventory-in-store-pickup-sales: *
- mage-os/module-inventory-in-store-pickup-sales-admin-ui: *
- mage-os/module-inventory-in-store-pickup-sales-api: *
- mage-os/module-inventory-in-store-pickup-shipping: *
- mage-os/module-inventory-in-store-pickup-shipping-admin-ui: *
- mage-os/module-inventory-in-store-pickup-shipping-api: *
- mage-os/module-inventory-in-store-pickup-webapi-extension: *
- mage-os/module-inventory-indexer: *
- mage-os/module-inventory-low-quantity-notification: *
- mage-os/module-inventory-low-quantity-notification-admin-ui: *
- mage-os/module-inventory-low-quantity-notification-api: *
- mage-os/module-inventory-multi-dimensional-indexer-api: *
- mage-os/module-inventory-product-alert: *
- mage-os/module-inventory-quote-graph-ql: *
- mage-os/module-inventory-reservation-cli: *
- mage-os/module-inventory-reservations: *
- mage-os/module-inventory-reservations-api: *
- mage-os/module-inventory-sales: *
- mage-os/module-inventory-sales-admin-ui: *
- mage-os/module-inventory-sales-api: *
- mage-os/module-inventory-sales-async-order: *
- mage-os/module-inventory-sales-frontend-ui: *
- mage-os/module-inventory-setup-fixture-generator: *
- mage-os/module-inventory-shipping: *
- mage-os/module-inventory-shipping-admin-ui: *
- mage-os/module-inventory-source-deduction-api: *
- mage-os/module-inventory-source-selection: *
- mage-os/module-inventory-source-selection-api: *
- mage-os/module-inventory-stock-visualizer: *
- mage-os/module-inventory-swatches-frontend-ui: *
- mage-os/module-inventory-visual-merchandiser: *
- mage-os/module-inventory-wishlist: *
- magento/module-inventory: *
- magento/module-inventory-admin-ui: *
- magento/module-inventory-advanced-checkout: *
- magento/module-inventory-api: *
- magento/module-inventory-bundle-import-export: *
- magento/module-inventory-bundle-product: *
- magento/module-inventory-bundle-product-admin-ui: *
- magento/module-inventory-bundle-product-indexer: *
- magento/module-inventory-cache: *
- magento/module-inventory-catalog: *
- magento/module-inventory-catalog-admin-ui: *
- magento/module-inventory-catalog-api: *
- magento/module-inventory-catalog-frontend-ui: *
- magento/module-inventory-catalog-rule: *
- magento/module-inventory-catalog-search: *
- magento/module-inventory-catalog-search-bundle-product: *
- magento/module-inventory-catalog-search-configurable-product: *
- magento/module-inventory-configurable-product: *
- magento/module-inventory-configurable-product-admin-ui: *
- magento/module-inventory-configurable-product-frontend-ui: *
- magento/module-inventory-configurable-product-indexer: *
- magento/module-inventory-configuration: *
- magento/module-inventory-configuration-api: *
- magento/module-inventory-distance-based-source-selection: *
- magento/module-inventory-distance-based-source-selection-admin-ui: *
- magento/module-inventory-distance-based-source-selection-api: *
- magento/module-inventory-elasticsearch: *
- magento/module-inventory-export-stock: *
- magento/module-inventory-export-stock-api: *
- magento/module-inventory-graph-ql: *
- magento/module-inventory-grouped-product: *
- magento/module-inventory-grouped-product-admin-ui: *
- magento/module-inventory-grouped-product-indexer: *
- magento/module-inventory-import-export: *
- magento/module-inventory-in-store-pickup: *
- magento/module-inventory-in-store-pickup-admin-ui: *
- magento/module-inventory-in-store-pickup-api: *
- magento/module-inventory-in-store-pickup-frontend: *
- magento/module-inventory-in-store-pickup-graph-ql: *
- magento/module-inventory-in-store-pickup-multishipping: *
- magento/module-inventory-in-store-pickup-quote: *
- magento/module-inventory-in-store-pickup-quote-graph-ql: *
- magento/module-inventory-in-store-pickup-sales: *
- magento/module-inventory-in-store-pickup-sales-admin-ui: *
- magento/module-inventory-in-store-pickup-sales-api: *
- magento/module-inventory-in-store-pickup-shipping: *
- magento/module-inventory-in-store-pickup-shipping-admin-ui: *
- magento/module-inventory-in-store-pickup-shipping-api: *
- magento/module-inventory-in-store-pickup-webapi-extension: *
- magento/module-inventory-indexer: *
- magento/module-inventory-low-quantity-notification: *
- magento/module-inventory-low-quantity-notification-admin-ui: *
- magento/module-inventory-low-quantity-notification-api: *
- magento/module-inventory-multi-dimensional-indexer-api: *
- magento/module-inventory-product-alert: *
- magento/module-inventory-quote-graph-ql: *
- magento/module-inventory-reservation-cli: *
- magento/module-inventory-reservations: *
- magento/module-inventory-reservations-api: *
- magento/module-inventory-sales: *
- magento/module-inventory-sales-admin-ui: *
- magento/module-inventory-sales-api: *
- magento/module-inventory-sales-async-order: *
- magento/module-inventory-sales-frontend-ui: *
- magento/module-inventory-setup-fixture-generator: *
- magento/module-inventory-shipping: *
- magento/module-inventory-shipping-admin-ui: *
- magento/module-inventory-source-deduction-api: *
- magento/module-inventory-source-selection: *
- magento/module-inventory-source-selection-api: *
- magento/module-inventory-stock-visualizer: *
- magento/module-inventory-swatches-frontend-ui: *
- magento/module-inventory-visual-merchandiser: *
- magento/module-inventory-wishlist: *
README
Multi-Source Inventory as the only inventory system in Magento Open Source.
Upstream MSI ships with a second inventory system underneath it. The Default Stock is not a
stock: inventory_stock_1 is a MySQL view over cataloginventory_stock_status, the MSI indexer
skips stock 1 on purpose, and composite salability for that stock is computed by the legacy
CatalogInventory indexer. Around fifty if ($stockId === $defaultStockId) branches across twenty
modules keep the two worlds apart, each with its own data path.
msi-core removes that split. Stock 1 is indexed, configured, edited and deleted like a stock you
create yourself, the composite indexers cover it, and the cataloginventory_* tables are neither
read nor written by MSI.
One code path instead of two means a defect can no longer be fixed on one side of the if and
stay open on the other, and a new feature is written and tested once.
Which line do I install?
The same fork is distributed as two packages. This repository holds msi-core, which is a schema
upgrade; its sibling jeanmarcos-dev/inventory holds
three drop-in lines that replace the MSI shipped with your Magento version and change nothing else.
| Package | Repository | Magento | PHP | Drop-in |
|---|---|---|---|---|
jeanmarcos/inventory:2.4.7.* |
jeanmarcos-dev/inventory |
2.4.7 | 8.1 – 8.3 | yes |
jeanmarcos/inventory:2.4.8.* |
jeanmarcos-dev/inventory |
2.4.8 | 8.2 – 8.4 | yes |
jeanmarcos/inventory:2.4.9.* |
jeanmarcos-dev/inventory |
2.4.9 | 8.3 – 8.5 | yes |
jeanmarcos/msi-core:^1.0 |
jeanmarcos-dev/msi-core |
2.4.9 | 8.3 – 8.5 | no |
Mage-OS is supported on the 2.4.9 line and therefore on msi-core: the package replaces both the
magento/* and the mage-os/* MSI packages. Mage-OS 3.x tracks Magento 2.4.9.
Pick jeanmarcos/inventory if you want the curated fixes and nothing else to change. Composer
swaps the package, the module names and namespaces stay identical, and no migration runs.
Pick msi-core if you want one inventory system instead of two, and can accept a schema
migration with downtime and a documented break for code that reads cataloginventory_* by raw SQL.
The two packages provide the same modules, so a store runs one or the other, never both.
msi-coredeclares aconflictonjeanmarcos/inventory, so Composer refuses a tree holding both rather than producing a broken one. Migrating iscomposer remove jeanmarcos/inventory && composer require jeanmarcos/msi-core:^1.0.
Install
// composer.json { "repositories": [ { "type": "vcs", "url": "https://github.com/jeanmarcos-dev/msi-core" } ] }
composer require "jeanmarcos/msi-core:^1.0"
bin/magento maintenance:enable
bin/magento setup:upgrade
bin/magento indexer:reindex inventory catalog_product_price catalogsearch_fulltext
bin/magento cache:flush
bin/magento maintenance:disable
Read UPGRADE.md before running this on a store with data. The upgrade is a
maintenance operation with no downgrade path, and it is where the breaking changes are described.
The magento/framework constraint gates the install: Composer will not place msi-core on a
Magento version it was not built for.
After installing: run the salability consumer
bin/magento queue:consumers:start inventory.reservations.updateSalabilityStatus
This is a requirement, not a tuning recommendation. Placing a reservation publishes a message
that refreshes the index; if nothing consumes the queue, the table grows without bound and every
subsequent reservation pays for it. Measured on the reservation path: 14.2 ms with the queue
drained, 16.5 ms at 2568 pending rows, and the cost keeps climbing from there. The standard
consumers_runner cron covers this if you have it enabled.
If you also enable the storefront stock visualizer with the queue purge strategy, run
inventory.stockvisualizer.purge as well.
What else this fork changes
Beyond the Default Stock work, every line carries curated fixes, and the 2.4.9 line adds opt-in
features: source-level reservations, salable quantity broken down by source, and a storefront stock
visualizer. DISTRIBUTION.md describes each one, with its configuration path and
its caveats.
Documentation
UPGRADE.md |
Breaking changes, migration steps, what happens to the legacy tables, how to detect third-party code still writing them |
DISTRIBUTION.md |
What differs from upstream, feature by feature |
VERSIONING.md |
What a version number promises, and what counts as public API |
CHANGELOG.md |
Every change, with the version that carries it on each line |
InventoryStockVisualizer/README.md |
Configuration and cache invalidation of the availability panel |
For MSI itself — concepts, REST API, admin walkthroughs — Adobe's documentation still applies, since the module names, namespaces and service contracts are unchanged:
Contributing
Issues and pull requests are welcome at jeanmarcos-dev/msi-core, for the drop-in lines too — that repository is a fork and has its issue tracker disabled. Say which package and which Magento version you are on; the two repositories share this codebase, and a fix that applies to both is ported.
Commits follow Conventional Commits with a single-line
subject; a git hook enforces it. Changes to reservations, salability or the indexers must come with
the stress suite result. See CODE_OF_CONDUCT.md.
License and attribution
This is a modified derivative of magento/inventory
(Copyright Adobe), redistributed under AFL-3.0. Files derived from upstream keep Adobe's
original copyright and license notices; files original to this fork carry their own copyright under
OSL-3.0 / AFL-3.0. See LICENSE_AFL.txt and NOTICE.
Not affiliated with, endorsed by, or supported by Adobe. Magento and Adobe Commerce are trademarks of Adobe Inc.