Overview
Read Composer config.platform.php and compare reported source features with that declared target. A feature check is bounded and cannot replace running on the intended PHP version.
Why it Matters
Newer PHP syntax can prevent a module from loading on its declared older target.
Interpret the reported resource and collection scope before making changes. Unsupported source, unresolved symbols and bounded collection gaps cannot establish a clean result.
Verification Steps
Manual Verification
- Read Composer config.platform.php and compare reported source features with that declared target. A feature check is bounded and cannot replace running on the intended PHP version.
- Inspect the reported file, declaration, package or evidence record in the same selected release. Keep source observations separate from effective runtime behavior.
- Apply the rule-specific remediation below, validate the affected behavior in staging, and rerun the same selection.
Command / Review Sample
php magebean.phar audit --path=/var/www/magento --profile=module-source --rules=MB-0819 --modules=Vendor_Module
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
- Review the exact reported source location and declared target.
- Validate the corrected code against the intended deployment in staging.
- Rerun MB-0819 with the same module selection.
Examples
Illustrative declaration/review examples, not recorded scan output. A pass example concerns only the stated predicate and supported collected scope.
Fail Example
config.platform.php: 7.4
Source uses a supported detector match for a PHP 8-only match expression.
Pass Example
config.platform.php: 8.1
The same match expression is compatible with this declared target.
Review deployment PHP and remaining syntax separately.
Scope and Evidence Limits
Rule revision: 1. Target modes: LOCAL.
Selected PHP files avoid enumerated language features introduced after Composer config.platform.php.
Bounded static detection. Findings apply to the documented syntax, declaration or flow patterns only.
Catalog coverage describes implementation capability, not a scan outcome. An incomplete manual review cannot establish that the criterion is satisfied.