add missing MessageFormatter::parseMessage() method#582
Conversation
|
|
||
| public static function parseMessage(string $locale, string $pattern, string $message) | ||
| { | ||
| return static::create($locale, $pattern)->parse($message); |
There was a problem hiding this comment.
as parse is not implemented, how do this report missing support in the polyfill ? This static method does not give access to the error getters of the instance.
There was a problem hiding this comment.
I am not sure I understand what you mean. Is it that from your POV the exception message raised by parse() would be confusing?
There was a problem hiding this comment.
My understanding: parse() in the instance will not throw, it will only populate error as state in properties, which are supposed to be read, but no available when using the static API.
intl_get_error_code() / intl_get_error_message() are the global functions supposed to work for static methods, but here, not sure we can use them since they might be already declared when polyfilling a subpart of intl (guessing, I didn't double check this)
Which means we might prefer throwing as not implemented here and tell to use the non-static API?
No description provided.