$wgVisualEditorAvailableNamespaces gets cast to an int very early.
|Resolved||None||T218645 Wikimaniawiki: enable VisualEditor in the "2019:" namespace|
|Resolved||matmarex||T219562 VE doesn't let you enable it in namespaces whose labels happen to be ints|
This is because of a limitation of PHP, from https://wiki.php.net/rfc/convert_numeric_keys_in_object_array_casts :
The first of these, the array, is an ordered map of integer or string keys to arbitrary values. There is no overlap between integer and string keys in arrays; if a string fits the format /^(0|(-?[1-9][0-9]*))$/ and is small enough (PHP_INT_MIN ≤ n ≤ PHP_INT_MAX), it is converted to an integer key. Such strings are termed numeric strings.
I wouldn't be surprised if this isn't the only bug caused by a numerical namespace label.
We mostly refer to namespaces by ID in config options, $wgVisualEditorAvailableNamespaces is just weird. We can easily make it check if the value is a valid namespace name first, and if it isn't, then treat it as ID. I have a patch for this but Gerrit just went down.