You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
command returns paths outside of the magento basedir when modules are symlinked in by composer into vendor from outside of the magento basepath.
The removal of basepath from these modules path (who's path doesnt start with basepath) causes the path to be butchered by removing a fixed length string (length of basepath + 1) from the beginning of the path.
Thanks for the issue. As stated in the comment linked from the function doc, if the method doesn’t return a relative path, it causes issues with instances in a virtualized environment, if the cleaner is run outside the virtual environment, and the path to the base dir differs in the container and outside.
I currently see no easy way to change that while still supporting that kind of scenario.
Yeah, I can see the dilema. Its unfortunate as symlinking in external modules into vendor, is core composer functionality, and a common development use case.
Workaround is to ensure that third party/external/shared modules are checkout out under the magento base root, e.g <magentobaseroot>/ext/<vendor>/<module> and then the file based repository path set to ext// in composer.json
The downside being if the modules are shared between several projects, you have to have multiple copies checked out.
If the default logic cannot be changed, then perhaps a command line argument could be the way forward to allow both schemes to coexist? Something to ponder over.
The
\Magento\Framework\Component\ComponentRegistrar->getPaths('module')
command returns paths outside of the magento basedir when modules are symlinked in by composer into vendor from outside of the magento basepath.
The removal of basepath from these modules path (who's path doesnt start with basepath) causes the path to be butchered by removing a fixed length string (length of basepath + 1) from the beginning of the path.
magento-cache-clean/src/cache/config/php.cljs
Lines 38 to 58 in 20c7295
The text was updated successfully, but these errors were encountered: