3
votes

I use TYPO3 in composer-mode on my dev-system. I will deploy by copying all generated files to production-system.

I'm wondering if I will need to have composer installed on my production system or is it sufficient when all the "vendor" / "autoload" stuff is just copied to production system.

In other words: does TYPO3 composer-mode require to have composer installed?

Many thanks for replies.

3

3 Answers

7
votes

As you have correctly discovered you don't need Composer once all packages have been installed and autoload info has been dumped.

If you do all this locally or on a CI server and then upload all files, e.g. with rsync then you have a running compilation of your instance. There are no changes to packages or autoload info at runtime which could require Composer.

2
votes

No, composer is not required on the remote server. Indeed, as long as you have all the required files like the vendor folder with all the autoload information it works.

For example if you use (default settings) TYPO3 Surf (https://github.com/TYPO3/Surf), the build is done locally and then all the files are uploaded to the remote server. This way there's no need for (for example) git or composer on the remote server.

1
votes

It's just the other way around and you should not have composer installed on production systems at all!

This way you reduce the risk of installing/upgrading compromised and/or broken packages, since you will be able to test changes on a local or staging environment first before deploying them to the production machine as described in the other answers.