From dev-return-59247-archive-asf-public=cust-asf.ponee.io@thrift.apache.org Fri Sep 25 20:04:03 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 17C67180636 for ; Fri, 25 Sep 2020 22:04:03 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id 53BA144AC8 for ; Fri, 25 Sep 2020 20:04:02 +0000 (UTC) Received: (qmail 24114 invoked by uid 500); 25 Sep 2020 20:04:02 -0000 Mailing-List: contact dev-help@thrift.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@thrift.apache.org Delivered-To: mailing list dev@thrift.apache.org Received: (qmail 24093 invoked by uid 99); 25 Sep 2020 20:04:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Sep 2020 20:04:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 319324250F for ; Fri, 25 Sep 2020 20:04:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 570BC7803DE for ; Fri, 25 Sep 2020 20:04:00 +0000 (UTC) Date: Fri, 25 Sep 2020 20:04:00 +0000 (UTC) From: "Jens Geyer (Jira)" To: dev@thrift.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (THRIFT-4942) Set PHP struct generated field values as private with getters and setters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/THRIFT-4942?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:all-tabpanel ] Jens Geyer updated THRIFT-4942: ------------------------------- Labels: newbie pull-request-available (was: Breaking-Change newbie pul= l-request-available) > Set PHP struct generated field values as private with getters and setters > ------------------------------------------------------------------------- > > Key: THRIFT-4942 > URL: https://issues.apache.org/jira/browse/THRIFT-4942 > Project: Thrift > Issue Type: Improvement > Components: PHP - Compiler > Affects Versions: 0.12.0 > Environment: I'm using Ubuntu 18.04, applies to all platforms > Reporter: Dedipyaman Das > Priority: Minor > Labels: newbie, pull-request-available > Original Estimate: 0.5h > Time Spent: 4h 10m > Remaining Estimate: 0h > > The PHP autogenerated code currently keeps the struct derived class attri= butes public, and they have to be accessed like: $class->field. > The java version keeps them private instead and uses getters and setters = to access and mutate the data. > A similar approach would be a better choice for most oop based php coding= standards.=C2=A0 > I've created a working patch, so if I get approval I will create a Pull r= equest for this. -- This message was sent by Atlassian Jira (v8.3.4#803005)