在运行实例中切换到作曲家模式 [英] Switch to composer mode in running instance

查看:25
本文介绍了在运行实例中切换到作曲家模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何轻松地将现有项目切换到作曲家?这个项目现在从 6.1 更新到 8.7,应该在 composer 中运行.新的作曲家设置不是问题.对于上一个项目,我创建了一个新主机,通过 composer 安装了 TYPO3,通过 composer 安装了扩展,并迁移了 db、fileadmin 和上传.有没有更简单的方法?

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?

推荐答案

将 TYPO3 从 Classic Mode 迁移到 Composer Mode 至少需要以下步骤:

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

  1. 记下 TYPO3 的当前版本和所有扩展
  2. 删除所有嵌入的 TYPO3 和扩展代码,包括.Git 子模块
  3. 添加 Composer 清单
  4. 将 Composer vendor-dir(以及 bin-dir 如果自定义)添加到您的 .gitignore
  5. 需要 TYPO3 和所有带有版本和 --prefer-lowest 的扩展,例如

  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.

由于不需要进一步更改用户文件或数据库数据,您现在将在 Composer 模式下运行 TYPO3.

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

之后,您很可能还需要调整您的部署工作流程,以确保在部署新版本后至少执行一个 composer install.

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.

这篇关于在运行实例中切换到作曲家模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆