While working on a client project for Magento 2 - I've discovered numerous methods of loading in and keeping track of third party extensions.
Going into this assuming that we're using the integrator installation method (composer!), what are the best practices for managing third party extensions?
So far, every extension I've purchased or downloaded has had it's own composer.json file - and I know of at least three different ways extension authors would recommend to install their extension:
- Copy these files into app/code
- Copy this zip into folder, add it is a artifact repository, and require it
- Add this online repository (with/without auth) and require it
So far, I've come across 1 & 2 and am just sort of suspecting #3 exists. But then, noticing that the ones that suggested #1 I found that you can have a "path" repository - moved my extensions from app/code to the same folder I decided to put these artifacts, and required it that way.
In this process, my repositories configuration looks something like:
"repositories": {
"0": {
"type": "composer",
"url": "https://repo.magento.com/"
},
"artifacts": {
"type": "artifact",
"url": "artifacts"
},
"third-party": {
"type": "path",
"url": "artifacts/*/*"
},
},
So my question to you is - what is the best practice here? How do you manage third party extensions?
So far I believe the way I am doing it is the best way - if only because their composer.json gets read and any dependency conflicts (or PHP version constraints) will become apparent - but I don't think that's definitive enough.