|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80816 Missing symbol spl_ce_Countable
Submitted: 2021-03-01 13:02 UTC Modified: 2021-03-01 13:21 UTC
From: jeviwi3279 at timothyjsilverman dot com Assigned: kocsismate (profile)
Status: Closed Package: Compile Failure
PHP Version: master-Git-2021-03-01 (snap) OS: macOS
Private report: No CVE-ID: None
 [2021-03-01 13:02 UTC] jeviwi3279 at timothyjsilverman dot com
Has the alias spl_ce_Countable for zend_ce_countable in SPL removed in master. I could not find this change in the changelog. This would be a breaking change for many extensions.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-01 13:21 UTC]
-Assigned To: +Assigned To: kocsismate
 [2021-03-01 13:21 UTC]
It did get dropped, but it might make sense to restore it?
 [2021-03-01 13:34 UTC] jeviwi3279 at timothyjsilverman dot com
Yes, it will be a breaking change for many extensions when they are compiled for PHP 8.1.

If it is not much effort, it should be restored now and removed later in a major release. Otherwise please add it to the changelog.
 [2021-03-01 17:48 UTC]
To be honest, I'd prefer simply adding the related changelog entry, and not to restore this alias (and the few other ones). These aliases were only needed due to technical reasons, since SPL did some macro magic, like this:

Such breaking changes (which affect extension internals) can happen in minor releases. Of course, we don't want to cause very large BC breaks, but this one seems like a very small one for me. Are you sure that a lot of extensions are affected?
 [2021-03-01 18:57 UTC] jeviwi3279 at timothyjsilverman dot com
It affects the latest releases of the following PECL extensions. 21 in total.
I did not check how many of these support PHP 8+ though.

AOP, cassandra, ds, hidef, ice, imagick, Judy, mongodb, pecl_http, phalcon, phar, pq, protobuf, pthreads, rdkafka, riak, Weakref, WinBinder, xrange, yaf, zip
 [2021-03-03 08:44 UTC]
Automatic comment on behalf of
Log: Fix bug #80816 Document the removal of alias class entries from ext/spl
 [2021-03-03 08:44 UTC]
-Status: Assigned +Status: Closed
 [2021-03-03 08:55 UTC]
I added commit to document the change.

zend_ce_countable et al. are available from PHP 7.2, so that spl_ce_Countable et al. can be directly replaced with them. I think If it's not possible by any reason, extensions can conditionally declare these aliases themselves. An example for such an alias:
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 19 20:03:34 2021 UTC