Skip to content

v4: add the ds extension, versions 1 and 2 - #373

Merged
mnapoli merged 2 commits into
4.xfrom
v4-ds
Dec 2, 2026
Merged

mnapoli merged 2 commits into
4.xfrom
v4-ds

Conversation

@mnapoli

@mnapoli mnapoli commented Dec 2, 2026

Copy link
Copy Markdown
Member

The ds extension (data structures) in both major versions, installed but not loaded: users enable one of them with extension=ds1 or extension=ds2 in php/conf.d/*.ini.

ds 2.0 removed most of 1.x's API (Vector, Deque, Stack, Queue, PriorityQueue, Sequence, Hashable, replaced by Seq, Heap, Key), so code written for 1.x does not run on 2.x. Both are compiled as ds1.so and ds2.so (the module is called ds in both). There is no plain ds.so, so that extension=ds never picks a major version silently. Enabling both prints Module "ds" is already loaded and keeps the first one.

8.3 8.4 8.5 8.6
ds1 (1.8.0) ✓ ✓ ✓ –
ds2 2.0.0 2.0.0 2.0.0 master, pinned
  • ds 1.x does not compile with PHP 8.6 and is no longer developed (8.6 was only fixed on the 2.x branch), so ds1 stops at PHP 8.5 rather than carrying a patch.
  • ds 2.0.0 does not compile with PHP 8.6 either: master is pinned until the next release, like APCu, redis and xdebug.

Users of the v3 extra layer (ds 1.6.0) should know that ds 1.8 changed the serialization format (Serializable was removed): Ds objects serialized with 1.6 (e.g. in a cache) may not unserialize.

@mnapoli mnapoli self-assigned this Dec 2, 2026
# Conflicts:
#	tests/test_2_extensions.php
#	tests/test_3_manual_enabling_extensions.php
#	tests/test_3_manual_extensions.ini
@mnapoli
mnapoli merged commit 05ce21f into 4.x Dec 2, 2026
@mnapoli
mnapoli deleted the v4-ds branch December 2, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant