Search by

bytic / dispatcher

gabrielsolomon

dispatcher bytic framework

Package info

github.com/bytic/dispatcher

pkg:composer/bytic/dispatcher

Statistics

Installs: 7 611

Dependents: 7

Suggesters: 0

Stars: 0

Open Issues: 0

2.0.2 2026-11-25 12:46 UTC

README

ByTIC Dispatcher component

Latest Version on Packagist Latest Stable Version Latest Unstable Version

Software License Build Status SensioLabsInsight Quality Score StyleCI Total Downloads

Compatibility

The existing ByTIC dispatcher API remains available. The dispatcher accepts both ByTIC HTTP requests and PSR server requests; ByTIC HTTP 2.x uses Symfony-backed requests rather than implementing the PSR request interface directly. For request-based controller resolution, the request must expose ByTIC's module, controller and action accessors; a generic PSR request alone is not sufficient.

Preconstructed controllers do not need to extend a ByTIC controller or implement setRequest(). For example:

$result = $dispatcher->call(
    ['instance' => $controller, 'action' => 'show'],
    ['id' => 42]
);

This is an incremental integration point, not Symfony's controller resolver: the caller is responsible for constructing the controller and supplying its arguments. Controllers with setRequest() continue to receive the request and must accept the request type being passed. For legacy ByTIC controllers, a Symfony-backed ByTIC request is supplied through ByTIC's PSR request bridge.

Symfony 8 requires PHP 8.4 or newer and compatible versions of the installed ByTIC packages, including bytic/http 2.x. Current bytic/controllers releases restrict Symfony packages to version 7 or earlier; applications using that optional package must wait for a compatible release before upgrading to Symfony 8. Install bytic/controllers separately to run the controller integration tests against the real ByTIC controller.