element119 / module-indexer-deploy-config

element119/module-indexer-deploy-config

A Magento 2 module that allows developers to lock indexer modes via deployment config.

  • Kiel Pykett
magento2-module Compatibility: 2.4.7-2.4.8 Code Quality: Fail Tests: N/A Security: Pass OSL-3.0

element119 | Indexer Deploy Config

A Magento 2 module that allows developers to lock indexer modes via deployment config.


github release
github release date
license
packagist downloads

📝 Features

✔️ Allows you to selectively lock indexer modes via the app/etc/config.php file

✔️ Indexer configuration validated and imported as part of app:config:import

✔️ Supports custom indexers

✔️ Provides messaging for admins to see which indexers are locked via deploy config

✔️ Informs admins when they try to change indexer modes that are locked via deploy config

✔️ Supports Magento Open Source and Adobe Commerce

✔️ Supports Hyvä and Luma based themes

✔️ Seamless integration with Magento

✔️ Built with developers and extensibility in mind to make customisations as easy as possible

✔️ Installable via Composer


🔌 Installation

Run the following command to install this module:

composer require element119/module-indexer-deploy-config
php bin/magento setup:upgrade

⏫ Updating

Run the following command to update this module:

composer update element119/module-indexer-deploy-config
php bin/magento setup:upgrade

❌ Uninstallation

Run the following command to uninstall this module:

composer remove element119/module-indexer-deploy-config
php bin/magento setup:upgrade

📚 User Guide

Locking Indexer Modes

  1. Add a new indexers array to the app/etc/config.php file
  2. Add the realtime or schedule arrays to the indexers array as required
  3. Specify the indexer IDs you want to lock to a specific mode within the respective mode array

Example

'indexers' => [
    'realtime' => [
        'catalogrule_rule',
        'design_config_grid',
    ],
    'schedule' => [
        'catalog_category_product',
        'catalog_product_category',
        'catalog_product_attribute',
        'catalog_product_price',
    ],
],

Note

Empty indexer mode arrays may be omitted in the cases where you don't want to lock any indexers to that mode.


Indexer Mode Locking Cron Fallback

A new system configuration option allows you to enable a cron job that will ensure indexers are in the mode they are
supposed to be in, according to deployment config. This option can be found in Stores -> Configuration -> Advanced -> System -> Indexer Mode Locking.

indexer-mode-locking-cron-config


indexer:lock-all Command

The module adds a new indexer:lock-all command that you can use to lock the indexer modes via the command line.

Description:
  Lock all indexers

Usage:
  indexer:lock-all [options]

Options:
  -m, --mode=MODE       Passing one of two modes (schedule, realtime) will lock all indexers to that mode.
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Note

You will need to run app:config:import after indexer modes have been set, unset, or changed in the deploy config.

Due to the fact that this new command writes to the deploy config files and this module makes
additions to the deploy config pool,
any automated deployment pipelines will need to run app:config:import in non-interactive mode by passing either
-n or --no-interaction as command options to avoid the usual prompt.


no command arguments

No arguments locks the indexer modes to their current state.


realtime argument

Passing -m realtime as the argument sets all indexers to Update on Save.


schedule argument

Passing -m schedule as the argument sets all indexers to Update by Schedule.


Restricted Admin Controls

restrictded-admin-controls


No changelog yet

The vendor hasn't published a changelog. Tagged releases appear in the Versions tab.

Versions
Version Stability QA Status Compatibility Released
1.2.5 stable Fail Magento 2.4.7-2.4.8 Details 2025-06-08 20:21:03
1.2.4 stable Not tested Not yet tested Details 2025-05-01 15:30:29
1.2.3 stable Not tested Not yet tested Details 2023-03-17 21:13:37
1.2.2 stable Not tested Not yet tested Details 2023-02-27 21:14:59
1.2.1 stable Not tested Not yet tested Details 2023-02-27 21:10:14
1.2.0 stable Not tested Not yet tested Details 2023-02-25 17:23:54
1.1.1 stable Not tested Not yet tested Details 2022-11-08 13:10:49
1.1.0 stable Not tested Not yet tested Details 2022-11-07 22:15:58
1.0.0 stable Not tested Not yet tested Details 2022-11-06 19:16:04

Requires 2

Package Constraint
magento/module-indexer ^100.0
php ^7.4 || ^8.0

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.

Compatibility matrix (Magento × PHP)
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 Pass Pass
2.4.8 Pass Pass
2.4.9 Fail di error Fail di error

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.

Static analysis results
Tool Status Findings Summary
PHPCS Warning 6 6 warnings (ruleset: Magento2) — 2 auto-fixable with phpcbf
PHPMD Warning 9 9 rule violations (IfStatementAssignment:5, CyclomaticComplexity:2, NPathComplexity:2)
Cpd Pass 0
Composer validate Pass 0

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.

PHPStan results by Magento and PHP version
Magento PHP 8.2 PHP 8.3 PHP 8.4 PHP 8.5
2.4.7 9 9
2.4.8 9 9
2.4.9 10 10

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

Unit tests results by Magento and PHP version
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

Integration tests results by Magento and PHP version
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.

Security results
Tool Status Findings Summary
Composer audit Pass 0
License
OSL-3.0
Authors

More from element119

View vendor
Make it pay

Turn 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.