[
https://issues.apache.org/jira/browse/THRIFT-5977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Volodymyr Panivko reassigned THRIFT-5977:
-----------------------------------------
Assignee: Volodymyr Panivko
> Apply constructor property promotion in PHP runtime library
> -----------------------------------------------------------
>
> Key: THRIFT-5977
> URL: https://issues.apache.org/jira/browse/THRIFT-5977
> Project: Thrift
> Issue Type: Sub-task
> Reporter: Volodymyr Panivko
> Assignee: Volodymyr Panivko
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> h2. Background
> THRIFT-5976 introduced native typed properties throughout {{lib/php/lib/}}.
> As a follow-up, many of those classes have constructors that are pure 1:1
> argument→property assignments — a perfect fit for PHP 8 constructor property
> promotion, which collapses declaration + assignment into a single line per
> parameter.
> This is a syntactic-only refactor: no LSP impact, no test changes, no
> behavioural change.
> h2. Scope
> Apply constructor property promotion across the PHP runtime library where the
> constructor body is purely arg→property (or arg→property +
> parent::__construct).
> * Full promote: TBinaryProtocolFactory, TServer (6 properties),
> TServerSocket, TMemoryBuffer, TBufferedTransport, TFramedTransport,
> ThriftClassLoader.
> * Partial promote (body keeps parent-call or single non-promotable line):
> TBinaryProtocol, TBinaryProtocolAccelerated, TMultiplexedProtocol,
> StoredMessageProtocol, TSocket, TSSLSocket, TSSLServerSocket, THttpClient,
> TCurlClient, TSocketPool.
> h2. Out of scope
> * TPhpStream — bitwise ctor logic.
> * Exception hierarchy (TException, TApplicationException, TProtocolException,
> TTransportException) — dual-mode bridge constructor.
> * TBase, TSimpleJSONProtocol, TJSONProtocol — non-trivial ctor bodies.
> h2. Verification
> * {{composer phpstan}} clean.
> * {{vendor/bin/phpcs}} clean.
> * {{vendor/bin/phpunit}} Unit (629) + Integration (106) green.
> Parent: THRIFT-5960
> Client: php
--
This message was sent by Atlassian Jira
(v8.20.10#820010)