Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99622 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45254 invoked from network); 23 Jun 2017 03:13:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jun 2017 03:13:11 -0000 Authentication-Results: pb1.pair.com header.from=christopher.jones@oracle.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=christopher.jones@oracle.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain oracle.com from 141.146.126.69 cause and error) X-PHP-List-Original-Sender: christopher.jones@oracle.com X-Host-Fingerprint: 141.146.126.69 aserp1040.oracle.com Received: from [141.146.126.69] ([141.146.126.69:28656] helo=aserp1040.oracle.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7F/D9-52620-0478C495 for ; Thu, 22 Jun 2017 23:13:05 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v5N3D2oD002841 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 23 Jun 2017 03:13:02 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v5N3D1cd001370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 23 Jun 2017 03:13:02 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v5N3D16m016504 for ; Fri, 23 Jun 2017 03:13:01 GMT Received: from [10.191.133.55] (/10.191.133.55) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 22 Jun 2017 20:13:01 -0700 To: internals@lists.php.net References: <31e715a7-d129-17f0-b870-52bc1ca1715d@fleshgrinder.com> Message-ID: Date: Fri, 23 Jun 2017 13:12:57 +1000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <31e715a7-d129-17f0-b870-52bc1ca1715d@fleshgrinder.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Source-IP: aserv0021.oracle.com [141.146.126.233] Subject: Re: [PHP-DEV] [RFC] [Vote] Doxygen From: christopher.jones@oracle.com (Christopher Jones) On 22/6/17 1:43 am, Fleshgrinder wrote: > On 6/21/2017 5:38 PM, Nikita Popov wrote: >> Can you please clarify where functions that are declared in a header and >> defined in a source file should be documented? I believe the usual >> recommendation is to document in the source file, because it's closer to >> the implementation and thus more likely to be updated. On the other hand, >> documentation in headers only is more useful if you're just browsing code >> and not using generated output. >> >> Nikita >> > > The documentation should go into the header file. Source files actually > must not have documentation, because everything in there is private > anyways. Unless it is exported via a header file that is. Doxygen will > automatically inherit the documentation (no @inheritDoc necessary), > because it understands the C code in C mode. That kind of detail belongs in the RFC. A link to existing 'prior art' would have rounded the picture out and let people decide between alternatives of internal vs external doc. E.g. link to https://wiki.php.net/internals/references Also, is this for core and for extensions? Or for core only? What about PECL extensions not part of the PHP bundle? In summary, see point 8 of https://blogs.oracle.com/opal/the-mysterious-php-rfc-process-and-how-you-can-change-the-web Chris > > Documentation should never document what the implementation does, only > how it can be used. This gets blurry if you implement a particular, > standardized algorithm (like the UUIDs) where the actual implementation > suddenly becomes an important part of information that should go into > the documentation. > > In other words, refactoring and other changes in a functions body should > not require changes of the documentation. A usage change usually > directly translates to a breaking change. A situation in which many > places require updates (e.g. CHANGELOG, NEWS, ...) and not something a > dev should do without thinking about the implications of doing so. > -- http://twitter.com/ghrd