Skip to content

Conversation

hrissan
Copy link
Contributor

@hrissan hrissan commented Aug 28, 2025

function for tests between C++ and PHP serializers. Will be removed together with C++ serializers.

tests_typed_rpc_tl_query_store
tests_typed_rpc_tl_query_result_store
tests_typed_rpc_tl_query_result_fetch

Functions called by C++ serializers, made public for PHP serializers. These functions will be moved into serialization context later together with parsing functions.

function set_last_stored_tl_function_magic ($magic ::: int);
function set_current_tl_function($name ::: string);
function raise_fetching_error($text ::: string);
function raise_storing_error($text ::: string);

Functions to implement by PHP serializers.

interface RpcFunction {
...
  public function customStore() : RpcFunctionFetcher;
  public function customFetch() : RpcFunctionFetcher;

They should either store/fetch function and return instance of RpcFunctionFetcher, or do nothing and return null, in this case runtime will call C++ serializer.

interface RpcFunctionFetcher {
  public function typedFetch() : @tl\RpcFunctionReturnResult;
  public function typedStore($result ::: @tl\RpcFunctionReturnResult);
}

@hrissan hrissan force-pushed the gbuteyko/typed_rpc_tl_query_store_for_tests branch from f1c4d57 to 4166d9c Compare August 28, 2025 13:47
@hrissan hrissan force-pushed the gbuteyko/typed_rpc_tl_query_store_for_tests branch from 9ba12a6 to 443e095 Compare August 29, 2025 13:05
@hrissan hrissan closed this Sep 5, 2025
@hrissan hrissan deleted the gbuteyko/typed_rpc_tl_query_store_for_tests branch September 5, 2025 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant