Composer install, error on trying to upgrade from 4.2.0 to 4.2.1

Your software
My Mautic version is: 4.2.0
My PHP version is: 7.4
My Database type and version is: mysql8

Your problem
My problem is:
I just did a clean install of Mautic with composer, everything went “okay”. Then i got the notification that Mautic is still running 4.2.0 and there is an update to 4.2.1, so i searched for some documentation on this and could find nothing. Then went into /var/www/mautic/bin and ran the update:find command and got the following error:

PHP Warning: require_once(/var/www/mautic/bin/../app/autoload.php): failed to open stream: No such file or directory in /var/www/mautic/bin/console on line 21
PHP Fatal error: require_once(): Failed opening required '/var/www/mautic/bin/../app/autoload.php' (include_path='.:/usr/share/php') in /var/www/mautic/bin/console on line 21

I am still struggling to get my head around the new file structure and this docroot (which i understand is for secruity reasons) but then bin is sitting in the root.

Am I updating correctly, or now that we use composer is there a different way to update to new versions ?

We have a couple of bugs which we’re working on currently, per the discussion on #composer in Slack. We’ve got some developer resources working through it at the moment in Mautic Developer Days so hopefully we’ll have this addressed this week.

I just cleared the cache and Mautic totally went down. I am usually pretty good at getting this up running again, but with the new structure and composer I am at a loss.
@rcheesley would you recommend for a production environment to stick with the classic installation of Mautic ?

BTW, here are my errors from after clearing the cache:

2022/04/06 11:27:19 [error] 96399#96399: *1381 FastCGI sent in stderr: "PHP message: TypeError: Argument 1 passed to Doctrine\DBAL\Configuration::setResultCacheImpl() must implement interface Doctrine\Common\Cache\Cache, instance of Symfony\Component\Cache\Adapter\ArrayAdapter given, called in /var/www/mautic/docroot/var/cache/prod/Container51HTOCg/appAppKernelProdContainer.php on line 2317 - in file /var/www/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php - at line 63" while reading response header from upstream, client:, server:, request: "GET /s/dashboard HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "", referrer: "http://mymauitc/s/login"

I have the same problem with version 4.2. Any suggestions or workarounds?

I installed the old fashion way :slight_smile:

Really hoping someone who understands composer and the new installation on ubuntu writes up a comprehensive tutorial.

glad that fixed it for you :slight_smile:

I think this PR should fix the problem for good use a more strict constraint for doctrine-bundle by mollux · Pull Request #11053 · mautic/mautic · GitHub