I found some issues with the description of keys in section 1.2 of the 
PSR-16 spec.

First off:

"Implementing libraries MUST support keys consisting of the characters A-Z, 
a-z, 0-9, _, and . in any order in UTF-8 encoding and a length of up to 64 
characters."

So the only characters that MUST be supported are ASCII characters - but 
then, in the same sentence, UTF-8 encoding is stipulated?

If the only characters supported are ASCII characters, stipulating UTF-8 
encoding doesn't seem to make any sense.

Am I to understand that *if* the implementation supports more than the 
required ASCII characters, it must use UTF-8 encoding?

And if the implementation *does* support UTF-8, then presumably the 
stipulated minimum length is 64 Unicode runes? e.g. larger than the 64 
bytes required to support 64 ASCII characters?

Secondly:

"Libraries are responsible for their own escaping of key strings as 
appropriate, but MUST be able to return the original unmodified key string"

How?

To my understanding, there's no API in the specification that returns keys.

So this clause seems unnecessary? How the implementation stores keys 
internally, or whether it is able to recover them, doesn't seem like it 
should be a concern as such?

(Possibly, this clause was relevant to PSR-6 and may have carried over 
unintentionally?)

Thanks,
  Rasmus

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/422c33be-3158-4da8-ad24-fe1909c31516%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to