[PHP-DEV] [RFC] Consolidate Coding Standards Policy Document

Hi,

I would like to propose the "Consolidate Coding Standards Policy
Document" RFC, which follows up from the Policy Repository RFC[1]'s
future scope section.

This proposal suggests adopting the changes to the Coding Standards and
Naming document, and to integrate the CODING_STANDARDS.md file from the
php-src repository:

  PHP: rfc:consolidate-coding-standard-policy-document

cheers,
Derick

[1] PHP: rfc:policy-repository
--
https://derickrethans.nl | https://xdebug.org | https://dram.io

Author of Xdebug. Like it? Consider supporting me: Xdebug: Support

mastodon: @derickr@phpc.social @xdebug@phpc.social

On Wed, Dec 18, 2024 at 11:39 Derick Rethans <derick@php.net> wrote:

Hi,

I would like to propose the “Consolidate Coding Standards Policy
Document” RFC, which follows up from the Policy Repository RFC[1]'s
future scope section.

This proposal suggests adopting the changes to the Coding Standards and
Naming document, and to integrate the CODING_STANDARDS.md file from the
php-src repository:

https://wiki.php.net/rfc/consolidate-coding-standard-policy-document

cheers,
Derick

[1] https://wiki.php.net/rfc/policy-repository

Nitpick:

It might be more correct to reference BCP 14[1] instead of RFC 2119 (which is part of BCP 14).

Cheers,
Ben

[1] https://www.rfc-editor.org/info/bcp14

On Sun, 22 Dec 2024, Ben Ramsey wrote:

On Wed, Dec 18, 2024 at 11:39 Derick Rethans <derick@php.net> wrote:

> I would like to propose the "Consolidate Coding Standards Policy
> Document" RFC, which follows up from the Policy Repository RFC[1]'s
> future scope section.
>
> This proposal suggests adopting the changes to the Coding Standards
> and Naming document, and to integrate the CODING_STANDARDS.md file
> from the php-src repository:
>
> PHP: rfc:consolidate-coding-standard-policy-document
>
> [1] PHP: rfc:policy-repository

Nitpick:

It might be more correct to reference BCP 14[1] instead of RFC 2119
(which is part of BCP 14).

[1] Information on BCP 14 » RFC Editor

Either works really? I think that if I would feel inclined to update it,
wouldn't I just mention RFC 8174, as it updates 2119?

Many (if not most) documents I have seen still reference to RFC 2119
though...

cheers,
Derick

On Dec 23, 2024, at 19:06, Derick Rethans derick@php.net wrote:

On Sun, 22 Dec 2024, Ben Ramsey wrote:

On Wed, Dec 18, 2024 at 11:39 Derick Rethans derick@php.net wrote:

I would like to propose the "Consolidate Coding Standards Policy

Document" RFC, which follows up from the Policy Repository RFC[1]'s

future scope section.

This proposal suggests adopting the changes to the Coding Standards

and Naming document, and to integrate the CODING_STANDARDS.md file

from the php-src repository:

PHP: rfc:consolidate-coding-standard-policy-document

[1] PHP: rfc:policy-repository

Nitpick:

It might be more correct to reference BCP 14[1] instead of RFC 2119

(which is part of BCP 14).

[1] Information on BCP 14 » RFC Editor

Either works really? I think that if I would feel inclined to update it,
wouldn’t I just mention RFC 8174, as it updates 2119?

Many (if not most) documents I have seen still reference to RFC 2119
though…

The latest RFCs from the IETF standards track use language like this:

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

See here for an example: https://www.rfc-editor.org/rfc/rfc9697.html#section-1.1

Cheers,
Ben

On Tue, 24 Dec 2024, Ben Ramsey wrote:

> On Dec 23, 2024, at 19:06, Derick Rethans <derick@php.net> wrote:
>
> On Sun, 22 Dec 2024, Ben Ramsey wrote:
>
>>> On Wed, Dec 18, 2024 at 11:39 Derick Rethans <derick@php.net> wrote:
>>>
>>> I would like to propose the "Consolidate Coding Standards Policy
>>> Document" RFC, which follows up from the Policy Repository RFC[1]'s
>>> future scope section.
>>>
>>> This proposal suggests adopting the changes to the Coding Standards
>>> and Naming document, and to integrate the CODING_STANDARDS.md file
>>> from the php-src repository:
>>>
>>> PHP: rfc:consolidate-coding-standard-policy-document
>>>
>>> [1] PHP: rfc:policy-repository
>>
>> Nitpick:
>>
>> It might be more correct to reference BCP 14[1] instead of RFC 2119
>> (which is part of BCP 14).
>>
>> [1] Information on BCP 14 » RFC Editor
>
> Either works really? I think that if I would feel inclined to update
> it, wouldn't I just mention RFC 8174, as it updates 2119?
>
> Many (if not most) documents I have seen still reference to RFC 2119
> though...

The latest RFCs from the IETF standards track use language like this:

> The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
> "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
> "OPTIONAL" in this document are to be interpreted as described in
> BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
> capitals, as shown here.

See here for an example:
RFC 9697: Detecting RPKI Repository Delta Protocol (RRDP) Session Desynchronization

Thanks for that. I've updated the document, and also the RFC, to mention
BCP 14.

cheers,
Derick