php.net |  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
41 + 11 = ?
Subscribe to this entry?

 
 [2021-03-01 13:02 UTC] jeviwi3279 at timothyjsilverman dot com
Description:
------------
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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-03-01 13:21 UTC] nikic@php.net
-Assigned To: +Assigned To: kocsismate
 [2021-03-01 13:21 UTC] nikic@php.net
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] kocsismate@php.net
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: https://github.com/php/php-src/pull/6709/files#diff-f86ee648d398a68130b2bff8808bcdb6382278eb198f98c5f6e12cb1f051a23eL1878

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] kocsismate@php.net
Automatic comment on behalf of kocsismate@woohoolabs.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=91739b8c8988013b6416d91e7d9489e91f0c9fa5
Log: Fix bug #80816 Document the removal of alias class entries from ext/spl
 [2021-03-03 08:44 UTC] kocsismate@php.net
-Status: Assigned +Status: Closed
 [2021-03-03 08:55 UTC] kocsismate@php.net
I added commit https://github.com/php/php-src/commit/91739b8c8988013b6416d91e7d9489e91f0c9fa5 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: https://github.com/xdebug/xdebug/blob/64682a6e035725b9eaca5598bc0f98d6324caa8e/src/lib/compat.h#L89
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 09:01:26 2024 UTC