Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130970 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id A3CD31A00BC for ; Tue, 19 May 2026 14:48:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1779202107; bh=OagTPYeQRgQmAMd8rMgGFla+yy2uroG9ldduMAIr/KA=; h=Date:Subject:To:References:From:In-Reply-To:From; b=dMoEv+QGghWena66LIVs60jOSEm2z0WlS2/QrEha4+mhZU8E0OWepm/KpEuw9o0Ec ghaU5uWngsmnVio+JbmK4wJXgBKe6UIFzv4GmbN+h+GvxqK3iXgce9aPykVET71Jrz FdKO8S37T3gYcbp1sKjnt+ipeA85+nXGf1U7zH8ICwybeNjNC6wYc15H7lk9uwkmmv kizz7MKHd4E3q7mSpp3MNL+pVSgDHYKphPJ7+1+G5PT+UeVQM1tEPTA84mTtMjPppQ 9EW9DQZjL+0XO0h0ACQqUTJeXcwFvBzMTw06Oh+RHjXJ9xVNdrEepXhlV5HjRPPjbw fDJ0rlZd4mz3g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 76E8B180062 for ; Tue, 19 May 2026 14:48:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 19 May 2026 14:48:26 +0000 (UTC) Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-44e1ebb3122so2159001f8f.2 for ; Tue, 19 May 2026 07:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779202100; x=1779806900; darn=lists.php.net; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=pKt9kW/ioxgtVcQJbllXx1OgabVWcfMX4nBL1OvYS1g=; b=jMdPqGEVpva4NUrVMmeQaLJILHLA19Dpfa3rXMnHcnedLcU2cB+LisRVPeBDcURJiA VYsJwJ5AwENgcs2EVyGXFcUOs1R/4jLpvavi4g9Dh7N/I9EKSg/RvJ9Hqv9Yjz73Moqe KHB92eDiNvSeaMGpq2L9M4QlW/uCA/WP4w0OJ8NZikVueREIju9t5Op+2JYsYoqKn+Or Zc8dgf3mvIgdwW7TuFkvvCp9o9+nAzvqOTFRUtAzQEx4vdm9O9B0sibv9npaz0Jvd9nj f+3hZOvyBPhq+rtFLM5vzlaXkmhmhbhVcR2i3HhtIUKhRAthzY0VLkLMJI398Wf9e/gt ZVfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779202100; x=1779806900; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pKt9kW/ioxgtVcQJbllXx1OgabVWcfMX4nBL1OvYS1g=; b=fu8cHAdvwBwNbWN8KehmCat5YasLrXTnhvFc8qo+K1f+Oe4m+sLS+TetyU2JuBKIP0 +SCc2leJCeL7UyTlQ4iLXPSmGir+cGG5UddWHp5LqZETVv0CkBfr/bZjWcFRRpgpqYGf vagqOv5MOS30Hb+Lvb03BSMLATMAK3a3h2IAxY600JsmbOSpZhJI/yun23vMKz/SC/VJ 5wd5rXkxswaQdDVS72u3ssvciN4vXpg9mGZDeSXsy96Z4C9ZyM/Mrmgcbz/AHndAgzR+ 0dHsdOyf/LgCoI4f9PoFzHQz7dvFTLlXQZgxVSJAFl1ERxwHQtxhETKVVpuJKbNOMxf+ RI5Q== X-Gm-Message-State: AOJu0Yy/N7QYqzQH+P+eHL1U7evrmmlyUIib7bq9d1Blx4cNHZ2iiAv5 o+VedWLVyf6uh7P1tJa66Gg9HS/OJa9yDBFnW5YVX0Ypmymlx3BMQfkOzQ2AEZssYww= X-Gm-Gg: Acq92OG9k4qQMwWl4K5keFX8p6LLSLdA3053vBtGsERfls6sjqNqE9yrXOXRJgJJCbO sBXYErola1bXV7xNWNuKLoDHvzKAExWIoht3wwXFksjVh44toI6S5BV0yGPei/Gxtpd6rtKYVLk lt98qhM56a5K0NlbPp0Gcry8kf+nOM917TS8E0coaIy3AtilscsVMX1HsiRZxOfL0zV4ybbwMRi 7Fnl/51p5i9MaBOtIRBmH0CRlUmclLcjxDQSVpQcLZktBoXElCjM3kB0TR925NBi1JBnum7w9tP sEFFtQnmneJ/VySbuNQJJ+VgxhYsYhM8v9hIn2fkmqyqfeDQzyth3cn+bF/3wxTsR/dM2JaHW8C RsRwYRfTW8N/xfrsF0dzMfywQgV70eUwbDZzoDGnqArLDKuVztjI1bw58ZepmYorKDHSydB4Uuh vJL6P+SzFCxsPLsLW5UrUX4vmTZxqvMioUEy0yB6DkswcxVeb1DrlcWnv5vWo7EB4OuCrUnP1rm vfIkmrqq12jtaFKJ9ryOYt1ojTga0JQBOyzlU9kk+0a88X8WT/eeZ+N3odeo5E/fMY= X-Received: by 2002:a05:600c:c10b:b0:490:263f:24f2 with SMTP id 5b1f17b1804b1-490263f259amr5980675e9.28.1779202099970; Tue, 19 May 2026 07:48:19 -0700 (PDT) Received: from ?IPV6:2a02:21b4:1654:b400:196c:7178:bbb7:4e5c? ([2a02:21b4:1654:b400:196c:7178:bbb7:4e5c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48febf81970sm155051045e9.8.2026.05.19.07.48.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 May 2026 07:48:19 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------0yqVHI2N6eX7mQe21jotp20a" Message-ID: <3ed03ee8-2d3b-4d3c-9f30-93f394e9e047@gmail.com> Date: Tue, 19 May 2026 16:48:18 +0200 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] Merging pull requests instead of closing them To: internals@lists.php.net References: Content-Language: en-US In-Reply-To: From: tovilo.ilija@gmail.com (Ilija Tovilo) This is a multi-part message in MIME format. --------------0yqVHI2N6eX7mQe21jotp20a Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Valentin GitHub marks PRs as "Merged" under either of these two conditions: * The PR is merged via GitHub UI * The latest commit of the source branch is pushed to the target branch As explained by Gina, most of us already merge most PRs that target master via GitHub UI, unless they require additional changes like a NEWS entry. When merging commits manually, the source branch usually requires a rebase (as feature/bugfix branches are merged via fast-forward merge). Additionally, we frequently amend some information to the commit message, like adding a reference to the PR. Either of those change the commit SHA and will break GitHub's ability to track the merge status of the PR and leave the PR open. To fix this, we usually add "Closes GH-xyz" to the commit message to auto-close the PR. Some also just close the PR manually with a link to the merged commit. The catch is that the status of the PR will be "Closed" rather than "Merged". To make GitHub pick up on the merge, the source branch would need to be force-pushed after the rebase so that the fast-forwarded commit once again matches that of the latest commit of the source branch. However, this also triggers CI and would incur a non-trivial amount of fully redundant resource usage. That's the main reason this has not been implemented (apart from the additional step). The benefit OTOH is that the PR changes would be fully in sync with what has actually been merged, which is something Tim has argued for in the past. If we can find a way to avoid the additional CI resource usage, I'd be happy to implement these changes. Ilija On 19.05.26 14:00, Valentin Udaltsov wrote: > Hi internals, > > I want to bring up something that's been bothering me since my > contribution : many PRs in > php-src are being closed instead of merged, with the changes pushed > separately as standalone commits. > > The problem is that GitHub marks these PRs as "Closed", not "Merged". > So from the outside — and from the contributor's perspective — it > looks like the work was rejected. Their GitHub profile shows no merged > contribution, even though the code was accepted and is now in the repo. > > Beyond statistics, it also disconnects the commit from the review > discussion, and it's just confusing, especially for newer contributors > who don't know the convention. > > I get that there might be reasons for this — keeping a linear history, > concerns about merge commits, etc. But rebasing or squashing before > merging solves all of that. Asking a contributor to rebase or squash > is totally normal, and most people are happy to do it. > > Merging PRs is the standard across open source. It's how you signal > that a contribution was accepted. > > So my question is: is there a way to make merging the default practice > in php-src? Has this been discussed before? If so, what were the blockers? > > Thanks, > Valentin Udaltsov --------------0yqVHI2N6eX7mQe21jotp20a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Hi Valentin

GitHub marks PRs as "Merged" under either of these two conditions:

  • The PR is merged via GitHub UI
  • The latest commit of the source branch is pushed to the target branch

As explained by Gina, most of us already merge most PRs that target master via GitHub UI, unless they require additional changes like a NEWS entry. When merging commits manually, the source branch usually requires a rebase (as feature/bugfix branches are merged via fast-forward merge). Additionally, we frequently amend some information to the commit message, like adding a reference to the PR. Either of those change the commit SHA and will break GitHub's ability to track the merge status of the PR and leave the PR open. To fix this, we usually add "Closes GH-xyz" to the commit message to auto-close the PR. Some also just close the PR manually with a link to the merged commit. The catch is that the status of the PR will be "Closed" rather than "Merged".

To make GitHub pick up on the merge, the source branch would need to be force-pushed after the rebase so that the fast-forwarded commit once again matches that of the latest commit of the source branch. However, this also triggers CI and would incur a non-trivial amount of fully redundant resource usage. That's the main reason this has not been implemented (apart from the additional step).

The benefit OTOH is that the PR changes would be fully in sync with what has actually been merged, which is something Tim has argued for in the past. If we can find a way to avoid the additional CI resource usage, I'd be happy to implement these changes.

Ilija

On 19.05.26 14:00, Valentin Udaltsov wrote:
Hi internals,

I want to bring up something that's been bothering me since my contribution: many PRs in php-src are being closed instead of merged, with the changes pushed separately as standalone commits.

The problem is that GitHub marks these PRs as "Closed", not "Merged". So from the outside — and from the contributor's perspective — it looks like the work was rejected. Their GitHub profile shows no merged contribution, even though the code was accepted and is now in the repo.

Beyond statistics, it also disconnects the commit from the review discussion, and it's just confusing, especially for newer contributors who don't know the convention.

I get that there might be reasons for this — keeping a linear history, concerns about merge commits, etc. But rebasing or squashing before merging solves all of that. Asking a contributor to rebase or squash is totally normal, and most people are happy to do it.

Merging PRs is the standard across open source. It's how you signal that a contribution was accepted.

So my question is: is there a way to make merging the default practice in php-src? Has this been discussed before? If so, what were the blockers?

Thanks,
Valentin Udaltsov
--------------0yqVHI2N6eX7mQe21jotp20a--