Volodymyr Panivko created THRIFT-5991:
-----------------------------------------
Summary: Emit native types on generated PHP struct properties and
constructor
Key: THRIFT-5991
URL: https://issues.apache.org/jira/browse/THRIFT-5991
Project: Thrift
Issue Type: Improvement
Components: PHP - Compiler
Reporter: Volodymyr Panivko
Phase G3 of THRIFT-5960 PHP modernization. The PHP generator emits native PHP
types on:
- Property declarations: `public ?int $errorCode = null;` (typed, nullable).
- Constructor parameter: `__construct(?array $vals = null)`.
Thrift-to-PHP type mapping:
- bool -> ?bool
- byte/i8/i16/i32/i64/enum -> ?int
- double -> ?float
- string/binary/uuid -> ?string
- list/set/map -> ?array
- struct/exception -> ?\\Namespace\\ClassName
Follow-up to THRIFT-5986 (declare strict_types) and THRIFT-5990 (return types).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)