Skip to content

Conversation

@adamziel
Copy link
Collaborator

Summary

When the PHP Toolkit is used alongside other plugins or WP-CLI packages that bundle the same libraries (like rowbot/url, brick/math, or psr/log), PHP class redefinition errors occur because both distributions load identically-named classes.

This change adds a VendorPrefix\ prefix to all bundled vendor namespaces, so classes like Rowbot\URL\URL become VendorPrefix\Rowbot\URL\URL. This isolates our dependencies and allows the importer to coexist with any other package that bundles the same libraries.

Test plan

Confirm all the CI checks are green.

Related to WordPress/wordpress-importer#248 and https://github.com/WordPress/wordpress-importer/issue/245

@adamziel adamziel added the enhancement New feature or request label Nov 29, 2025
@adamziel adamziel marked this pull request as ready for review November 29, 2025 23:39
@adamziel adamziel marked this pull request as draft November 30, 2025 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants