sveneld opened a new pull request, #3532:
URL: https://github.com/apache/thrift/pull/3532

   <!-- Explain the changes in the pull request below: -->
   
   Resolves [THRIFT-1209](https://issues.apache.org/jira/browse/THRIFT-1209).
   
   The original bug: an IDL `enum { GLOBAL = 1, ... }` produced PHP code 
(`class Foo { const GLOBAL = 1; }`) that failed to parse on older PHP. PHP 7.1+ 
permits reserved identifiers as class constants (except `class`), so the 
historical breakage is gone — but there is no test pinning that behaviour. This 
adds one:
   
   - `lib/php/test/Resources/ThriftTest.thrift` gains `enum ReservedKeywordEnum 
{ GLOBAL, STATIC, LIST, RETURN }` (PHP-only test thrift, won't affect 
cross-tests).
   - New `lib/php/test/Unit/Compiler/ReservedKeywordEnumTest.php` references 
`\Basic\TestValidators\ReservedKeywordEnum::GLOBAL` etc., forcing the generated 
stub to be parsed by PHP. If the generator ever regresses and emits unparseable 
code for these names, phpunit will surface it.
   
   - [x] [Apache JIRA](https://issues.apache.org/jira/projects/THRIFT/issues/) 
ticket: THRIFT-1209
   - [x] Title follows `THRIFT-NNNN: …`
   - [x] Single squashed commit
   - [x] No breaking change — test-only
   - [ ] `[skip ci]` (n/a — test addition)
   


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