[php-src] PR #25600: ext/spl: Reject abstract classes when instantiating a stored class

From: Date: Thu, 19 Nov 2026 16:28:21 +0000
Subject: [php-src] PR #25600: ext/spl: Reject abstract classes when instantiating a stored class
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-40822@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25600 Author: iliaal Depends on php/php-src#25592 (must merge up first). ArrayObject::getIterator(), SplFileInfo::openFile(), getFileInfo(), getPathInfo() and FilesystemIterator with CURRENT_AS_FILEINFO bypass object_init_ex(), so they instantiate an abstract class given as the iterator, file or info class. Create the SplFileInfo objects through object_init_ex() and check ZEND_ACC_UNINSTANTIABLE in getIterator(), which has to pass the source object to spl_array_object_new_ex(). Code that relied on this gets Error: Cannot instantiate abstract class X, hence master and an UPGRADING entry. Follow-up to GH-25585.

« previous php.git-pulls (#40822) next »