swiftotter/disable-template-validation

1.0.1 2017-02-06 20:03 UTC

This package is not auto-updated.

Last update: 2024-05-06 05:35:29 UTC


README

Credits go to Alan Storm (@astorm)

Magento 2 does not allow symlinked files. This is a security feature. However for some development environments (like ours at SwiftOtter) this can cause issues as we really like keep our files completely separate from Magento (so we don't accidentally mix some core code into the website repository). This also keeps the .gitignore to a minimum.

To solve this, Alan Storm posted this article. It, as usual, is an excellent read.

That said, if you want to take this even a step easier, just use this module:

  • composer require swiftotter/disable-template-validation --dev
  • php bin/magento module:enable SwiftOtter_DisableTemplateValidation
  • php bin/magento setup:upgrade

Notes:

  • This only runs if the deploy mode is set to development.
  • Be aware of the fact that installing the module in the dev composer area means that it isn't installed on production sites (as I hope you are installing composer there with --no-dev). Depending on how you get code to production, and if you track all of Magento in your repository, you may have some issues with modules not being found.