Skip to content
This repository was archived by the owner on Oct 10, 2024. It is now read-only.
This repository was archived by the owner on Oct 10, 2024. It is now read-only.

Wrong Routing Dataset - Router\Standard #50

Description

@brunoaugusto

Although the current implementation of Standard Router is already addressing the scenario described in the doc-comment of Next\Tools\RoutesGenerator\Annotations::sort() it doesn't consider cases in which the most generic route is also the longest route. E.g:

/management/actors/overview
/management/actors/add

These two routes, in the fictional movies database system example in the doc-comment mentioned above, could be used to describe, respectively, a small overview of all actors registered and a form to add new actors.

Conceptually the longest route here is less specific than the short one, but because they are are sorted in that way, because the sorting is done by the Routes Generator tool, the current implementation of SQLite REGEXP operator using preg_match() will return the first entry as positive for the second URI, because both of them have the immutable part management/actors

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions