Switch to composer mode in running instance

假如想象 提交于 2019-11-30 05:19:01

问题


How can I switch an existing project easily to composer? This project is updated from 6.1 to 8.7 now and should run in composer. A fresh composer setup is not a problem. For the last project I created a new host, installed TYPO3 via composer, installed the extensions via composer and migrated the db, fileadmin and uploads. Is there an easier way?


回答1:


Migrating TYPO3 from Classic Mode to Composer Mode requires at least the following steps:

  1. Write down the current version of TYPO3 and all extensions
  2. Remove all embedded TYPO3 and extension code incl. Git submodules
  3. Add a Composer manifest
  4. Add the Composer vendor-dir (and bin-dir if custom) to your .gitignore
  5. Require TYPO3 and all extensions with the versions and --prefer-lowest, e.g.

    composer require typo3/cms:^8.7.7 --prefer-lowest
    

    This ensures that you don't accidentally perform updates before completing the switch.

Since no further changes to user files or database data is required you will be running TYPO3 in Composer Mode now.

Afterward you will most likely also need to adapt your deployment workflow to ensure at least one composer install is executed after deploying a new version.




回答2:


There is no real other way, at least no automatic way, as you also upgrade maybe to newer versions or sometimes to the exact same version




回答3:


This is now documented in the "Installation and Upgrade Guide": https://docs.typo3.org/m/typo3/guide-installation/master/en-us/MigrateToComposer/Index.html

The steps are already outlined in the accepted answer.

As an alternative, you might want to create an installation from scratch with Composer and then use the generated composer.json for your system.



来源:https://stackoverflow.com/questions/46450764/switch-to-composer-mode-in-running-instance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!