Skip to content

fix(router): make currentSnapshot required in CanMatchFn#67452

Closed
atscott wants to merge 3 commits intoangular:mainfrom
atscott:requiresnapshotcanmatch
Closed

fix(router): make currentSnapshot required in CanMatchFn#67452
atscott wants to merge 3 commits intoangular:mainfrom
atscott:requiresnapshotcanmatch

Conversation

@atscott
Copy link
Copy Markdown
Contributor

@atscott atscott commented Mar 4, 2026

it was only optional to avoid a breaking change in a minor

BREAKING CHANGE: The currentSnapshot parameter in CanMatchFn and the canMatch method of the CanMatch interface is now required. While this was already the behavior of the Router at runtime, existing class implementations of CanMatch must now include the third argument to satisfy the interface.

@atscott atscott added the target: major This PR is targeted for the next major release label Mar 4, 2026
@pullapprove pullapprove bot requested review from JeanMeche and kirjs March 4, 2026 23:39
@atscott atscott added the requires: TGP This PR requires a passing TGP before merging is allowed label Mar 4, 2026
@angular-robot angular-robot bot added detected: breaking change PR contains a commit with a breaking change area: router labels Mar 4, 2026
@ngbot ngbot bot added this to the Backlog milestone Mar 4, 2026
Copy link
Copy Markdown
Member

@JeanMeche JeanMeche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed-for: public-api

@atscott atscott force-pushed the requiresnapshotcanmatch branch 2 times, most recently from a002c6b to 766e493 Compare March 5, 2026 00:09
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: migrations Issues related to `ng update`/`ng generate` migrations labels Mar 20, 2026
it was only optional to avoid a breaking change in a minor

BREAKING CHANGE: The `currentSnapshot` parameter in `CanMatchFn` and the `canMatch` method of the `CanMatch` interface is now required. While this was already the behavior of the Router at runtime, existing class implementations of `CanMatch` must now include the third argument to satisfy the interface.
@atscott atscott force-pushed the requiresnapshotcanmatch branch from e6f9930 to ee5115e Compare March 31, 2026 21:54
the third partial match snapshot parameter is now required in the types
since the Router always providers it
@atscott atscott force-pushed the requiresnapshotcanmatch branch from ee5115e to 504f25c Compare March 31, 2026 22:03
@atscott atscott requested a review from JeanMeche April 1, 2026 03:47
@atscott atscott removed the requires: TGP This PR requires a passing TGP before merging is allowed label Apr 1, 2026
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Apr 2, 2026
@atscott
Copy link
Copy Markdown
Contributor Author

atscott commented Apr 2, 2026

This PR was merged into the repository. The changes were merged into the following branches:

@atscott atscott closed this in 5794401 Apr 2, 2026
atscott added a commit that referenced this pull request Apr 2, 2026
…7452)

the third partial match snapshot parameter is now required in the types
since the Router always providers it

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

Labels

action: merge The PR is ready for merge by the caretaker area: migrations Issues related to `ng update`/`ng generate` migrations area: router detected: breaking change PR contains a commit with a breaking change detected: feature PR contains a feature commit target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants