fortephp/forte
Forte is a Laravel package that provides a clean, expressive API for common application needs, with sensible defaults, flexible configuration, and seamless framework integration. It helps developers reduce boilerplate, ship features faster, and keep their codebase organized and maintainable.
Architecture fit. Forte sits in the tooling layer, not the application layer. Nothing in a standard Laravel request lifecycle needs to re-parse Blade into an AST — Laravel's own compiler already transforms views to cached PHP at render time. Forte only earns its place where we need to treat Blade source as data: custom static analysis, house lint rules, automated codemods (e.g., bulk-migrating legacy @include partials to components), documentation generation from templates, or a bespoke templating layer on top of Blade syntax. If no such initiative is on the roadmap, architecture fit is low irrespective of package quality. This is an enabler for a specific class of work, not infrastructure.
Integration feasibility. Mechanically trivial: Composer-installable, PSR-4, MIT-licensed, no runtime service dependency. The real feasibility question is grammar coverage, not installation. Blade is a loosely specified superset of HTML + PHP with directives, components, slots, anonymous components, @props, @verbatim, and user-defined custom directives. Any third-party parser is chasing a moving target.
Technical risk.
Key questions for the maintainer / spike.
@verbatim, anonymous components, @props, slot syntax, and custom directives — or only core directives?Stack fit. Fits cleanly as a require-dev dependency in a dedicated tooling repository or a tools/ path excluded from production autoloading. It must never enter the request path — the cost of parsing on every render would be a regression against Laravel's compiled-view cache.
Migration path. There is no migration; this is net-new capability. Frame it as: build a thin internal wrapper around Forte's parser so that (a) the rest of our tooling depends on our interface, not Forte's, and (b) swapping parsers later is a contained change.
Compatibility. Pin an exact version. Maintain our own compatibility matrix mapping Forte version → Laravel major → PHP version, and treat a Laravel upgrade as requiring a Forte re-validation gate.
Sequencing.
If the spike fails, the fallback is regex/line-based tooling for narrow rules, or forking — which is viable precisely because the package is MIT and small.
Maintenance. Low if confined to dev tooling; zero production blast radius. But we inherit fork risk: with one effective maintainer and 67 stars, assume we may need to vendor or patch. Budget a small ongoing allowance for that, not zero.
Support. Community-scale only. No vendor SLA, no paid support. Internal expertise must be built — identify one owner who understands the AST API. Expect to self-serve on documentation gaps.
Scaling. Parsing is CPU-bound and roughly linear in view count. Full-corpus runs in CI will add minutes at scale; mitigate with incremental parsing (changed files only) and caching parsed output keyed by file hash. Keep it out of pre-commit hooks if corpus is large.
Failure modes.
Ramp-up. Expect 1–2 days for a competent PHP engineer to become productive with AST traversal; longer if documentation is thin. Plan for a single owner plus a documented internal wrapper so the knowledge doesn't stay siloed.
How can I help you explore Laravel packages today?