Skip to content

withPath does not match path without ending slash #11

Closed

Description

@MartkCz

Version: dev-master

Bug Description

Different behavior of matching path and path/

Steps To Reproduce

$list = new RouteList();
$list->withPath('admin')
	->addRoute('[<presenter>]');
$list->addRoute('[<presenter>]');

var_dump($list->match(new Request(new UrlScript('http://localhost/admin/')))); // first route match
var_dump($list->match(new Request(new UrlScript('http://localhost/admin')))); // second route match

Expected Behavior

Both cases match first route

Activity

  1. added a commit that references this issue on Oct 9, 2023
    a9aaa01
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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions