Currently the path processor is invoked on every request. Instead of this it would be faster to only rename the admin paths after the routes are being rebuilt. For this the "routing.route_alter" event should be used. I will provide a patch that implements this.

Additionally I did some more refactoring and I noticed that the error message for the value mentions that only lowercased letters, digits and underscores are allowed while the regex was case insensitive and thus was allowing uppercased letters too. Since I don't see any harm in this I'm still allowing uppercased letters and also added hyphens since they might be useful too.

Comments

slootjes created an issue. See original summary.

slootjes’s picture

StatusFileSize
new44.27 KB

Here is the patch, I've included unit tests.

raphael apard’s picture

Thanks a lot for your work!
Sorry for my silence, a lot of work for me at this time.
I add you as maintainer so you can work directly on it.

slootjes’s picture

Great, thanks for your trust :) It would be great if you could also review the patch.

slootjes’s picture

Patch is applied to the 8.x-2.x branch.

slootjes’s picture

Status: Patch (to be ported) » Fixed
slootjes’s picture

Status: Fixed » Closed (fixed)