Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95362 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52100 invoked from network); 22 Aug 2016 05:33:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Aug 2016 05:33:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.169 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.161.169 mail-yw0-f169.google.com Received: from [209.85.161.169] ([209.85.161.169:34129] helo=mail-yw0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/61-35246-3AE8AB75 for ; Mon, 22 Aug 2016 01:33:23 -0400 Received: by mail-yw0-f169.google.com with SMTP id z8so45445478ywa.1 for ; Sun, 21 Aug 2016 22:33:23 -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=a2FFjYX3AvQjAd0jzHDb/zmkIVHbc7GTsCkN+pK9npY=; b=fwV/njmQdqKgmdVofYxutzJaJh6UUBlEFtV+PkXB1h/Zb7WZHMnVjin83mgTxC2LCD JkjTVoayIpIiDUFaksmzEOFqi5jLCXurUAoK26i4IcL9yTdXhmjgk6sNf1NVwOr26Rkh NZsU1n/TSbiqLaQWxZ/6r+uDHJ4/M2KDFf9PJvPtfkAiehChInFMt5D4LgapHBqVgIfT 6h9BcCxyLWfm386rGU0+I4yVidb2XLDjRmIsUTU+BUG13+ABK/wf5rbuoejPrmNiZogm RRKREZdzaCtCnqx5VYi0+OBz+GDDD5wgtJJRi9y/78X2rpnXh6F4aKlfb5FsmawV5ec2 sdiw== 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=a2FFjYX3AvQjAd0jzHDb/zmkIVHbc7GTsCkN+pK9npY=; b=aFAd1UFdvHt0/MTGU/mRjjYFFWfXdcq9RGs9JtyPWQK+MpmlV8PgWS9fGOD6Tp29ho 7ls2JHxa8JIXA3gogzqch8YdQaUJtsOlYQHLQn8r24G72HXFSZww9sWTTa/0i7qe9Lvk UMMxcQwaS8UAVj0129rNqirtqLJ/pjJ4OpuC6TlGUpoBu5cmHxu0A0fxgoC5gRdvuWY8 2MAZfoKg2Zsv6JjLfjTGSq8jBtcGUT0PDEeOkcEEwVDATT6Fs/6+UyioR1j5x9HTkZ4A o998uc9wJWoLrNf/swahYerEYx7PacuucwiQn7suas+EMyVFe0PabAYHMT4hd1yuLcVW jsTg== X-Gm-Message-State: AEkoouvRRO3fzvf8ESjVZ4rgMLgAzabjEgo0WrcmvPSQ7CW3cCEJQaM52acY/46h7QwOLnSgOuCXgDm4SmATPg== X-Received: by 10.13.206.3 with SMTP id q3mr16454076ywd.139.1471844000922; Sun, 21 Aug 2016 22:33:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.131.129 with HTTP; Sun, 21 Aug 2016 22:33:20 -0700 (PDT) In-Reply-To: References: <0668D584-EE51-4932-85D7-01D8BF70E409@trowski.com> <15E198DD-FF66-475D-ABBC-54ECD2B6BF62@trowski.com> Date: Mon, 22 Aug 2016 07:33:20 +0200 Message-ID: To: Dan Ackroyd Cc: Marco Pivetta , Levi Morrison , Aaron Piotrowski , internals , Stanislav Malyshev Content-Type: multipart/alternative; boundary=001a114dbd54d71307053aa262f8 Subject: Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names From: nikita.ppv@gmail.com (Nikita Popov) --001a114dbd54d71307053aa262f8 Content-Type: text/plain; charset=UTF-8 On Sun, Aug 21, 2016 at 10:28 PM, Dan Ackroyd wrote: > On 21 August 2016 at 20:43, Marco Pivetta wrote: > > > > Sadly, it won't. Here's an example that shows the BC break in a more > > explicit way: > > > > function foo(Iterator $i = null) {} > > var_dump((string) (new ReflectionParameter('foo', 0))->getType()); > > > > This reports `Iterator` for PHP 7.0.x, `?\Iterator` for 7.1.x. > > https://3v4l.org/tDkLj > > > Thanks. > > I missed that part - I thought this was just about ?types, not things > that have default of null. > > cheers > Dan > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > Hi. Now that we have made ReflectionType::__toString() be useless and not represent the type, this method should be deprecated in favor of using ReflectionNamedType::__toString(), ::allowsNull() and any further extensions that will be introduced later. I recommend doing this swiftly so as to ensure that people do not use this method on PHP 7.1 anymore and thus avoid pain on future upgrades. Nikita --001a114dbd54d71307053aa262f8--