aura/view
Aura.View implements the TemplateView and TwoStepView patterns using PHP itself as the template language, with file-based and closure templates, helpers, and sections. No runtime dependencies; requires PHP 8.4+.
include/require layout logic — is exactly what this package replaces.7.0.0-beta1's, carried forward verbatim — nothing changed between beta1 and stable. Two consequences: (a) the beta-risk discount is now off, so 7.x can be scheduled on the roadmap rather than kept in a spike; (b) anyone who already validated against beta1 has zero upgrade delta — no re-test cycle, just a version pin.^8.4 (up from >=5.4.0) with native parameter/return types under declare(strict_types=1). Adoption is now a platform decision, not just a templating decision — sequence it behind (or alongside) the PHP 8.4 upgrade, never before it. This is the single hard gate on the whole package.ViewFactory::newInstance() now takes a ViewSpec per registry; config/Common.php and the extra.aura block are gone; the Aura\View\_Config\ PSR-4 entry and the aura/di dev dependency are removed).TemplateRegistryInterface, SearchPathInterface, and HelperRegistryInterface let us substitute module-aware registries (or precompiled name-to-file maps) instead of extending concrete classes. Path management is deliberately kept out of TemplateRegistryInterface so map-backed registries with no paths remain valid. Supports a "one template layer, many contributing modules" architecture — a build-vs-extend decision we can now make without forking.parent() renders the shadowed template by resuming search past the current directory. Search paths are first-hit-wins, so previously the shadowed file was simply unreachable — changing one block of a package template meant copying the whole file into a fork. Now only the diff ships. Directly enables white-label/brand variants and vendor-package overrides, and is the headline commercial reason to move to 7.x specifically.HelperRegistry::set() now throws HelperAlreadyRegistered on name collisions; override: true replaces deliberately, and is valid even when the name is free ("I accept replacing whatever is there"). has() is the way to branch. This forces an explicit answer to "who owns url/escape?" — valuable in multi-package apps, but a boot-time failure risk we must audit before rollout.getNamespaces() / getNamespacePaths() make "which directory did this template come from?" answerable without reflection — the first real answer to the multi-module path-contribution problem. getNamespacePaths() returns [] for an unregistered namespace rather than throwing.get() now guarantees \Closure, so $this binding works — and array callables that previously failed in bindTo() now work, fixing a latent bug) for reusable modals/cards without file overhead.TwoStepView for standardized headers/footers across many pages._sidebar.php) to DRY codebases.Aura.Html wiring continues to work unchanged, no adapter — the helpers parameter stays ?object by design, because a View reaches helpers only through __call() and typing to the interface would exclude valid managers.beginSection().include/require logic with structured render() calls.Adopt if:
parent() is the reason to move to 7.x specifically.Look Elsewhere if:
Aura.Html or bring your own.config/Common.php / extra.aura / Aura.Di 2.x kernel discovery, or on the Aura\View\_Config\ PSR-4 entry — that wiring is removed and must move into your framework's module class.Migration blockers to clear first (7.0.0 breaking changes):
setData($data)) must adopt matching native types or it fatals on load. This is the real migration surface, not callers.void and are not fluent — chained setter calls break. (Adding any return type is the break; void vs static only picks which one.)newInstance() long positional form replaced by ViewSpec objects ($helpers remains first, so newInstance() and newInstance($helpers) are unaffected; the long form fails with a \TypeError naming the parameter).has() or override: true. Registering the identical callable twice also throws. HelperRegistryInterface::set() gains the same third parameter, affecting anyone who already implements that interface.endSection() without beginSection() throws (was silent capture under a null key).'' (wrapped in layout if set) instead of throwing TemplateNotFound — don't rely on that exception to catch missing configuration.HelperNotFound (was a raw PHP Error); name-parse errors throw InvalidTemplateName (more than one ::) — catch Aura\View\Exception\*, not \InvalidArgumentException. Every exception now descends from Aura\View\Exception.SearchPathInterface if you contribute paths.InvalidHelpersObject is deprecated and never thrown (the ?object type means PHP's own \TypeError fires first). Retained so existing catch blocks resolve; removal in 8.0 — schedule the cleanup now.Executives:
"Aura.View 7.0.0 is now stable — the first GA release of the 7.x line, and unchanged since beta1, so there is no new technical risk to re-review. It's our server-side rendering layer: no JS templating, no runtime dependencies, MIT-licensed so procurement and legal are clean. The headline business capability is parent() — per-client and white-label template customization ships as a small diff instead of a forked package, which is where customization cost usually hides. The honest caveats: 7.x requires PHP 8.4, and the jump is 2.x → 7.x with no intermediate versions, so this is a funded migration tied to the platform upgrade, not a routine dependency bump. Scope it that way and the payoff is lower long-term maintenance on every customized page."
Engineering: *"What you get in 7.x (stable, no changes since beta1 — if you validated on beta, pin and ship):
parent(): render the shadowed template by resuming search past the current directory — override one block without copying the file.TemplateRegistryInterface / SearchPathInterface / HelperRegistryInterface: substitute a module-aware or precompiled registry without extending concrete classes. Path management deliberately lives outside TemplateRegistryInterface so map-backed registries remain valid.getNamespaces() / getNamespacePaths(): "which directory did this template come from?" is now answerable — previously it required reflection. Returns [] for an unregistered namespace instead of throwing.set() throws HelperAlreadyRegistered; override: true to replace on purpose. No more silent last-one-wins. Audit helper boot order before rollout — this fails at boot.Aura\View\Exception.ViewSpec groups map/paths/namespaces/extension per registry — the old flat signature interleaved view and layout settings and would have hit nine parameters.Aura.Html wiring is unchanged, no adapter — the helpers parameter stays ?object because the View only reaches helpers through __call().Cost: PHP 8.4 baseline, strict types, non-fluent setters, and a wiring change for newInstance(). Subclasses are the real migration surface, not callers."*
Devs: *"Pros:
parent() — stop copy-pasting vendor templates to tweak one section.beginSection('sidebar')).\Closure, so $this binding is reliable and templates are unit-testable (assertEquals($view(), $expected)). Array callables that used to blow up in bindTo() now work.Cons / gotchas:
void — no chaining.Aura.Html.has() or pass override: true in module boot.'', not an exception — don't rely on TemplateNotFound to catch missing configuration.Aura\View\Exception\*, not \InvalidArgumentException, around name lookups.InvalidHelpersObject is a no-op — kept only for legacy catch blocks; gone in 8.0."*How can I help you explore Laravel packages today?