Bug #69979 [NEW]: TypeError does not extend Exception
From: grzegorz129 at gmail dot com
Operating system: Linux
PHP version: 7.0.0alpha2
Package: Class/Object related
Bug Type: Bug
Bug description:TypeError does not extend Exception
Description:
------------
Since development versions of PHP 7.0 TypeException was thrown, from
alpha2 TypeError replaced it. Unfortunately none of them extends
Exception - is there any reason for that?
It could introduce a lot of incompatibility - a lot of code catches some
specific exceptions and at the end catches Exception. Good example of
that is phpUnit - under PHP 7.0 is impossible to use
setExpectedException() with TypeError because it doesn't extend
Exception.
Test script:
---------------
http://3v4l.org/eMijr
--
Edit bug report at https://bugs.php.net/bug.php?id=69979&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69979&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69979&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69979&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69979&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69979&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69979&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69979&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69979&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69979&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69979&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69979&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69979&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69979&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69979&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69979&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69979&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69979&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69979&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69979&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69979&r=mysqlcfg
Thread (2 messages)
- grzegorz129 at gmail dot com