Overview
Follow each supported virtual-type chain to a concrete class and look for cycles. Resolve per-file development declarations separately when effective cross-file merge evidence is unavailable.
Why it Matters
A cyclic virtual type cannot provide a concrete construction 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
- Follow each supported virtual-type chain to a concrete class and look for cycles. Resolve per-file development declarations separately when effective cross-file merge evidence is unavailable.
- 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-integrity --rules=MB-0816 --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
- Check the reported DI declaration and its area override.
- Verify the affected class or service in staging.
- Rerun MB-0816 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
Virtual type A extends B; B extends A.
Pass Example
Virtual type A extends an indexed concrete Vendor\Model\Reader.
No cycle in the supported collected chain.
Scope and Evidence Limits
Rule revision: 2. Target modes: LOCAL.
Virtual type chains are acyclic and resolve to concrete classes in bounded indexed symbol context. Development without effective module order inspects each source declaration independently; cross-file effective resolution may remain unavailable.
Static declaration analysis only. Unresolved symbols and unsupported runtime or generated behavior are collection gaps.
Catalog coverage describes implementation capability, not a scan outcome. An incomplete manual review cannot establish that the criterion is satisfied.