1

I know this must have been asked multiple times, but I can't really find it, and after actually rtfm, I felt I may even ask something that also helps others.

Scenario, Magento delevopment, let's say I want to build a custom e-commerce website with an almost latest core and html5 and just for the hack of it, throw in DISQUS too.

We have 3 projects on github to handle these:

These moduls will partially conflict, as they can all have folders in their project root called app, lib, skin, few others, but they are unlikely to contain the same files in the exact same folders.

My question is, what is the best way to set up my project to be able to upgrade when these projects upgrade?

Thanks in advance!

Peter Aba
  • 31
  • 5

1 Answers1

2

To keep a link between your project and those three components you need, I would recommend referencing them as submodules.

However, as explained in this question, I would recommend keeping separate:

  • your project tree as stored in Git (and visible in your Git local working tree)
  • your project actual structure (ie the one you need for your project to run)

The second one should use symlinks to the first one content, in order to work with the right files in app, lib, skin, while allowing those same directories to be kept separate in the original git submodules.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thank you VonC, you're fast! I need some time to read everything in that stackoverflow page you linked, but its a start. I am really not sure if using symlinks is an option because that might need tens of symlinks per submodule and I may very well need 20 submodules for a website. (I'm thinking of testing frameworks, debugging extensions, payment extensions, delivery extensions, UI enchancements, etc., most of them would have many folders in _app/code_, _app/design/frontend_, _app/design/backend_, _app/etc_, _skin_, _js_ folders and the directory stucture is strict in Magento) – Peter Aba Mar 05 '12 at 09:54
  • @DevMonk: true, in your case symlinks might not be adapted. Is there any possibility to keep `app`, `lib`, `skin` content separate? (as in `app/mod1/...`, `lib/mod1/...`, `...`) – VonC Mar 05 '12 at 10:10
  • It's definitely not supported out of the box. I may find/write some module to override the default behavior, but than it won't be pretty and won't follow common best practices. Not to mention that Magento is slow as hell in itself, this approach would likely make that even worse. (Also, a huge part of Magento's speed issues already come from the fact that it scans a lot of folders for files it needs to include, and it needs hundreds of files per request. But that's another topic.) – Peter Aba Mar 05 '12 at 10:35