Skip to content

v2.0.0

Choose a tag to compare

@SoloPHP SoloPHP released this 16 Oct 19:45
· 4 commits to main since this release

Breaking Changes

  • Router Dependency Injection: Router now injected via constructor instead of extending RouteCollector

    • Application no longer extends RouteCollector - add routes directly to router instance
    • Constructor now requires RouterInterface as first parameter
  • Router Interface: Uses Solo\Contracts\Router\RouterInterface for flexibility

    • solophp/router moved to suggested dependencies
    • Supports any router implementation
  • Request Attributes Changed:

    • route attribute replaced with handler and params
    • middleware key renamed to middlewares
  • Middleware Validation: Now requires MiddlewareInterface implementation

New Features

  • Default CORS Handler: Built-in CorsHandler class with configurable origins, methods, headers, credentials, and cache duration

Dependencies

  • Added: solophp/contracts: ^1.0, psr/http-server-middleware: ^1.0
  • Changed: solophp/router now optional (suggested)