From ae83cf7b7ff73b91d34ead5b7c316711459f69f4 Mon Sep 17 00:00:00 2001 From: Weilin Du Date: Sat, 24 Oct 2026 01:43:59 +0800 Subject: [PATCH 1/5] [skip ci] Add policy for duplicate PRs --- AGENTS.md | 6 ++++++ CONTRIBUTING.md | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 2cf3915754b1..89ce8b68084b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,5 +1,11 @@ # 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. + ## Vulnerability reports When scanning php-src for vulnerabilities, please respect our security policy diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4767a0eb0fc4..aa0ee62bd882 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,6 +34,22 @@ 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 +instead of opening an equivalent pull request. If a separate pull request is +needed, link to the related pull request and explain what your change adds or +does differently. + +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. Thus, submitting duplicate pull requests is meaningless and a +waste of everyone's time. + 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 From 0f4bf2a5005f07ce938e73c23166e45189f1ef3c Mon Sep 17 00:00:00 2001 From: Weilin Du Date: Sat, 24 Oct 2026 01:48:08 +0800 Subject: [PATCH 2/5] [skip ci] Better wording --- AGENTS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 89ce8b68084b..17ee67f0fe5d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,8 @@ 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. +Do not open a duplicate of an existing pull request. Unless you have a very good +reason to do it. ## Vulnerability reports From b2ff1162a87797dbeb9724215bdd169fedcad515 Mon Sep 17 00:00:00 2001 From: Weilin Du Date: Sat, 24 Oct 2026 01:52:27 +0800 Subject: [PATCH 3/5] [skip ci] grammer fix --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 17ee67f0fe5d..a09b5681ec21 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,7 @@ 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 +Do not open a duplicate of an existing pull request, unless you have a very good reason to do it. ## Vulnerability reports From 2d4b82194f8c42752df325c7e6125d801fe5a145 Mon Sep 17 00:00:00 2001 From: Weilin Du Date: Sat, 24 Oct 2026 02:17:37 +0800 Subject: [PATCH 4/5] [skip ci] Better wording again --- CONTRIBUTING.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index aa0ee62bd882..2dfeacfa13f6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,9 +41,7 @@ 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 -instead of opening an equivalent pull request. If a separate pull request is -needed, link to the related pull request and explain what your change adds or -does differently. +to make it better instead of opening an equivalent pull request. When multiple pull requests provide equivalent fixes of comparable quality, we follow a first-come, first-served principle. We prefer the first correct From 663b765a6484bea1489d6c4125ac5379d276cc6e Mon Sep 17 00:00:00 2001 From: Weilin Du Date: Sat, 24 Oct 2026 11:14:16 +0800 Subject: [PATCH 5/5] [skip ci] Remove the last sentence --- CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2dfeacfa13f6..9e6eda0e88d3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,8 +45,7 @@ to make it better instead of opening an equivalent pull request. 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. Thus, submitting duplicate pull requests is meaningless and a -waste of everyone's time. +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