Overview
The collected app/etc/env.php MAGE_MODE declaration equals production. Runtime environment overrides and actual web process state require separate evidence.
Why it Matters
Production mode is a useful release declaration because development behavior and build expectations differ. A mismatch can expose an incorrectly prepared deployment.
The mode flag does not compile the application by itself or guarantee that custom modules and PHP workers suppress all debug output.
Verification Steps
Manual Verification
- Inspect MAGE_MODE from the deployed env.php and compare it with the release's declared mode.
- Check the actual served release rather than a build workspace.
- Review runtime overrides and diagnostics separately.
Command / Review Sample
php -r '$c = require "app/etc/env.php"; echo ($c["MAGE_MODE"] ?? "<missing>"), PHP_EOL;'
Use the assessed Magento project and the appropriate application or read-only review account. Replace example hosts, paths and identifiers with the assessment scope; configuration and source fragments are illustrative.
Remediation / Fix Guidance
- Investigate and change: Inspect php bin/magento deploy:mode:show and the deployment pipeline. Prepare compilation/static assets and switch the production release to production mode using the supported deployment procedure during an approved release.
- Validate the change: Verify effective runtime/environment overrides and smoke-test storefront, Admin and checkout. A persisted MAGE_MODE declaration alone does not prove every worker uses it.
- Rerun MB-0031 against the same release, profile and relevant file/key/package scope; compare the new evidence and inspect any independent collection gaps.
Examples
Illustrative examples only. Interpret them within the current revision criterion above; missing collection evidence is unresolved, never PASS.
Fail Example
MAGE_MODE = developer
Pass Example
MAGE_MODE = production in the assessed deployed configuration.
Scope and Evidence Limits
Rule revision: 1. Target modes: LOCAL.
The collected app/etc/env.php MAGE_MODE declaration equals production. Runtime environment overrides and actual web process state require separate evidence.
The collected app/etc/env.php MAGE_MODE declaration equals production. Runtime environment overrides and actual web process state require separate evidence.
Catalog coverage describes implementation capability, not a scan outcome. An incomplete manual review cannot establish that the criterion is satisfied.