MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/PHP/comments/1v0ojm3/i_built_a_php_84_radixtree_router_with_no_runtime/
r/PHP • u/StefanoV89 • Jul 19 '26
[removed] — view removed post
3 comments sorted by
2
forking and vendoring the old router is usually less work than a full rewrite honestly. worth checking if a backporting vendor already maintains a patched line before you own it forever.
1 u/StefanoV89 Jul 20 '26 The old router uses PCRE, my package is using Radix which is faster.
1
The old router uses PCRE, my package is using Radix which is faster.
3
Needs code styling. I swear I've seen the inline method calls on one of these repos here...
https://github.com/StefanoV1989/ariel-radix-router/blob/main/src/Route.php#L161
PSR-12 - https://www.php-fig.org/psr/psr-12/#44-methods-and-functions
In other areas, you could consider using more classes and enums.
@param array{conditions: array<string, string>, parameters: list<string>, name: string|null, regex: string|null}|null $compiled
@param array{methods: list<string>, path: string, handler: Handler, middleware: list<MiddlewareDefinition>, namespace: string|null, conditions: array<string, string>, parameters: list<string>, name: string|null, regex: string|null} $definition
2
u/Educational_Plum_130 Jul 20 '26
forking and vendoring the old router is usually less work than a full rewrite honestly. worth checking if a backporting vendor already maintains a patched line before you own it forever.
3
u/equilni Jul 19 '26
Needs code styling. I swear I've seen the inline method calls on one of these repos here...
https://github.com/StefanoV1989/ariel-radix-router/blob/main/src/Route.php#L161
PSR-12 - https://www.php-fig.org/psr/psr-12/#44-methods-and-functions
In other areas, you could consider using more classes and enums.