Security update for Core, with self-updated composer
[yaffs-website] / vendor / psy / psysh / src / Psy / Command / ListCommand / ClassConstantEnumerator.php
index ff3e7ea748787b57436148f953be887e1ff8081e..fc974b2d944d4ec2061d49c964ffefea5c2bf5b0 100644 (file)
@@ -77,8 +77,9 @@ class ClassConstantEnumerator extends Enumerator
             $constants[$name] = $constReflector;
         }
 
-        // @todo this should be natcasesort
-        ksort($constants);
+        // @todo switch to ksort after we drop support for 5.3:
+        //     ksort($constants, SORT_NATURAL | SORT_FLAG_CASE);
+        uksort($constants, 'strnatcasecmp');
 
         return $constants;
     }