infinum / eightshift-libs

Library that is meant to be used inside Eightshift Boilerplate and Eightshift Boilerplate Plugin libs via composer in order to be able to easily set up a modern development process.
https://eightshift.com
MIT License
61 stars 10 forks source link

Scope eightshift-libs during installation #62

Closed gabriel-glo closed 4 years ago

gabriel-glo commented 4 years ago

In a situation in which two instances of boilerplate, with different versions, exist in the same project there is a collision with the classes that use older implementation of libs.

Example: Plugin boilerplate is using newer version and theme is using older version of the libs. Since plugins are loaded earlier than theme, newer Eightshift_Libs namespace will be used and older one (from the theme) will be ignored. This creates fatal errors in theme.

Solution would be to somehow scope or differentiate each installation of libs, so we don't get these collisions. This could be done during the npx installation process but then there is no way to potentially update libs in the future.

iruzevic commented 4 years ago

Implemented