Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105546 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 7277 invoked from network); 1 May 2019 17:50:40 -0000 Received: from unknown (HELO mail-vs1-f44.google.com) (209.85.217.44) by pb1.pair.com with SMTP; 1 May 2019 17:50:40 -0000 Received: by mail-vs1-f44.google.com with SMTP id b74so6841413vsd.9 for ; Wed, 01 May 2019 07:53:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=cY3eSPgmFvlO+YtD0gkQzTfhxMoTGKIBzs8JFmxRgK0=; b=GkCXkZjEWicZRDj7YY5C1wLzl2JZmcobKtVPVYIE6Lhb8qAt7Zq50M3kFtYwDufdyh 16fAmiurO1OaiX6o25VSugA1wGMa5NWIc5Jt8OOTkFB9YePBKblR67shBBRYcV+GH0pt WRhGyWgyUY3htmSKVyRHES3o3Z5oNEBtVYnGg8yiQucnfBVSg7qAdCKwotUVuQgWwjup 6KErNbJt/nINmQNkcv27sCfdqK5AxYcABtT7IkhjTH6XSuF1FOF2dbuLGUv/fqIooyFU OVL1vhaTEw+h6P4YvCirEC/F1q2Liev2Em3WoKZO1Cm4JgXs70wrpaRHvp9ui9VapQKs UjdA== X-Gm-Message-State: APjAAAVcixcVL6Oabd0sS208NQtk5PbipGhumgAotCkzj1qeBdYPczg0 /5rFk2zXcmUp/xB8Wgmwp4t6sKTdMN9rENPy7CSXxQ== X-Google-Smtp-Source: APXvYqw+TXoqOCjf5y/RjmdjD9q21pNhyTdpMnZYHiKIfVSvX/3Dbs6vTWlysvZe7yRvP+qL+dhLvQE/unJaa2/DjnE= X-Received: by 2002:a67:87d3:: with SMTP id j202mr10911252vsd.21.1556722384846; Wed, 01 May 2019 07:53:04 -0700 (PDT) MIME-Version: 1.0 References: <2b141597-e68e-1843-51f5-16d6ed8c41fa@gmail.com> In-Reply-To: Reply-To: bishop@php.net Date: Wed, 1 May 2019 10:52:38 -0400 Message-ID: To: Dan Ackroyd Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000c345960587d4ac84" Subject: Re: [PHP-DEV] [RFC] Allow throwing exceptions from __toString() From: bishop@php.net (Bishop Bettini) --000000000000c345960587d4ac84 Content-Type: text/plain; charset="UTF-8" On Wed, May 1, 2019 at 7:36 AM Dan Ackroyd wrote: > On Wed, 1 May 2019 at 03:54, Bishop Bettini wrote: > > > > But I'd still think this would be a "many eyes needed" kind of PR, > especially from extension maintainers. > > Hypothetically, what should these extension maintainers be looking for? > > Other than "Mmm-hmm. Mmm-HMM. I know some of these words!" ? > Indeed. I'm by no means an expert, but here's what I did for phar and imap extensions. I read the RFC and "got to know" the new helper methods for resolving stringy content. I then looked at the PR for all changes to phar and imap, verifying that I understood the changes Nikita made. Then I went to master and PHP-7.4 branches and looked for any other cases that might need to be changed, and while there took mental note of improvement opportunities should this RFC pass. When I was in there, I was basically looking for "convert_to_string" (and friends) and if I found any that Nikita hadn't already found, replacing those with one of the new helpers and making sure I understood the choice Nikita made and commenting if I disagreed. I was also looking for any case where the conversion touched data that persisted and made sure it wasn't going to get trashed by a bad conversion. I also went through code outside phar and imap looking for things I didn't understand or surprised me or didn't look correct. Suffice to say, there's a lot of code to look through. Some code surprised me, like that the (new DateInterval(...))->{$badStr} unhappy path didn't adhere to the has_property contract, so that was a bugfix Nikita made as an artifact of this sweep, which is great and I think emblematic of the reason to get more eyes on this: might be more of those lurking in the code base. --000000000000c345960587d4ac84--