-
-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Description
Upgrade the FastRoute dependency from ^1.3 to v2 when it reaches stable.
Current state:
- league/route depends on
nikic/fast-route ^1.3(released 2018) - FastRoute v2.0.0-beta1 was released March 2024 but has not progressed to stable
What v2 changes:
dispatch()returnsMatched|NotMatched|MethodNotAllowedresult objects instead of arraysRouteCollectorreplaced byConfigureRoutesinterfaceGroupCountBaseddispatcher marked as@final(breaks our current inheritance)- Built-in
GenerateUriinterface for reverse routing - Built-in
Cacheinterface - PHP 8.1+ minimum with strict types throughout
Required work:
- Replace Dispatcher inheritance with composition (the Dispatcher currently extends
GroupCountBased) - Adapt to new result object types in
matchRequest()anddispatchRequest() - Update
Router::prepareRoutes()for the newConfigureRoutesAPI - Potentially leverage v2's built-in URI generation for reverse routing (Reverse routing / URL generation from named routes #355)
- Potentially leverage v2's caching alongside our index-based approach
Prerequisite: FastRoute v2 reaching a stable release.
Target: 8.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels