Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96067 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60734 invoked from network); 21 Sep 2016 16:30:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Sep 2016 16:30:15 -0000 Authentication-Results: pb1.pair.com header.from=derokorian@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=derokorian@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.53 as permitted sender) X-PHP-List-Original-Sender: derokorian@gmail.com X-Host-Fingerprint: 74.125.82.53 mail-wm0-f53.google.com Received: from [74.125.82.53] ([74.125.82.53:35213] helo=mail-wm0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F5/29-04117-695B2E75 for ; Wed, 21 Sep 2016 12:30:15 -0400 Received: by mail-wm0-f53.google.com with SMTP id l132so278030256wmf.0 for ; Wed, 21 Sep 2016 09:30:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=9F/GLZJzAPF/j76475hgJAo/T2djZ64B3PqTGySue+M=; b=YH6Ul+twG/knv34cqeYDTKyP2Lg5OMiw6nt7zCk5geYKZpz+s8KF6kUTA0hFYIvDHb wKoexa/B/OAp2U1+o0VmJ/VqJdpxpCq0RfGsuUGR+JpUh3D4T7i9jeHMadBOCLAGbyJ4 dcfRQl8bA16ygyUiVtx/6AhCaR/RJlaC0SgJ30W/S2SzC6CRhoxcStIq2Wrc2ucLFZ5I hQsM8X6wZP7ucQn5QTBgPSthgyXf4E9JfWO24t5KiG9pT8m6QW1hMDYY+GkW4wfzgI7R /ciMAYJ0n02Aa4dufjVffNRUunldn34IPnyq1oC0pgdtVnQuwCJ6dKDhm2iG8YC8IO3u htUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=9F/GLZJzAPF/j76475hgJAo/T2djZ64B3PqTGySue+M=; b=Y074rR+0WbezfTxuzrVMgdPw8yupw9FuGEABeBBB/7wlzdGvQ06Pf2s/g6jL9pZt2i cbT+or4ww+XgqzXEJCl3Fdg4BzfxjRY72wL7edAw9sLY/obVjoDe0lhZg+znER0n97Tv AxpHQRiAoLSz1l4oCVyPzhk4L68g6jtFT1tX5FyJbHcIhBTZBJo3qcgxkHEx5ysdPJBR bShF2rAvTS/1gV4Ejkw8m6dlRjJL6zIs+V+xQ0kPyQ7fBk9thqNoCyVIIdlnSncC7YGT vfZqrF57gLPC69zhBH2LUNKbMSh6HHPNDFko10UnLwI37/gloNmVyvK8L18TeTKqQ/XN 5p5w== X-Gm-Message-State: AE9vXwPDB1AYnfA2oxuihEMXEMt89LTxGHkkPzcBiRKiCHVJPrh4F+rDzifjvPDNoUumb6GTVTXuvRsQSNsehg== X-Received: by 10.194.123.228 with SMTP id md4mr33578460wjb.78.1474475411452; Wed, 21 Sep 2016 09:30:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.224.134 with HTTP; Wed, 21 Sep 2016 09:30:10 -0700 (PDT) In-Reply-To: References: Date: Wed, 21 Sep 2016 10:30:10 -0600 Message-ID: To: Nicolas Grekas Cc: Nikita Popov , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e0122af342142ce053d070f28 Subject: Re: [PHP-DEV] Fix ReflectionType::__toString() BC break From: derokorian@gmail.com (Ryan Pallas) --089e0122af342142ce053d070f28 Content-Type: text/plain; charset=UTF-8 On Wed, Sep 21, 2016 at 10:13 AM, Nicolas Grekas wrote: > > > > See https://github.com/php/php-src/pull/2136 > >> > > > > I don't like this. > > > > I understand, really. I do have to deal with BC on Symfony side also and > it's a really hard constraint. Yet, we stick to it as much as possible, in > order to not add pain to others. > Sometime, we have to be pragmatic and accept solutions that are not "pure", > for the shake of our BC promise. > > PHP internals has such a BC policy, it should really stick to it. It's not > always fun, for sure, but the pain for others it strong. It's not only > me&Ocramius, nor Symfony&Zend: everybody not following internals to adapt > to latest BC breaks will be hit, potentially. This is bad for the > reputation of PHP. It makes the PHP platform unstable as far as confidence > is concerned. > > In this case, we should find a technical solution that preserves BC. Being > this patch or unconditionally returning the type name with nullable info is > fine, you'll decide what's best. > > But please don't consider BC as something that one can bypass when it gets > annoying. > > Thanks from me and from many others for considering :) > I'm not so sure its a BC though. Technically nullable types don't exist in 7.0 and as such would be impossible to return said question mark. Its only adding support for a new feature, not changing how an existing feature works IMO. If nullable types had been in 7.0 its highly probably, that __toString would have returned the leading question mark back then. > Nicolas > --089e0122af342142ce053d070f28--