Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:96075 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75955 invoked from network); 21 Sep 2016 18:40:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Sep 2016 18:40:22 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.177 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.161.177 mail-yw0-f177.google.com Received: from [209.85.161.177] ([209.85.161.177:36227] helo=mail-yw0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BA/0C-04117-614D2E75 for ; Wed, 21 Sep 2016 14:40:22 -0400 Received: by mail-yw0-f177.google.com with SMTP id t67so68571676ywg.3 for ; Wed, 21 Sep 2016 11:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=SlSAXes4juEDn0yusL79ecgs91swzhjaDURxEQHtDfw=; b=cAhf2sPii+a/ub87yLfAWqyQq/xE1bXSIwyymmeXV333GbWixedVPqokHYB1+EDAgU kF1OiYnoUOYg3j1AwOP8yFaFwKl7LVDuwxbkcz4d0QaKnGL2GbYJ8VRCQRotphQerEUS 7JUpYQ/4PvZlt8ms/WWj+M03VMETsm9IWUBMu0f6o3wMNEOvZX4DGli+9sQGjasR3Fs6 puOKDjDHAdZRv8skREMwPco4rWxiHAt5TCDdTH9W/lZXNbJbz1Sy2FV10uNBkh5cDRDe wLfOuwUUD5UVwWtx8Ct0JpZEm0+BSS/QME5yHsOQR0lmEVIaf9CdDgRz8ksOMiA6RCKJ QVfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=SlSAXes4juEDn0yusL79ecgs91swzhjaDURxEQHtDfw=; b=l0I7YUL9qwDCMUb+OzGTSjIy7NMNKwULHOngJO8KY2ViiL4A+dpRYkxg30fsa0pirK QPzBBEpqpopo6NE9CeGVvSs21u66E6mKT3J7P4VqL24fDslHCRcx46bUc9d5uu5J4dVO dWMDYnxEomRfbPwI5zlQ5911BPXLtoB8ofW1E0O+Za7WvDMAp4M9C9NP6IuQYRA91bdw 7lBNR2KVrGXj/FgOMvzlAVKcu7BxMswTwS2dQfCYSu9p8/8dm7c1m6Vbv5y+kuzYW5OU WLQ3zCv3bnenLtdjU3bT10Cpje6v5G+qZ4JR40zTwjcIgWikjgTZyHlXmEax7aZiVFm7 PLTA== X-Gm-Message-State: AE9vXwMNggbVCwuAnkgFkbBFNLMW8Q2yV1qW4ca3HB7X1Zd4te0u96Fmnpz8N44fYMvEfnqyVHX8F12uKYl/yw== X-Received: by 10.13.193.196 with SMTP id c187mr34972411ywd.301.1474483219328; Wed, 21 Sep 2016 11:40:19 -0700 (PDT) MIME-Version: 1.0 Sender: morrison.levi@gmail.com Received: by 10.13.193.66 with HTTP; Wed, 21 Sep 2016 11:40:18 -0700 (PDT) In-Reply-To: References: Date: Wed, 21 Sep 2016 12:40:18 -0600 X-Google-Sender-Auth: 2fy65dMg3ojCDhED-xEdFKEGxus Message-ID: To: Nicolas Grekas Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Fix ReflectionType::__toString() BC break From: levim@php.net (Levi Morrison) On Wed, Sep 21, 2016 at 2:55 AM, Nicolas Grekas wrote: > Hello, > > our turn to be hit by this 7.1 BC break in Symfony: > `ReflectionType::__toString()` now adds a `?` in front of type hints where > `null` is allowed by their default values. > > But since `zend_bool` is really an `unsigned char`, we have plenty of room > to store and forward this semantic subtlety (nullable being set through > `?Foo $arg` vs `Foo $arg = null`) so that `ReflectionType::__toString()` > can be accurate again, thus BC. > > See https://github.com/php/php-src/pull/2136 > > Thank for you consideration of this patch. > > Cheers, > Nicolas On a technical note this is a potentially breaking change for C extensions. Since it is a currently a `zend_bool` its value is truthy/falsy; you are now applying specific meaning to values. Maybe someone else will have more insight into what might be affected realistically, but this is one reason this was not implemented this way to begin with.