Search code examples
gitgit-workflowpimcore

What workflow should I follow to use and update a Pimcore instance in multiple computers, while using GIT?


I want to be able to use and update a Pimcore instance, in multiple computers, while using GIT as version control.

Is there a recommended workflow for in Pimcore (version 4, if it helps) regarding updates and GIT?

In a GIT repository, should I track the pimcore/ folder? and the vendor/ folder?

Either way, what do I have to do to update Pimcore:

  1. Can I update in my pc, commit, and then push the modified pimcore/ and vendor/ folders to other development/production systems? Will it work?

Or

  1. Should I update each instance of Pimcore, and then in some arcane way hope that each pimcore/ and vendor/ folder ends up being the same?

Is there a better option? What workflow do you think is the best?

Thank you.


Solution

    1. It won't work, because updating the source code is not enough. You might also need to update your DB schema, configuration etc. based on the update scripts located at https://github.com/pimcore/pimcore/tree/master/update.

    You could run these scripts manually, but there is a live updater in the pimcore administration (Tools -> Update) which does this for you together with updating pimcore source code (composer libs in /vendor included). Or if you like, you can update via pimcore console tool, see php pimcore/cli/console.php update --help.

    So, I would suggest to .gitignore the /vendor and /pimcore folders and update via the live updater or console tool on each computer separately.

    Regards,

    Martin