Download the PHP package mbolli/php-via without Composer

On this page you can find all versions of the php package mbolli/php-via. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-via

php-via

Latest Version on Packagist Total Downloads License PHP Version CI PHPStan Docs

php-via

Real-time reactive web framework for PHP. Server-side reactive UIs with zero JavaScript, using OpenSwoole for async PHP, Datastar for SSE + DOM morphing, and Twig for templating.

Documentation & Live Examples

Why php-via?

Requirements

Installation

Quick Start

counter.html.twig:

Core Concepts

Full documentation at via.zweiundeins.gmbh/docs

Signals: reactive state that syncs between server and client

Actions: server-side functions triggered by client events

Important: Always trigger actions with @post() (or @patch/@put/@delete). @get() is blocked on /_action/…: GET requests return 405 Method Not Allowed, because allowing actions over GET enables top-level cross-site navigation CSRF.

Scopes: control who shares state and receives broadcasts

Scope Sharing Use Case
Scope::TAB Isolated per tab (default) Personal forms, settings
Scope::ROUTE All users on same route Shared boards, multiplayer
Scope::SESSION All tabs in same session Cross-tab state
Scope::GLOBAL All users everywhere Notifications, announcements
Custom ("room:lobby") All contexts in that scope Chat rooms, game lobbies

Views: Twig template files or inline strings

Path Parameters: auto-injected by name

Components: reusable sub-contexts with isolated state

Lifecycle Hooks

Route Groups: shared prefix and/or middleware

Broadcasting: push updates to other connected clients

Multi-node broadcasting: Redis and NATS brokers

By default php-via uses an InMemoryBroker that is correct for single-process deployments. To fan out broadcast() calls across multiple servers or containers, swap in RedisBroker or NatsBroker:

Both brokers reconnect automatically with exponential backoff (1 s → 30 s cap).

A GET /_health endpoint is available on every php-via server (no configuration needed):

Returns HTTP 503 when the broker is in the reconnect backoff window.

How it Works

Development

Hot PHP reload: edit a file in website/src/, the worker restarts automatically (~1 s) without dropping other connections. Twig templates are always live with no restart. See docs/development for the full workflow and how to replicate this pattern in your own project.

Credits

License

MIT


All versions of php-via with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
ext-openswoole Version *
starfederation/datastar-php Version ^1.0
twig/twig Version ^3.0
psr/http-server-middleware Version ^1.0
nyholm/psr7 Version ^1.8
openswoole/core Version ^22.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mbolli/php-via contains the following files

Loading the files please wait ...