Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle / prefix dependencies to avoid conflicts with other plugins #1452

Open
borekb opened this issue May 19, 2019 · 1 comment
Open

Bundle / prefix dependencies to avoid conflicts with other plugins #1452

borekb opened this issue May 19, 2019 · 1 comment
Labels
scope: dev-infrastructure Build scripts, IDE settings, CI, Docker dev stack, testing, tooling, etc.
Milestone

Comments

@borekb
Copy link
Member

borekb commented May 19, 2019

We depend on packages like phpmyadmin/sql-parser or symfony/process, which we manage by Composer.

The problem is that if other plugins use this approach as well (which is increasingly likely, especially for the more complex ones), there might be version conflicts. For example, if VersionPress depends some-library at version 1.0 and another plugin at version 2.0, there will very likely be hard to debug errors for the user.

We've known about this problem for a while, see #188, but maybe we should revisit it as in the meantime, some possible solutions popped up:

Another approach might be to bundle everything to a single file, similarly to webpack, but I'm not sure anything like that exists for PHP or that WordPress plugin reviewers would be too happy about it :)

The tools above would need to be tested, they are probably quite fragile by nature.

Some more resources about this:

@borekb borekb added this to the 5.0 milestone May 19, 2019
@borekb borekb added the scope: dev-infrastructure Build scripts, IDE settings, CI, Docker dev stack, testing, tooling, etc. label May 19, 2019
@borekb
Copy link
Member Author

borekb commented Jul 3, 2019

Delicious Brains recently blogged about this: PHP Scoper: How to Avoid Namespace Issues in your Composer Dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: dev-infrastructure Build scripts, IDE settings, CI, Docker dev stack, testing, tooling, etc.
Projects
None yet
Development

No branches or pull requests

1 participant