Github user Skarlso commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1292#discussion_r122788777
  
    --- Diff: compiler/cpp/src/thrift/generate/t_php_generator.cc ---
    @@ -545,30 +553,41 @@ void 
t_php_generator::generate_consts(vector<t_const*> consts) {
         f_consts << "final class Constant extends \\Thrift\\Type\\TConstant {" 
<< endl;
     
         indent_up();
    +    if (php56_) {
    +      // Create const property
    +      for (c_iter = consts.begin(); c_iter != consts.end(); ++c_iter) {
    +        string name = (*c_iter)->get_name();
    +
    +        indent(f_consts) << "public CONST $" << name << " = ";
    +        generate_php_doc(f_consts, *c_iter);
    +        f_consts << render_const_value((*c_iter)->get_type(), 
(*c_iter)->get_value());
    +        f_consts << ";" << endl;
    +      }
    +    } else {
    +      // Create static property
    --- End diff --
    
    I think if you are explicity committing to use php56, you ought to go all 
the way, not? I mean, once you set php56 you are expecting things, and I 
wouldn't want to keep some old stuff lying around lest I might spot improvement 
possibilities. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to