Home > Blockchain >  Is there a simple way to create a composer.json in Typo3 (already composer installation)
Is there a simple way to create a composer.json in Typo3 (already composer installation)

Time:08-12

i took on a project from a customer, that has the following setup:

  • a Typo3 V10.4.12 (already a composer installation)
  • there are already extensions installed
  • no extension manager in the Typo3 backend

So the problem is: I need to install some additional extensions (blog, mask). But there is no (main) composer.json file in the project. I don´t know what happened (maybe deleted by the former developer by mistake?). There is no backup of the file etc.

Is there a way to automatically generate a composer.json? Or do i have to write it by my own?

Thanks in advance! harleqeen247

CodePudding user response:

There is a EXT:migrate2composer, maybe it can help you.

To configure/change the installation, maybe the CLI could help you if you have a working shell:

In a composer installation execute:

./vendor/bin/typo3 

In a non-composer installation execute:

php ./typo3/sysext/core/bin/typo3 

There's also a tutorial "Migrate TYPO3 Project to Composer" as part of the official docs, but this seems to match your case.

CodePudding user response:

Thank you. The extension migrate2composer worked (at least on a local dev environment).

I did the following:

  1. Deactivate composer mode (in vendor/typo3/autoload-include.php)
  2. Install migrate2composer via extension manager
  3. Run command from extension migrate2composer to print and show all "composer-errors" -> result was the required composer.json
  4. Add the new composer.json and reactivate composer mode
  5. Installed the required extensions via composer

Regards

  • Related