Req #79180 [Opn]: Conflicts with inherited typed property types should be exceptions not errors
| From: | nikic@php.net | Date: | Mon, 27 Jan 2020 23:17:01 +0000 |
| Subject: | Req #79180 [Opn]: Conflicts with inherited typed property types should be exceptions not errors | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-225178@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79180&edit=1
ID: 79180
Updated by: nikic@php.net
Reported by: bugreports at gmail dot com
Summary: Conflicts with inherited typed property types should
be exceptions not errors
Status: Open
Type: Feature/Change Request
Package: Class/Object related
PHP Version: 7.4Git-2020-01-27 (Git)
Block user comment: N
Private report: N
New Comment:
Inheritance errors are not catchable for technical reasons. I don't see this changing anytime
soon.
Previous Comments:
------------------------------------------------------------------------
[2020-01-27 22:50:34] bugreports at gmail dot com
Description:
------------
PHP Fatal error: Type of test_typed_properties_extended::$int must be int (as in class
test_typed_properties)
why are such errors not catchable as nearly anything else like parse errors in the recent history?
not helpful when a testsuite designed to collect all errors and warnings and present them at the end
silently stops while it would echo error_log normally as final action
try
{
require $testfile;
}
catch(Throwable $exception)
{
$this->trigger_error("custom/{$basename_testfile} - Exception -
{$this->format_exception((string)$exception)}");
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79180&edit=1