Documentation
Welcome to the php-via docs. Pick a path below depending on where you're starting from.
New to php-via?
Start with the tutorial. It walks you through building a reactive counter from scratch and introduces all three core primitives (signals, actions, views).
Upgrading from 0.13?
Upgrading to 0.14 takes a 0.13 app to 0.14 in the order the errors appear, with a worked example.
Understand the concepts
- Signals: reactive state and how it binds to the DOM
- Actions: server-side event handlers
- Views: what a tab shows, how it updates and when tabs share a render
- Scopes: TAB, ROUTE, SESSION, GLOBAL, and custom
- Components: isolated sub-contexts for composable UI
- Composition: class-based pages and components with PHP attributes
- Broadcasting: pushing updates to groups of clients
- Lifecycle: connect, disconnect, revival, timers and cleanup
Guides
- Middleware: PSR-15 middleware, auth, plain routes, security
- Templates: shells, the page bootstrap, Twig and other engines, CSP
- Web components: Rocket and Starbase components on php-via pages
- Dev Bar: traces, signals, patches and logs in the page
- Development: the dev server, hot reload and tests
- Deployment with OpenSwoole and Caddy
- Multi-node broker: broadcasts across workers and servers
- Performance: what a page view, a tab, an action and a broadcast cost, and how many fit on a server
Background
- Design decisions: why persistent SSE, server-side state, and declarative scopes
Reference
- API reference: every public method with its signature
- Comparison with other frameworks
- Common pitfalls: bugs that are easy to hit and hard to diagnose
- Changelog ↗