Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Agents

## Pull requests

Before starting work and again before opening a pull request, check for existing
pull requests as described in [CONTRIBUTING.md](CONTRIBUTING.md#pull-requests).
Do not open a duplicate of an existing pull request, unless you have a very good
reason to do it.

## Vulnerability reports

When scanning php-src for vulnerabilities, please respect our security policy
Expand Down
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@ had several contributions accepted, commit privileges are often quickly granted.
PHP welcomes pull requests to [add tests](#writing-tests), fix bugs and to
implement RFCs. Please be sure to include tests as appropriate!

Before starting work and again before submitting a pull request, search the
[existing pull requests](https://github.com/php/php-src/pulls?q=is%3Apr),
including closed ones, for the same issue or change. Check the bug report for
linked pull requests, and search by issue number, relevant function names and
keywords.

If an open pull request already addresses the problem, help test or review it
to make it better instead of opening an equivalent pull request.
Comment on lines +43 to +44

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer duplicate PRs over discouraging contributions, especially when those PRs are higher quality and don’t require any additional investigation or iteration. At this point, it matters less who opens the PR first if AI-assisted workflows can produce a new PR within 15 minutes of an issue being filed.

What would be even better is encouraging issue authors to open PRs themselves. Some issues already include a patch or a fairly complete fix, so why not recommend opening a PR straight away?


When multiple pull requests provide equivalent fixes of comparable quality,
we follow a first-come, first-served principle. We prefer the first correct
pull request.

By submitting a pull request, you certify that you have the necessary rights
to submit the work, that the work does not violate any third-party rights
(including those of your employer, if applicable), and that you license your
Expand Down
Loading