Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99034 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10605 invoked from network); 15 May 2017 07:21:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 May 2017 07:21:50 -0000 Authentication-Results: pb1.pair.com smtp.mail=kalle.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kalle.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.48 as permitted sender) X-PHP-List-Original-Sender: kalle.php@gmail.com X-Host-Fingerprint: 209.85.214.48 mail-it0-f48.google.com Received: from [209.85.214.48] ([209.85.214.48:38183] helo=mail-it0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 67/B5-15531-D0759195 for ; Mon, 15 May 2017 03:21:50 -0400 Received: by mail-it0-f48.google.com with SMTP id e65so63533901ita.1 for ; Mon, 15 May 2017 00:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=NrMKwdom6/8/UHMJ13zyyS8rvhdXLfshSYLGnypMmzY=; b=GRCkx4UFLwEQ8H30KirIutjBaJAg3Rx+XKkbw3PdG6IYZ1Hs9+PneAGw39DX0viaL4 ebl4Yz8aWf+qWZQpK2bn8V2X+BVsmPbe/v7QpVfSJTxHibPKOAOpZ4Es877NYpWfOSy7 +figipc4GljgBWR/lj0QFk0jld1gETopvzkB4JkgzYZtqKAdC84VFvrXfdntcF1RvzI1 TwZpi6sjjaMd7O97kUAwRvxWApTW1hwYaLYUVSjoWo1huoaWlO8KAxoVI5lQLRF+XGYb o0Xut8ZMCY8A/3uultw3uQT7GwXi0zvZ59NhnJkIbqYHg9/4QsgrzvybVABro+bKaLvH +aVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=NrMKwdom6/8/UHMJ13zyyS8rvhdXLfshSYLGnypMmzY=; b=EyXnGFSl4AnEXfJ0eXiuEGvjrFZKX+6euF2xc5NlX5c9ZnCXp5oJ8jxGat4CXs9ttL SiStrmm6U5TJn6z7JE9odij6uISAbxPs+QJKRVd5V9BEaYxpgnX2uNM0604byZbbvB4M lFfNfFxXwFOUoo++JEJPP2vq6Xetv191xrWddE+RsyhGIuEAj/axOdpirSe/rw2oA1o7 SL0Ac1L5BAsIQ3rQq2IFaT1khyf4UCA0uU4wTjN1hkoLHTKXOety86CbV3b8a+HGnaQY nFMd51ijstY7qMSXJR0r/t3csglhOpHbN0AAEQbsul+wYdwV+Kt+bitc8kQ7GF45+MQp dWsQ== X-Gm-Message-State: AODbwcAffnXCx8wB6Oyz1lZKz5JBI1RVBRYRIet+FFPgwJff42Q9NFO7 9J2ten1jVXSWr2HKe8Cj2xbPOtxAEg== X-Received: by 10.36.2.205 with SMTP id 196mr4282797itu.63.1494832906949; Mon, 15 May 2017 00:21:46 -0700 (PDT) MIME-Version: 1.0 Sender: kalle.php@gmail.com Received: by 10.107.18.132 with HTTP; Mon, 15 May 2017 00:21:46 -0700 (PDT) In-Reply-To: References: Date: Mon, 15 May 2017 09:21:46 +0200 X-Google-Sender-Auth: LkGBfIJOrnjyZIg5z6qjIEzXAiQ Message-ID: To: Nicolas Grekas Cc: "internals@lists.php.net" Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] BC break in master (7.2) - Distinguish between unmatched subpatterns and empty matches in preg_*() From: kalle@php.net (Kalle Sommer Nielsen) Hello Nicolas 2017-05-15 8:57 GMT+02:00 Nicolas Grekas : > Hi, > > 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. Generally we do trend to break BC in release versions. Take 7.1 for example: call_user_func('extract', ['name' => 'Rasmus']); Is no longer legal, tho I do wonder who would be insane enough to do something like that, but some changes are for the better of all of us, I would personally call these quality of life changes. Or the notice for applying an arithmetic operation on an poor formatted integer, also in 7.1: var_dump(2 + '5 apples'); Now for this change in particular, it was in the PR tracker for almost 8 months before it was merged and there was one comment that was a positive one to it. Now don't get me wrong here, it is not everyone that actively develops PHP and follows, tests and play with everything submitted to us, but it was first over 2 months after it was merged, that users started to react to this change instead of simply updating tests, like this guy[1] did before any "BC Break" comments was let out. It could even be simpler, it seems more like it to me, that we spend more time discussing the politics than actually just fixing the code so, as it can easily be done to be backwards compatible in multiple ways. When that is said, I can totally understand the frustration it causes that something breaks, but I think we should see the over all picture for each individual change, and this one is a good quality of life change to me (and other core developers too it seems). Had it been something major, I could understand that you'd wish it be reverted, but this is so minor that we shouldn't waste more keystrokes on it. [1] https://github.com/squizlabs/PHP_CodeSniffer/commit/d397f87d58119cd04cba1bc4dda1216ebb9ba642 -- regards, Kalle Sommer Nielsen kalle@php.net