Skip to content

T16559 router params#16964

Merged
niden merged 2 commits into5.0.xfrom
T16559-router-params
May 2, 2026
Merged

T16559 router params#16964
niden merged 2 commits into5.0.xfrom
T16559-router-params

Conversation

@niden
Copy link
Copy Markdown
Member

@niden niden commented May 2, 2026

Hello!

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I have updated the relevant CHANGELOG
  • I have created a PR for the documentation about this change

Fixed Phalcon\Mvc\Router::handle() leaving unmatched optional named parameters (e.g. {id:(/[0-9]+)?}{slug:(/.+)?}) in the resulting params with their raw regex group positions (id => 1, slug => 2) instead of unsetting them; the unset branch was nested under else of typeof converters === "array", but Route::$converters defaults to [] so the branch was unreachable. The check is now flattened so an unmatched positional parameter is removed when no per-part converter exists

Thanks

@niden niden requested a review from Jeckerson May 2, 2026 14:39
@niden niden self-assigned this May 2, 2026
@niden niden added bug A bug report status: medium Medium 5.0 The issues we want to solve in the 5.0 release labels May 2, 2026
@niden niden merged commit 62deeb1 into 5.0.x May 2, 2026
150 checks passed
@niden niden deleted the T16559-router-params branch May 2, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant