Skip to content

You can now write TL serializers in PHP#1402

Merged
DrDet merged 1 commit into
masterfrom
gbuteyko/tl_php_serializers
Oct 22, 2025
Merged

You can now write TL serializers in PHP#1402
DrDet merged 1 commit into
masterfrom
gbuteyko/tl_php_serializers

Conversation

@hrissan
Copy link
Copy Markdown
Contributor

@hrissan hrissan commented Sep 2, 2025

Functions to implement by PHP serializers.

interface RpcFunction {
...
  public function getTLFunctionMagic() : int;
  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() : RpcFunctionReturnResult;
  public function typedStore($result ::: RpcFunctionReturnResult);
}

Comment thread builtin-functions/kphp-full/_functions.txt Outdated
Comment thread builtin-functions/kphp-full/fetcher.txt
@hrissan hrissan force-pushed the gbuteyko/tl_php_serializers branch 3 times, most recently from 8bb82f8 to 5466c7d Compare September 10, 2025 19:23
@hrissan hrissan force-pushed the gbuteyko/tl_php_serializers branch from 5466c7d to 86f75b7 Compare September 19, 2025 20:20
@DrDet DrDet added this to the next milestone Oct 21, 2025
@DrDet DrDet self-assigned this Oct 22, 2025
@DrDet DrDet merged commit 3a3b142 into master Oct 22, 2025
7 checks passed
@DrDet DrDet deleted the gbuteyko/tl_php_serializers branch October 22, 2025 12:41
PetrShumilov pushed a commit that referenced this pull request Oct 28, 2025
added php autogen serializers execution path at serialization part of typed TL builtins
@astrophysik astrophysik added runtime Feature related to runtime compiler Feature related to compiler labels Nov 1, 2025
PetrShumilov pushed a commit that referenced this pull request Nov 10, 2025
added php autogen serializers execution path at serialization part of typed TL builtins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler Feature related to compiler runtime Feature related to runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants