Commit Graph

13 Commits

Author SHA1 Message Date
Ilija Tovilo
631bab42dd
[skip ci] Bump required C standard to C11
Closes GH-16078
2024-09-27 12:37:20 +02:00
Christoph M. Becker
f507da913a
[ci skip] Clarify usage of C99 standard (#14993)
This is mostly about mentioning that VLAs which are a required part of
C99 conforming implementations (although made optional in the C11
standard) *must* *not* be used in php-src.
2024-07-18 11:40:58 +02:00
Peter Kokot
5236551776
[skip ci] Remove obsolete guideline how to comment out code (#14621)
This can lead to undefined warnings when building with -Wundef and using
undefined FOO macro in #if condition. Also such code disabling should
not be encouraged exactly.
2024-06-24 20:37:42 +02:00
Tim Düsterhus
48971af482
Update CODING_STANDARDS for the acronym casing RFC (#14169)
* [skip ci] Update CODING_STANDARDS for the acronym casing RFC

see https://wiki.php.net/rfc/class-naming-acronyms

* Improve formatting in CODING_STANDARDS.md

Co-authored-by: Larry Garfield <larry@garfieldtech.com>

---------

Co-authored-by: Larry Garfield <larry@garfieldtech.com>
2024-05-08 20:35:44 +02:00
Max Kellermann
da777d493a
CODING_STANDARDS.md: add rules for bool/zend_result return types (#10630)
This guideline was mentioned on php-internals
(https://news-web.php.net/php.internals/119573).
2023-02-22 14:13:57 +00:00
Max Kellermann
5bfd3fa40f
CODING_STANDARDS.md: establish C99 as the implementation language (#10631)
PHP 8 switched to C99, but did not documented that anywhere.

After @derickr rejected a pull request on timelib
(https://github.com/derickr/timelib/pull/141#issuecomment-1386773784)
because my suggested change removed compile-time checks for
fixed-width integer types, pointing out that they are optional in the
C99 standard, @nikic disagreed with using `uint_least8_t` instead
(which is guaranteed to be available), stating that "We already make
extensive use of uint8_t, you can assume it exists"
(https://github.com/php/php-src/pull/10621#pullrequestreview-1304760668).

In order to avoid such confusion in the future, let's document this
architecture requirement.
2023-02-20 13:24:06 +00:00
George Peter Banyard
12abb1f55b
[skip ci] Amend coding style (#9797)
- Drop irrelevant rule about // comments since PHP is C99 + GNU extensions
- Add rule about strlen() usage for constant string length calculation
- Minor stylistic changes

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
2022-10-21 18:25:11 +01:00
Alex Dowad
5d37cd97e4 Improve documentation for contributors 2021-06-17 06:29:38 +02:00
Josh Soref
462da6e09c Fix spelling and grammar mistakes
This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

The action reports that the changes in this PR would make it happy: jsoref@602417c

Closes GH-6822.
2021-04-13 12:09:37 +02:00
Max Semenik
4757998650
Remove requirements for proto comments from CODING_STANDARDS
They've been made obsolete by .stub.php files and are often
outdated as they're not the source of truth.
2020-07-06 21:13:14 +02:00
tpfast
8069e1522d
Fix typo in CODING_STANDARDS.md [ci skip] 2019-10-04 05:42:27 +02:00
Peter Kokot
f45b61b898 [ci skip] Migrate Coding standards docs to Markdown 2019-05-18 21:41:38 +02:00
Peter Kokot
fafcdc4d57 Move CODING_STANDARDS to CODING_STANDARDS.md 2019-05-18 21:39:26 +02:00