Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94044 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44915 invoked from network); 16 Jun 2016 12:48:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jun 2016 12:48:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=lisachenko.it@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lisachenko.it@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.54 as permitted sender) X-PHP-List-Original-Sender: lisachenko.it@gmail.com X-Host-Fingerprint: 209.85.215.54 mail-lf0-f54.google.com Received: from [209.85.215.54] ([209.85.215.54:34758] helo=mail-lf0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/82-25388-B30A2675 for ; Thu, 16 Jun 2016 08:48:59 -0400 Received: by mail-lf0-f54.google.com with SMTP id j7so39879433lfg.1 for ; Thu, 16 Jun 2016 05:48:58 -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=25oXhP1PF5CPe0NN/UCg19a+ghco1TyJIqRkztKGJSY=; b=jOul8/izOKmtom2OVW84o1IVuiL0FTAkO8cKFRvR9aOlxYmxB49kpheXai95wqB3VQ +BMyBIkFsffq7rV9mdQHU7OhJ4YId3JECyGWZKOG1Wzx518SvRLjuqBRn/R9sQAhWTR6 fA5DpQ5PsCvpfrboiwURlEQNLHEo8W6rj+hiPykmHUu3XqV66kZod94t7f+f7xLHhlHs HZoXYTvnl94uUdAJyXaJQHTSeQTexuLx8EpdVqHtgbjWouPqofZOHFMsJtBevMKQ2vtq +DVYVsOGmQasn2jc+e1S35TjhKFRqhUc4sJ7LmoFs6LbeSrdgtRf3oql81q2H/ZOOxGn 0ggQ== 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=25oXhP1PF5CPe0NN/UCg19a+ghco1TyJIqRkztKGJSY=; b=H5ElNQWFhZu2c2oZ0Z72cTr3BMbO0IrNbS3f3UaFC099rRpAwhD6dX1DNwD6R4PR4h fxKaX1WHBWKzFld6eXwl6+O0/gUMcGm1YpmmMjUndCPrR2f7M8M6/yP+a7vhec1Xbb5b VUnX7jSzsfAa9s6j9aQlCzqF01fouj3w/80I5RD5xo/LT14d1+jGqmAJF80Aa6G8v7Vh 7UDkHjvLsQib1Ro8jlDIbTQAIr7DudE9l8BmvO7X/ZmmbiObauSgk20snR3RO1Daj/BR Y5dFhckC9plfQgFWtVEN7NwVZ0v4upg8uHlcVkdg/OevV8NJEOuHq8N5+fgTrGBIIgoX VbvQ== X-Gm-Message-State: ALyK8tIxbiBz89KJRItyZxFfGsKKG5qpc3pr1WSgMvWMRGmsbT0QZW408MaAyg7/Va8tqEsD6oXJUt20kr+V+Q== X-Received: by 10.25.19.211 with SMTP id 80mr1067985lft.147.1466081336068; Thu, 16 Jun 2016 05:48:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.136.6 with HTTP; Thu, 16 Jun 2016 05:48:55 -0700 (PDT) In-Reply-To: References: <2635b3b6-b971-9fb7-5def-26b86eafb54d@fleshgrinder.com> Date: Thu, 16 Jun 2016 15:48:55 +0300 Message-ID: To: Niklas Keller Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a113ca8683f9159053564a9f5 Subject: Re: [PHP-DEV] Throwing an Error for require expressions in PHP7.x From: lisachenko.it@gmail.com (Alexander Lisachenko) --001a113ca8683f9159053564a9f5 Content-Type: text/plain; charset=UTF-8 2016-06-15 22:28 GMT+03:00 Niklas Keller : > didn't read it was planned for all file functions. Let's restrict my first suggestion only for "require" expression for now. So proposal is following: Rewrite "require" to throw an Error instead of current Fatal Error if some file can not be loaded. This is fully BC and can be merged into 7.0 and 7.1, because it's impossible to catch a fatal error now. This will be consistent with handling of eval errors - now we use the ParseError exception instead of fatal errors. In my opinion, all fatal errors should be replaced with exception throwing (if possible), because it's more developer-friendly and allow us to handle failures gracefully, invoking finally, destructors, etc. --001a113ca8683f9159053564a9f5--