|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-07-27 23:30 UTC] cataphract@php.net
[2011-07-28 07:27 UTC] frederic dot hardy at mageekbox dot net
[2011-07-28 08:29 UTC] cataphract@php.net
[2011-07-28 08:44 UTC] pajoye@php.net
[2011-08-04 06:56 UTC] frederic dot hardy at mageekbox dot net
[2011-08-06 01:09 UTC] felipe@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: cataphract
[2011-08-09 08:44 UTC] seld@php.net
[2011-08-09 08:46 UTC] seld@php.net
[2011-08-09 08:52 UTC] cataphract@php.net
[2011-09-02 20:03 UTC] krossekrabbe at gmail dot com
[2011-09-14 15:38 UTC] frederic dot hardy at mageekbox dot net
[2011-10-29 23:17 UTC] cataphract@php.net
[2011-10-29 23:18 UTC] cataphract@php.net
[2011-10-29 23:18 UTC] cataphract@php.net
-Status: Assigned
+Status: Closed
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 04:00:01 2025 UTC |
Description: ------------ In PHP 5.4, an exception was throwed if a call to parent::__construct() is not done in the constructor of a class which extends \DirectoryIterator. Exception was not throwed in previous version of PHP, so it's a BC break. And this BC break must be annoying in unit test, because it's impossible to mock the \DirectoryIterator class. Test script: --------------- <?php class myDirectoryIterator extends \DirectoryIterator { public function __construct() { } } $directoryIterator = new myDirectoryIterator(); ?> Expected result: ---------------- Nothing. Actual result: -------------- Fatal error: Uncaught exception 'LogicException' with message 'In the constructor of myDirectoryIterator, parent::__construct() must be called and its exceptions cannot be cleared' in /path/to/directoryIterator.php:10 Stack trace: #0 /path/to/directoryIterator.php(10): myDirectoryIterator->internal_construction_wrapper() #1 {main} thrown in /path/to/directoryIterator.php on line 10