Skip to content
byticPublic

About

router component for bytic

Resources

Stars

0 stars

Watchers

2 watching

Forks

Repository files navigation

Router

ByTIC Router component

Latest Version on Packagist Latest Stable Version Latest Unstable Version

Software License Symfony compatibility SensioLabsInsight Quality Score StyleCI Total Downloads

Compatibility

The router supports Symfony Routing, Config and HttpFoundation 5 through 8. Symfony 8 requires PHP 8.4 or newer; Composer selects compatible versions for older PHP releases. Existing Nip routes and helpers remain available, and standard Symfony routes can be loaded, matched and generated alongside them.

For example, a Symfony loader can be passed directly to the router:

use Nip\Router\Router;
use Symfony\Component\Routing\Loader\ClosureLoader;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;

$router = new Router(new ClosureLoader(), function () {
    $routes = new RouteCollection();
    $routes->add('article', new Route('/articles/{id}'));

    return $routes;
});

$url = $router->generate('article', ['id' => 42]);

The compatibility workflow tests matching Symfony component versions in an isolated installation. Some optional ByTIC integrations may have narrower Symfony version constraints of their own.

About

router component for bytic

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages