rankmath / seo-by-rank-math

Rank Math is a revolutionary WordPress SEO Plugin that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible :bulb: :chart_with_upwards_trend: →
https://rankmath.com
107 stars 52 forks source link

Protect your dependencies to prevent potentials conflicts with other plugins #279

Open CrochetFeve0251 opened 5 months ago

CrochetFeve0251 commented 5 months ago

Hey, Now you are also group.one folks so why not helping each others?

I looked quickly at your code base and I saw two points that might interest you to improve as you are also a plugin used by millions of websites.

Is your feature request related to a problem? Please describe. I see in your repository you are using Composer and that's a great thing as it enable you to use modern PHP inside your plugin but with great powers comes great responsibilities.

In WordPress env, we are like in a flat and something loaded on the main namespace is more room for conflict and by default composer loads libraries into the main namespace leading to a conflict when another plugin uses the same dependency as you but on a different version.

Describe the solution you'd like To prevent that it is possible to use coenjacobs/mozart or brianhenryie/strauss to protect your dependencies.

Theses libraries will add a custom namespace before your dependencies preventing any conflicts with other plugins using the same dependencies.