Unable to install eshop via Composer

Most probably there is something wrong with the basic setting of a server, but I always get the same fatal error notification during OXID eShop CE installation. I have my own local Ubuntu 22.04 server with the latest LAMP and I have tried it on a virtual server as well. During the installation from the terminal on the server (composer create-project --no-dev oxid-esales/oxideshop-project /var/www/html-otest/public_html dev-b-6.5-ce) and also from own composer.json file installation results into the same PHP fatal error. Here is the current setting of the important system requirements:

MySql Ver 8.0.32-0buntu0.22.04.1 for Linux on x86_64
PHP 8.1.2-1ubuntu2.10 (cli)
Composer 2.2.6
Apache 2.4.52 (Ubuntu)

This is the error message from the system:

PHP Fatal error: Declaration of Psr\Log\AbstractLogger::emergency($message, array $context = []) must be compatible with Psr\Log\LoggerInterface::emergency(Stringable|string $message, array $context = []): void in /var/www/html-otest/public_html/vendor/psr/log/Psr/Log/AbstractLogger.php on line 22

The above message appears immediately after generating OXID eShop unified namespace classes (message: Done).

I couldn’t find this error anywhere in your discussion forum, nor on any other websites. I have also tried to install an older version of eShop CE (6.0 and 6.2), with the same result. Please advise me what I am doing wrong.

Hello Tom713,

i think the problem is the used composer version.
The supported composer version for OXID 6.5 is Composer 2.2

You can get it with composer selfupdate --2.2

For older OXID versions as for example 6.2.4 / 6.2.5 the supported composer version is 2.1.6

I don´t know OXID would work with MySql 8, the recommended version in the system requirements is 5.5 / 5.7

All requirements are listed in the doc:
https://docs.oxid-esales.com/eshop/en/6.5/installation/new-installation/server-and-system-requirements.html

Kind regards,
Michael

Yes, the “upgrade” of Composer helped. Thank you very much.

I’m not sure I understand this correctly. You said you use composer 2.2.6 to install OXID 6.5. And this version would be the cause of the error. But since this is in the 2.2 branch, I can’t see why this would have been against the system requirements. With which version did it work then?

I don’t understand it either. I got the idea to reinstall Composer when the current version 2.2.6 told me that it does not know ‘self-update’. After installing according to the official instructions (not from the Ubuntu repository), I received version 2.5.2 and I installed OXID eshop without problems.
If you have this possibility, you can try it with the newest version of Ubuntu server (22.04.1).

Interesting. The most important thing is that it works :slight_smile: