Skip to content

feat(static): add deepclone to the default extensions - #2699

Merged
dunglas merged 1 commit into
php:mainfrom
soyuka:static-deepclone
Oct 9, 2026
Merged

dunglas merged 1 commit into
php:mainfrom
soyuka:static-deepclone

Conversation

@soyuka

@soyuka soyuka commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

deepclone is the native implementation of Symfony's DeepCloner: from symfony/var-exporter 8.1, VarExporter::export() (so the cache.system PHP files) and the ArrayAdapter go through deepclone_to_array(), using the pure-PHP polyfill when the extension isn't loaded. The extension is several times faster on large object graphs.

static-php-cli already knows it (config/ext.json, sourced from the GitHub tags of symfony/php-ext-deepclone), so it's only a matter of adding it to the default list.

Related: dunglas/symfony-docker#972 installs it in the Docker image, symfony/php-ext-deepclone#63 makes that possible with install-php-extensions.

@dunglas
dunglas merged commit 9af738c into php:main Oct 9, 2026
21 of 22 checks passed
@dunglas

dunglas commented Oct 9, 2026

Copy link
Copy Markdown
Member

Thanks!

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.

2 participants