Issue #3622716: Refuse an un-encodable variable in the client instead of letting a JsonException escape
LocalOrchestraClient::validateVariable() measured the value with a bare json_encode(), which answers FALSE for a value JSON cannot represent. That is no size to compare, so the check was skipped and validation passed; the engine then encoded the same value with JSON_THROW_ON_ERROR and raised, so a \JsonException came out of a method whose contract names OrchestraClientException.
It now encodes the way the engine does and turns the failure into that exception, naming the variable. The contract docblocks on OrchestraClientInterface say so for both write paths.
LocalOrchestraClientTest::testTheClientRefusesWhatJsonCannotCarry covers both paths with a non-UTF-8 string and NAN, and asserts nothing is stored and no instance is left behind. It was confirmed to fail against unpatched 1.x with JsonException: Malformed UTF-8 characters and to pass with the change.