- First commit to issue fork.
- 🇦🇺Australia pameeela
This is still valid, but I think there's a better way to do it now. Created an MR using
if (!str_starts_with($path, '/'))
. I didn't include the assert because I don't understand why it's necessary but easy to add if others think it is.Noting also there are three other instances of
if ($path[0] !== '/')
in the code, not sure if we want to change all of them here or not. - Status changed to Needs review
over 1 year ago 5:13am 26 March 2024 - 🇳🇱Netherlands Lendude Amsterdam
I see plenty of coverage for this method in \Drupal\Tests\path_alias\Unit\AliasManagerTest but none that tests the exception being thrown (as far as I can tell), so probably good to add a small test method there that tests this
- 🇦🇺Australia pameeela
@catch also said in Slack that we should update all of the instances of this. But given that it's somewhat widely used I'm thinking this is really a task to move away from the array syntax?
There are also actually seven instances rather than four, some were slightly different so didn't find them initially.
- 🇦🇺Australia pameeela
Added the test (thanks @larowlan ;) ) and I think now that we're into tests territory the other instances should be handled separately. As that's a lot of changes to cram into this issue.
- Status changed to Needs work
over 1 year ago 1:44pm 28 March 2024 - 🇺🇸United States smustgrave
Can the issue summary be updated to use the issue summary template please.
- Status changed to RTBC
over 1 year ago 3:17pm 28 March 2024 - Status changed to Fixed
over 1 year ago 2:23pm 29 March 2024 - 🇬🇧United Kingdom catch
Committed/pushed to 11.x and cherry-picked to 10.3.x, thanks!
Automatically closed - issue fixed for 2 weeks with no activity.