Jens-G opened a new pull request, #3467:
URL: https://github.com/apache/thrift/pull/3467

   ## Summary
   
   - **`TCompactProtocol::readBool`** passes its `?bool &$bool` reference 
directly to `readByte(?int &$byte)`. In `STATE_CONTAINER_READ`, `readByte` 
unpacks a raw byte and writes an integer back through the reference — leaving a 
`?bool`-declared variable holding an integer. Fix routes through a local `?int 
$byte` variable and casts to `(bool)` before assignment.
   
   - **`TJSONProtocol::popContext`** assigns `array_pop($this->contextStack)` — 
whose return type is `BaseContext|null` — to the non-nullable `private 
BaseContext $context` property. On any context-stack underflow this causes a 
`TypeError`. Fix uses `?? new BaseContext()` as a null-safe fallback.
   
   - **`TCompactProtocolTest`** — `testWriteListBegin` and `testWriteSettBegin` 
dropped the `$size` argument from the `writeCollectionBegin` mock expectation, 
so forwarding of the element-count parameter was no longer verified. Restored 
`->with(TType::STRING, 1)`.
   
   ## Test plan
   
   - [ ] `lib/php`: `composer install && vendor/bin/phpunit`
   - [ ] `make style` passes in `lib/php`
   
   🤖 Generated with [Claude Code](https://claude.ai/code)
   
   Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
   Generated-by: Claude Sonnet 4.6 <[email protected]>


-- 
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]

Reply via email to