- Issue created by @joachim
- 🇬🇧United Kingdom joachim
I'm assuming this is a bug -- this part of the code has no documentation: 🐛 PermissionHandler class docs to specify how permissions are sorted Active .
- First commit to issue fork.
- First commit to issue fork.
- @rckstr_rohan opened merge request.
- Status changed to Needs work
almost 2 years ago 4:59am 12 April 2023 - 🇮🇳India rckstr_rohan
failed cases indentified Deprecated NULL placeholder value for key (%type_name), would refine more on it.
until the issue is not resolved, https://www.drupal.org/project/drupal/issues/3350482 🐛 PermissionHandler class docs to specify how permissions are sorted Active can't be moved. - 🇫🇷France vbouchet
@joachim I am using php 8.1, I tried a basic test and I don't get the same result as you described:
$permissions = [ 'use bar in specific way alpha', 'use foo in another specific way', 'use foo', 'use bar in specific way beta', 'use bar', ]; uasort($permissions, function ($perm1, $perm2) { return $perm1 <=> $perm2; }); var_dump($permissions);
It gives
array(5) { [4]=> string(7) "use bar" [0]=> string(29) "use bar in specific way alpha" [3]=> string(28) "use bar in specific way beta" [2]=> string(7) "use foo" [1]=> string(31) "use foo in another specific way" }
Am I right saying that it is the expected result?
- 🇬🇧United Kingdom joachim
Yeah, so am I with that snippet.... something else must be going on then!
- last update
over 1 year ago Composer error. Unable to continue. - Status changed to Closed: duplicate
about 1 year ago 3:08pm 31 January 2024 - 🇬🇧United Kingdom longwave UK
Just spotted this on a customer site with inconsistent capitalisation, a content type with initials "R P" was sorted before a content type with initials "R a"
However this also looks to be a duplicate of #2804947: Permissions page order is incorrect → which solves this problem and another related one, closing as duplicate.