Commit Graph

9 Commits

Author SHA1 Message Date
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