Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99045 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47204 invoked from network); 15 May 2017 15:05:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 May 2017 15:05:26 -0000 Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.22 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.22 mout.gmx.net Received: from [212.227.17.22] ([212.227.17.22:65224] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EA/2B-15531-4B3C9195 for ; Mon, 15 May 2017 11:05:25 -0400 Received: from [192.168.2.102] ([79.243.116.67]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M8e5P-1dwlH92wnT-00wFLx; Mon, 15 May 2017 17:05:20 +0200 To: Pierre Joye , Nicolas Grekas Cc: "internals@lists.php.net" References: Message-ID: Date: Mon, 15 May 2017 17:05:31 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:mabN12XWAElUL06MEmMSDvvH0twZIK3TOyx0GDtOu7TLQGF1s4m wLeLFZBE942YRoCF3CKzTDfbG03r4edO2OBMJjPo/VFN3TO0wsVHphQc9d7d2LxzwXQwanA SzYNDPPQQkLaEEmkGD5S4hdjVkEQGYLoLVj/WospjvhRd7hX8lyyOI8Uslldz7TIxAJlLDx iubn5FCy2r5pay+KFjeIQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:FLFdxVOoZZk=:Dz4oRiVWYzbl9iVB+r2S3V vuIlS4HcSyZDQimYQx6XDycYF8P9dwQdeEooXtIyohvwkLPQay5jrJ2uh4I7tkd8d5SJGLjvk KUFENG897eLR7w2ex5TYGUM8QflO8WMRcsVSkWnykEUB26CvNvffVEKRJiX+giQ/LB+y1n6l9 QSBUpIa964JYPmFt3hNSh6HjfRNIjD87vBAlakMeeMHbC1q6mp4tCJnQ5JfLXATVngFjeMlGy l8J2+TGce/fjtwrlBliF5MkPPR1SBK+TVcl3dBa7PEpK0WhaCm21rLvHy0iuPxWa65gVENDyn GPEkcfgt1mg0N1e/m/oDsQD9pc1TgQUd93mwkosyzt6uzzeXpF+xqeDnb+rSOe/USphP5X7uk ud9RnXgnb3SJzmoiZIQflx/eJDD99/8hxMA8kY7k/wGKfQiZYL23+QF3hITgDZhrW48+uzwZr KJ8RLOybSgAjimz1djpgD5yQ86uUSQ2z38VPPRTIn2v4QrisMt1G/FQzsyncihdUXlVEYMhVm VEaRyrSZ6m1663LmmYNGRsllBlAT/j3tnrofupbJ8LsIIbPqHrxzbuLAWSmnVCQM3MdzK7wdk heg7XnwTZGxEsFK9OfrZmUxi1Wu6X2bCUKeg9rBnJlFiFtn1jWqn6OGLGwqxaIdU7HJJLqCF5 uCd20+KbFrl3WWDmxbBgMo7gvL1DNBma78dLXijIqIy6IYFiCuKHOqk9jDtvZeP7T/7hhXAn4 KDP78AAMjI5YF+ETYqbybHqxnnroU+7mRv7uoG3Ivx8ZtCcKYmZ6U7OYJwwuwUg87RAIZwgbj Kl9sEuK Subject: Re: [PHP-DEV] BC break in master (7.2) - Distinguish betweenunmatched subpatterns and empty matches in preg_*() From: cmbecker69@gmx.de ("Christoph M. Becker") On 15.05.2017 at 12:12, Pierre Joye wrote: > On Mon, May 15, 2017 at 1:57 PM, Nicolas Grekas > wrote: > >> in master, feature request https://bugs.php.net/61780 has been implemented >> and merged into master thanks to https://github.com/php/php-src/pull/1303 >> >> But as noted in the PR and even in the UPGRADING file, this is a BC break: >> . preg_match() and other PCRE functions now distinguish between unmatched >> subpatterns and empty matches by reporting NULL and "" (empty string), >> respectively. Formerly, either was reported as empty string. >> >> While trying to run Symfony's test suite against 7.2, we noticed that this >> BC break is hitting several components badly. If Symfony is hit, there will >> be many more userland code impacted for sure. >> >> As written explicitly in the releasing policy of php-src, BC breaks must >> not happen in minor versions. Therefore, I'm kindly but strongly asking for >> this BC break to be reconsidered and removed. > > I agree that a minimum 5 years old possible bug, quite small, causing > BC breaks is not good. As far as the fix is critical or justified, I > think it is sometimes ok to break BC for edge cases. However I do not > see this is not the case here. > > @RMs revert for 7.2 and re evaluate for later? I'm not against reverting the commit, but if we want to postpone this change to PHP 8, I suggest not to set unmatched subpatterns at all, then. The current solution has been an attempt to keep the BC break small, but that apparently has failed. -- Christoph M. Becker