php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #79180 Conflicts with inherited typed property types should be exceptions not errors
Submitted: 2020-01-27 22:50 UTC Modified: 2020-01-27 23:17 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: bugreports at gmail dot com Assigned:
Status: Open Package: Class/Object related
PHP Version: 7.4Git-2020-01-27 (Git) OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bugreports at gmail dot com
New email:
PHP Version: OS:

 

 [2020-01-27 22:50 UTC] 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)}");
}


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-01-27 22:57 UTC] requinix@php.net
-Summary: not catchable +Summary: Conflicts with inherited typed property types should be exceptions not errors -Type: Bug +Type: Feature/Change Request -Package: Scripting Engine problem +Package: Class/Object related
 [2020-01-27 23:17 UTC] nikic@php.net
Inheritance errors are not catchable for technical reasons. I don't see this changing anytime soon.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Oct 30 17:01:24 2020 UTC