Repository navigation
Description
Context
At main 15cac4c2, src/Infrastructure/View.php:32 still declares @phpstan-require-extends stdClass; src/Infrastructure/View/SimpleView.php:35-39 and src/Infrastructure/View/EmptyView.php:29-31 retain the inheritance and its old dynamic-property explanation. Templates now run in a separate scope (SimpleView.php:193-249), following #156/#174, and receive presenters per render (#173/#176).
phpstan.neon.dist:11-13 lists View and TemplateScope as universal object crates. That analyser configuration describes magic property access; it does not itself preserve runtime inheritance or permission to create dynamic properties on the view. Removing the requirement and removing the built-in inheritance are separate compatibility choices. Generated plugins may subclass SimpleView, check instanceof stdClass, or write properties outside templates.
Out of scope
Changing template isolation, presenter contracts, escaping or the debug/production rendering policy; implementing a removal before its compatibility ruling; raising the PHP floor.
Scope and next deliverable
Prepare a design proposal as a comment, comparing retaining the contract with correcting its explanation, removing the analyser requirement while retaining built-in inheritance, and removing both. Assess custom View implementations, SimpleView subclasses, instanceof checks and external dynamic-property writes. Recommend the smallest justified change and state migration costs. No proposal or removal is approved yet.
Acceptance criteria
- Verify where the scaffold and its tests still depend on stdClass, distinguishing static analysis from runtime behaviour.
- Post options, trade-offs, fit with the design principles and a recommendation, including the compatibility consequences for custom views/subclasses and PHP 7.4/8.2+.
- Give a verification plan preserving property reads, templates, presenters, partials, escaping and both debug modes; assess the API snapshot and analyser configuration.
- Identify the exact inherited-contract changes needing a maintainer ruling. After the proposal, add needs: decision and remove agent-ready; implementation waits for that ruling.
Verification
Review the cited declarations, tests/php/Unit/SimpleViewTest.php, SimpleViewPresenterTest.php, view-factory tests, and tests/php/Architecture/infrastructure-api.txt. The proposal includes eventual composer test and composer lint validation on the supported environments. This pass changes no PHP code.
Impact on generated plugins
Potentially breaking inherited/runtime and analyser contracts; keep breaking pending a concrete ruling. Priority p2: ordinary unscheduled cleanup of a now-obsolete template rationale. agent-ready authorizes proposal work only.
Updated 2026-10-24: Completed the stdClass investigation brief, corrected moved anchors and distinguished analyser crates from runtime inheritance. Added p2 and agent-ready for a proposal only; breaking stays and implementation needs a subsequent ruling. Reviewed origin/main 15cac4c2.
Activity
schlessera commentedon Oct 24, 2026
Triage (2026-10-24): Completed the stdClass investigation brief, corrected moved anchors and distinguished analyser crates from runtime inheritance. Added p2 and agent-ready for a proposal only; breaking stays and implementation needs a subsequent ruling.