You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Volodymyr Panivko (Jira)" <ji...@apache.org> on 2026/05/26 20:08:00 UTC

[jira] [Commented] (THRIFT-1636) Can we remove the closing tags from generated PHP sources?

    [ https://issues.apache.org/jira/browse/THRIFT-1636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18083623#comment-18083623 ] 

Volodymyr Panivko commented on THRIFT-1636:
-------------------------------------------

Already resolved as part of the PHP 8.1 generator refactor (THRIFT-5956 family — minimum PHP 8.1 bump, strict_types emission, PSR-12 conformance). On current `master` (a2eb3905c) `grep -n '?>' compiler/cpp/src/thrift/generate/t_php_generator.cc` returns nothing, and every regenerated stub under `lib/php/test/Resources/packages/` ends with the closing `}` of the emitted class — no `?>` tag. Suggest closing as Fixed.

> Can we remove the closing tags from generated PHP sources?
> ----------------------------------------------------------
>
>                 Key: THRIFT-1636
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1636
>             Project: Thrift
>          Issue Type: Improvement
>          Components: PHP - Compiler
>            Reporter: Mike Riley
>            Priority: Minor
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Closing PHP tags are unnecessary in virtually all environments and in many cases actually cause problems when not used properly.  Right now we're generating the closing tags followed by a newline, if output buffering isn't running at the point that such a source is included, PHP will go ahead and print it.
> In my experience it's best to leave the closing PHP tags off of the end of sources, any objections to removing them here?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)