sveneld opened a new pull request, #3479: URL: https://github.com/apache/thrift/pull/3479
Type the remaining untyped methods in `TJSONProtocol`, `TSimpleJSONProtocol`, their JSON/SimpleJSON Context classes, `LookaheadReader`, and `CollectionMapKeyException`. All internal/protected helpers; no public API change beyond the signature tightening. ## Typed methods **TJSONProtocol:** - `getTypeNameForTypeID(int $typeID): string` - `getTypeIDForTypeName(string $name): int` - `pushContext(BaseContext $c): void` - `__construct(TTransport $trans)` - `reset(): void` - `readJSONSyntaxChar(string $b): void` - `writeJSONString(mixed $b): void` - `writeJSONInteger`, `writeJSONObjectStart/End/ArrayStart/End`: return `: void` - `readJSONString(bool $skipContext): mixed` - `readJSONNumericChars(): string` - `readJSONInteger(): int`, `readJSONIntegerAsString(): string`, `readJSONDouble(): float` - `readJSONObjectStart/End/ArrayStart/End`: return `: void` **TSimpleJSONProtocol:** - `pushWriteContext(Context $c): void` - `popWriteContext(): void` — returns a fresh `Context()` on stack underflow (matches the non-null property type, parallels TJSONProtocol's BaseContext fallback) - `assertContextIsNotMapKey(string $invalidKeyType): void` - `writeJSONString(mixed $b): void`, `writeJSONInteger(int $num): void` **Context classes (all return/param-typed):** - `JSON\BaseContext`, `ListContext`, `PairContext` - `JSON\LookaheadReader` (`read(): string`, `peek(): string`) - `SimpleJSON\Context`, `ListContext`, `MapContext`, `StructContext` - `SimpleJSON\CollectionMapKeyException::__construct(?string $message = null)` ## Validation (Docker `thrift-php-dev:local`) - `phpcs` — 0 errors - `phpstan` (level 5) — 0 errors - `phpunit` Unit Suite — 635 tests, 0 failures - `phpunit` Integration Suite — 108 tests, 0 failures Follow-up to [THRIFT-5999](https://issues.apache.org/jira/browse/THRIFT-5999) within the umbrella [THRIFT-5960](https://issues.apache.org/jira/browse/THRIFT-5960). - [x] Apache Jira ticket — [THRIFT-6000](https://issues.apache.org/jira/browse/THRIFT-6000) - [x] PR title follows the pattern "THRIFT-NNNN: …" - [x] Squashed to a single commit - [x] No behaviour changes; pure typing pass on internal/protected helpers Generated-by: Claude Opus 4.7 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
