Skip to content

Releases: php-compatible/router

Release list

v1.0.0

Choose a tag to compare

@daniel-samson daniel-samson released this 30 Dec 21:08

Router v1.0.0

Modern routing for legacy PHP applications — Write clean routes today, upgrade to modern frameworks tomorrow.

Features

  • PHP 5.5 - 8.5 Compatible — Same API across all versions
  • Three Routing Styles:
    • File-Based Routing — Drop-in routing for existing PHP file structures
    • Functional Routing — Full control with simple functions
    • Modern Routing — Clean Router::get() style with auto JSON conversion
  • Route Groups — Organize routes with common prefixes
  • Middleware Support — Add authentication, logging, etc.
  • PSR-7 Style Objects — ServerRequest, JsonResponse, HtmlResponse
  • HTTP Exceptions — HttpException::notFound() factory methods
  • Static File Routing — Serve CSS, JS, images with MIME detection
  • 98% Test Coverage — Thoroughly tested across all PHP versions

Installation

composer require php-compatible/router

Documentation

https://phpcompatible.dev/docs/category/router