- Issue created by @mondrake
- Assigned to mondrake
- Status changed to Needs work
9 months ago 7:20am 3 April 2024 - 🇮🇹Italy mondrake 🇮🇹
Working on this.
@dineshkumarbollu thanks for your patch. Unfortunately that wion't work on PHPUnit 10 whose error handler no longer converts warnings/errors to exceptions. Please also not that now the preferred way to contribute is by opening Merge Requests; the patch workflow is being abandoned.
- 🇮🇳India dineshkumarbollu
@mondrake, Thanks for your reply, I will make MR's instead of patches from next time.
- Issue was unassigned.
- Status changed to Needs review
9 months ago 12:35pm 3 April 2024 - Status changed to Needs work
9 months ago 12:29pm 4 April 2024 - 🇬🇧United Kingdom longwave UK
IMHO this should just be an exception, if the variable names aren't allowed we should prevent route building.
- Status changed to Needs review
9 months ago 1:09pm 4 April 2024 - Status changed to RTBC
9 months ago 2:11pm 9 April 2024 - 🇺🇸United States smustgrave
Seems straight forward with updating to use an exception vs trigger_error. All green so believe the update is good.
- 🇬🇧United Kingdom catch
Agreed with this but do we need a CR for 11.x to say the behaviour's changed? On the other hand the PHP warning should already be pretty loud.
- 🇬🇧United Kingdom longwave UK
Personally, I think no; if you were triggering this before you were doing something wrong, and now we're just a lot louder about it.
- 🇬🇧United Kingdom longwave UK
@catch you previously agreed an exception was OK here but Crell and sun went the other way in the end! #2051877-31: Log error when people use invalid route parameters →
- Status changed to Fixed
9 months ago 5:49pm 9 April 2024 - 🇬🇧United Kingdom catch
OK I think the PHP warning having been in for 11 years means people should have found any bugs like this by now. I do wonder a bit how we'll handle new exceptions from existing code in the future, but maybe @trigger_error() and assert() in a minor then throw exception in the next major would work for most things? We didn't have either deprecation support or assert() when we first started doing this pattern.
Committed/pushed to 11.x, thanks!
Automatically closed - issue fixed for 2 weeks with no activity.