Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87320 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92671 invoked from network); 27 Jul 2015 14:45:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jul 2015 14:45:16 -0000 Authentication-Results: pb1.pair.com smtp.mail=scott@paragonie.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=scott@paragonie.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain paragonie.com from 209.85.220.173 cause and error) X-PHP-List-Original-Sender: scott@paragonie.com X-Host-Fingerprint: 209.85.220.173 mail-qk0-f173.google.com Received: from [209.85.220.173] ([209.85.220.173:33126] helo=mail-qk0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/91-17059-8F346B55 for ; Mon, 27 Jul 2015 10:45:12 -0400 Received: by qkdl129 with SMTP id l129so40137280qkd.0 for ; Mon, 27 Jul 2015 07:45:08 -0700 (PDT) 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:date :message-id:subject:from:to:cc:content-type; bh=iCNXDV5Emx7QjVosmHITN9UAHhjRIsfdOiKH8IVhVc8=; b=mHohUI/aqkzBXRcNHaEcoIgwQDUbAsLOwgzeqCkFJmjbD20D7NLRCHTf7p80X16ByB S4d47u21VPaIC8CkNG00I929f9XlAG2bJZ8XLXlYu1kmy1O/mUOagX0Id3VhUD2WjhY/ PvhsIAYftRGUEtBAPEKQ8UVWkVz55mkDKYm1k8T8pzb3GhOSqNEJNWHXUruUilsvmI6R qjVIZQHfw0dFvpwOGdjqSQB+WvizOP6IrGoq/g6HtG0z6l/yIP46UoaAQJGzaY4xpLqL Sb/x4ytifphCQhGOfbOmOVWqTxxu4MRkCEUgH8OhEKPfFRn46ofe6p3TGkWOgPbcjEaT m/+A== X-Gm-Message-State: ALoCoQn6boOSLtSNqLLIL8csDPZrSk1gRiTOViTcuoFAAdGDrqYkZ2FiDzJHXu9+sJ2VKY1cHmFk MIME-Version: 1.0 X-Received: by 10.55.31.83 with SMTP id f80mr40321546qkf.2.1438008308618; Mon, 27 Jul 2015 07:45:08 -0700 (PDT) Received: by 10.96.83.102 with HTTP; Mon, 27 Jul 2015 07:45:08 -0700 (PDT) In-Reply-To: <55B63FDF.6050100@gmail.com> References: <836BA21C-AE99-4E7B-AB06-EBC30E41BA0E@icicle.io> <0AD335F5-35F3-4D98-8F82-800A1EDF8FD8@icicle.io> <05f101d0c838$fcdab5e0$f69021a0$@belski.net> <55B63FDF.6050100@gmail.com> Date: Mon, 27 Jul 2015 10:45:08 -0400 Message-ID: To: Rowan Collins Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Core functions throwing exceptions in PHP7 From: scott@paragonie.com (Scott Arciszewski) On Mon, Jul 27, 2015 at 10:27 AM, Rowan Collins wrote: > Scott Arciszewski wrote on 27/07/2015 07:57: >> >> My only concern is that, we have a fixed timetable for the 7.0.0 >> release. It's certainly a good idea to develop a cogent strategy >> before moving forward, but I worry that bikeshedding will get involved >> and we won't make the deadline. >> >> I propose that, if a better strategy cannot be presented in time for >> RC1, consistency should take a back seat to security. Fail hard, throw >> an Error, deal with the details later. > > > I think taking on board Anatol's concerns about proper planning and > consistency, and yours about short timescales, the reasonable solution is to > create as small a possibility for future BC as possible, while maintaining > the "fail hard" policy. > > My suggestion would therefore be to raise an E_ERROR for this case in 7.0. > Unlike an E_RECOVERABLE_ERROR or any kind of Throwable, there is no way that > code can be written to explicitly handle that case, it will simply halt > execution. As such, there are no limits to what we can introduce later, > other than that unmodified code should continue to fail hard. > > This buys us time to put together a cogent policy for what if any built-in > functions can make use of Throwables in the 7.x release series, with a > likely result of throwing some class of Error for this function in 7.1. > > Regards, > -- > Rowan Collins > [IMSoP] > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > The problem with fatal errors is that "This function can fail irrecoverably outside of your control" isn't going to encourage adoption. Scott Arciszewski Chief Development Officer Paragon Initiative Enterprises