Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95350 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1405 invoked from network); 21 Aug 2016 16:02:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Aug 2016 16:02:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.52 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 74.125.82.52 mail-wm0-f52.google.com Received: from [74.125.82.52] ([74.125.82.52:36446] helo=mail-wm0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9C/75-50790-E70D9B75 for ; Sun, 21 Aug 2016 12:02:06 -0400 Received: by mail-wm0-f52.google.com with SMTP id q128so91301099wma.1 for ; Sun, 21 Aug 2016 09:02:06 -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=IIGFRs7afUNxPgK9az/y52WhT0jZU9Gjkrx60bsYRuo=; b=WgFM02sF69UGIinH+YYfnbYl0ZGTbQa4TUkRp9HR0imIgXIKKAQHwOkT9VaAoAslJN n/ZJPofCNfzM2aVGONBheyeTkCpd7yEROKzuqaNntyZiluF6fkS3XwCo9uUkQ79cdles shhL6i3x9ekJso4c5/X8LbayoY/15QbfYRZ935+24cgWXRvU4eSur2VD48xh6d21SKmx 6bC+QjBhJmCYILmXHJPgDHJp4D0Y5oHboyUtYofkg3fpA7uCxYv26WtKVTEPGh16m4Md Yktyu47jytt3Fcbu3AFEnejVlGTh3Pg6+AUrBb3+gesFha8pICOGVIjfBCWXNj+XCG5V 9NPw== 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=IIGFRs7afUNxPgK9az/y52WhT0jZU9Gjkrx60bsYRuo=; b=gSG9JezokSIm6ULruZa2lUX6CKANMlMSHCegQObx+CpaJRXjE9q2Gqt4/5haJM1u+d MAX4Uc183m4S84PiuHWa0fV98bwFT8aZjb0j6V43DqzihQWqlQ6BlgMVkjgieZsbG05Y FN+lEbznIfGKiCaDPS33qsInUKas84vZAQ4kBYCG978M4ByQ6j/H9hWxezu2JGc0NCS0 M+lc2yDChXpjvFXv8Lu4hXO/3NxQ9ebnhnoFD4gJFlycP+Bc9vL/LITp3F3096BN8tSp DmdxDlNbT9dGeG/Xhh7JdH9IelAU1vG4ed2+FozuuDMtHoXZZFBRBX9Kk+lc/cuSZA1b 6Rgw== X-Gm-Message-State: AEkooutlJ6cjfMiS8oG3F0vSuuIfeopByzXjeCh9G44Eou6Q3xshkpe6TfmDoT6YSKukNXn01m1F2h9VdsHEPA== X-Received: by 10.28.18.11 with SMTP id 11mr12135335wms.11.1471795323597; Sun, 21 Aug 2016 09:02:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.125.242 with HTTP; Sun, 21 Aug 2016 09:01:42 -0700 (PDT) In-Reply-To: References: <0668D584-EE51-4932-85D7-01D8BF70E409@trowski.com> <15E198DD-FF66-475D-ABBC-54ECD2B6BF62@trowski.com> Date: Sun, 21 Aug 2016 18:01:42 +0200 Message-ID: To: Levi Morrison Cc: Aaron Piotrowski , internals , Stanislav Malyshev Content-Type: multipart/alternative; boundary=001a1146972271fa94053a970d3a Subject: Re: [PHP-DEV] ReflectionType::__toString() prepending \ to class names From: ocramius@gmail.com (Marco Pivetta) --001a1146972271fa94053a970d3a Content-Type: text/plain; charset=UTF-8 Yes, but the __toString API is used for codegen, and current code generators don't expect a `?` to appear there. How many engineers and failing unit tests does it take to explain a BC break? Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Sun, Aug 21, 2016 at 6:00 PM, Levi Morrison wrote: > This is the ultimate point: if we don't prepend the question mark it will >>> break code. >>> >> >> This is the impedence here: `ReflectionType` is a *REFLECTION*, not a >> code generator. Don't think of `ReflectionType#__toString()` as a way to >> generate code: it is merely a string representation of the reflectoion. >> > > This is the last I have to say on anything: > > You just proved the point. It's a *reflection* of what was written. If > it's a nullable type then it needs a nullable reflection in the toString. > --001a1146972271fa94053a970d3a--