Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95351 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11160 invoked from network); 21 Aug 2016 18:55:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Aug 2016 18:55:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 209.85.217.171 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.217.171 mail-ua0-f171.google.com Received: from [209.85.217.171] ([209.85.217.171:34111] helo=mail-ua0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3F/56-50790-029F9B75 for ; Sun, 21 Aug 2016 14:55:31 -0400 Received: by mail-ua0-f171.google.com with SMTP id k90so156417260uak.1 for ; Sun, 21 Aug 2016 11:55:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LBWomHHgLeEpYzs83TMCKz5sUCZSUUY5FUezt+XbVHo=; b=tISxkSdtecnKGKuO8fS/zJnLrRKKXeF0EHkkfIpd2jbYsKAVUNwbwi7eZrUzWkSuWV j1ZqScWZUkekjzKk9nBg+JCpj3UYAu6GwCrUvbRZp5VUEqgUnUUE632ESB90zPFaySdg NeVJytq+duFW2WudDvMT0dPKjNOYIlrWNiv7QT5VmHV2kdfk/n3gcvsDeeYek3kx1RFb F7MHWhqPs7N16+qUVibiygGqSpmbJCGKdmOw1c0RiywPwlzyuwOXeYV8IxKwoGSs5k1M paTYgQanOav1ejjGVmVciXY2I6PyAWqu9EXXe/Q9A4ylHLCt6wIAN4oj/488aStWLOxz mVFw== 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=LBWomHHgLeEpYzs83TMCKz5sUCZSUUY5FUezt+XbVHo=; b=CkEESpl2m/fN8aqIqIt5fqn/3kF4qjZpm4EDP213cjaRVX32tjNG/jy/nnVWRMwMoJ KKKsW+3WkMELq5Og0kOHMcsXYOiuh0tKmqap0He/PU3E8DRaCale3Osg0uk6aL6I2HjG f70XBwDbG3gH7+LbEtLPNaXLF92YPwPPmdLhGWCh/F5RMNexNefGAdX9KmzXJcFjXYLG M+eDH9s2mnj66GWSQiMQ1Upgv37uGffnyvbXjGlqt67bxBkGqdxQwIbXJZzXHWJgD8PK m6VgVspIhftXYe8m2DNhj5Kbl3xCqHJKzhof1S88MRNS7gwuA5x5hAQIdiOy5BIE7bXK Sw6w== X-Gm-Message-State: AEkoouss1HsuqXF7nDoq1ruE+MKZdeJ7UkUY1HvZrCz/Eps/7a1HwkKLoRvOAYjQDROpVWcJta7tYZJqzMlHSw== X-Received: by 10.176.6.196 with SMTP id g62mr9771622uag.142.1471805725816; Sun, 21 Aug 2016 11:55:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.69.4 with HTTP; Sun, 21 Aug 2016 11:55:24 -0700 (PDT) X-Originating-IP: [2.99.230.18] In-Reply-To: References: <0668D584-EE51-4932-85D7-01D8BF70E409@trowski.com> <15E198DD-FF66-475D-ABBC-54ECD2B6BF62@trowski.com> Date: Sun, 21 Aug 2016 19:55:24 +0100 Message-ID: To: Marco Pivetta Cc: Levi Morrison , Aaron Piotrowski , internals , Stanislav Malyshev Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names From: danack@basereality.com (Dan Ackroyd) On 21 August 2016 at 17:01, Marco Pivetta wrote: > Yes, but the __toString API is used for codegen, and current code > generators don't expect a `?` to appear there. And they will continue to not have a `?` when reflecting PHP 7.0 code. It is only when reflecting 7.1 code, that has a different set of syntax, that the library will need to be changed to support a new version of PHP code. This is exactly the same as userland PHP code parsers. They continue to work in new versions of PHP, but only when analysing code from versions they were written to support. They will need to be upgraded to be able to parse syntax that wasn't present in the version of PHP that they were initially written for. > How many ... failing unit tests does it take to explain a BC break? As nullable types are only introduced in PHP 7.1, I strongly suspect that you won't have any unit tests that would work on PHP 7.0 that will start failing on PHP 7.1. So the answer is 'more than zero' ? We don't consider adding new features to be a BC break, as any code analyser or thing that uses reflection will continue to work, when they are given code from a version they were designed to support. btw I object to adding the leading slash. Escaping on output, is almost always the correct thing to do. And escaping intermediate representations of data is almost always the wrong thing. cheers Dan Ack