When following the official installation instructions for Typo3 8.7.16 via DDEV and Composer, the first two of the commands below succeed, but I encounter a fatal PHP error on the third one (ddev composer install
).
ddev config --project-type=typo3 --docroot=public --php-version 7.4 --webserver-type 'apache-fpm'
ddev composer create --no-install "typo3/cms-base-distribution:^8.7"
ddev composer install
I got prompted to trust typo3/cms-composer-installers
because it contains a plugin.
typo3/cms-composer-installers contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "typo3/cms-composer-installers" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?]
And on hitting y
for confirmation, I receive this fatal error:
- Installing typo3/cms-composer-installers (v1.5.10): Extracting archive
PHP Fatal error: Declaration of TYPO3\CMS\Composer\Installer\Downloader\T3xDownloader2::extract(Composer\Package\PackageInterface $package, $file, $path) must be compatible with Composer\Downloader\ArchiveDownloader::extract(Composer\Package\PackageInterface $package, string $file, string $path): React\Promise\PromiseInterface in /var/www/html/vendor/typo3/cms-composer-installers/src/Installer/Downloader/T3xDownloader2.php on line 32
exit status 255
Composer [install] failed, composer command failed: exit status 255. stderr=
So T3xDownloader2::extract
must, but is not compatible with ArchiveDownloader::extract
. How can this be solved? I assume the problem can be easily reproduced having Docker and DDEV installed, since it's all containerized.
In contrast to this, the installation instructions for Typo3 12 via DDEV and Composer for example work perfectly fine.
First of all, TYPO3 v8 is now for a really long time unsupported (community) and also quite a long time out of extended long time support (paid).
That means, that nearly no one is working on such old documentation for old version, as nearly all of the contribors in the community are doing that for free.
TYPO3 v8 was one of the first versions which could be installed with composer and also had work done working to a really composer mode. Back then, only composer 1.x exists and like every think around that time. That includes dependencies and also required installers.
ddev, moving forwared and keeping up-to-date with modern versions installs composer 2.x in the web-container.
The allowed plugin
notice is a good indicator for that, because that was introduced in composer 2.x only.
That means, you need to ensure to have composer 1.x installed within the ddev container. Use the --composer-version
option for the ddev config
command to set the version.
ddev stop \
&& ddev config --composer-version "1" \
&& ddev start
If that does not help, it could be that you need to enforce rebuilding the project. See ddev help for that.
The composer installers 1.x is not compatible with composer 2.x and is no longer maintained for that version, because TYPO3 v8 is unmaintained. There is also no way to use newer versions of the composer installers for that old TYPO3 version.
I'd really recommend that you update your project to a newer maintained TYPO3 version (12.4 LTS, 13.4LTS) or one of the ELTS versions (only when you have access to them - otherwise you get only the latest community supported version and missing all the security updates released in the ELTS, which is a paid service to provide extended long time support).
If you tried to start new - stop it and start directly with a newer version.