Saw announcement for 4.3 upgrade - composer update not upgrading it to 4.3 but still on 4.2

I saw a bell announcement about the 4.3.1 upgrade available since my Mautic is a composer installed, I opened up terminal and did a composer update and copied the htaccess to the web root. Emptied cache and browser cache …

I am still showing on v 4.2.2

What am I doing wrong?


# composer update
Loading composer repositories with package information
Updating dependencies
Info from https://repo.packagist.org: #StandWithUkraine
Lock file operations: 0 installs, 5 updates, 0 removals

- Upgrading aws/aws-sdk-php (3.222.14 => 3.222.17)
- Upgrading composer/spdx-licenses (1.5.6 => 1.5.7)
- Upgrading doctrine/cache (2.1.1 => 2.2.0)
- Upgrading intervention/image (2.7.1 => 2.7.2)
- Upgrading maennchen/zipstream-php (2.1.0 => 2.2.1)
  Writing lock file
  Installing dependencies from lock file (including require-dev)
  Package operations: 0 installs, 5 updates, 0 removals
- Downloading intervention/image (2.7.2)
- Downloading composer/spdx-licenses (1.5.7)
- Downloading doctrine/cache (2.2.0)
- Downloading aws/aws-sdk-php (3.222.17)
- Downloading maennchen/zipstream-php (2.2.1)
- Upgrading intervention/image (2.7.1 => 2.7.2): Extracting archive
- Upgrading composer/spdx-licenses (1.5.6 => 1.5.7): Extracting archive
- Upgrading doctrine/cache (2.1.1 => 2.2.0): Extracting archive
- Upgrading aws/aws-sdk-php (3.222.14 => 3.222.17): Extracting archive
- Upgrading maennchen/zipstream-php (2.1.0 => 2.2.1): Extracting archive
  Package misd/phone-number-bundle is abandoned, you should avoid using it. Use odolbeau/phone-number-bundle instead.
  Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
  Package symfony/inflector is abandoned, you should avoid using it. Use EnglishInflector from the String component instead.
  Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
  Generating autoload files
  composer/package-versions-deprecated: Generating version class...
  composer/package-versions-deprecated: ...done generating version class
  109 packages you are using are looking for funding.
  Use the `composer fund` command to find out more!
  Symfony recipes are disabled: "symfony/flex" not found in the root composer.json

What about running composer global require symfony/thanks && composer thanks now?
This will spread some 💖 by sending a ★ to the GitHub repositories of your fellow package maintainers.

Scaffolding files for mautic/core-lib:

- Copy [web-root]/.htaccess from assets/scaffold/files/htaccess
#

You should be able to now. We pushed the tag, but forgot to create the release (we haven’t got that bit automated yet).

Please try again.

Still showing 4.2.2 for me …

Screen Shot 2022-05-26 at 8.58.50 AM

Just to confirm, are you following the documented steps to update Mautic Core?

Yes

composer update mautic/core-lib --with-dependencies
Loading composer repositories with package information
Updating dependencies
Info from https://repo.packagist.org: #StandWithUkraine
Lock file operations: 0 installs, 0 updates, 0 removals
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package misd/phone-number-bundle is abandoned, you should avoid using it. Use odolbeau/phone-number-bundle instead.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/inflector is abandoned, you should avoid using it. Use EnglishInflector from the String component instead.
Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
109 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Symfony recipes are disabled: "symfony/flex" not found in the root composer.json

Same issue here. v4.2.2, nothing visible to update when starting composer update (exact same command told in the doc and used by @techbill). I only get:

$ composer update mautic/core-lib --with-dependencies
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package misd/phone-number-bundle is abandoned, you should avoid using it. Use odolbeau/phone-number-bundle instead.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Package symfony/inflector is abandoned, you should avoid using it. Use EnglishInflector from the String component instead.
Package symfony/swiftmailer-bundle is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating autoload files
109 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Symfony recipes are disabled: "symfony/flex" not found in the root composer.json

Scaffolding files for mautic/core-lib:
  - Copy [project-root]/bin/console from assets/scaffold/files/console

I was able to fix it but it only a workaround and they are still discussing on best a solution to this. The workaround is on slack channel link below.

Check this slack thread - Slack

I did the workaround steps show in slack and I was able to successfully upgrade to 4.3.1 but back up fully first and keep in mind it’s not an official fix however so far it’s working for me.

Sadly I don’t have access to this Slack. Would you mind sharing it here?

Torsten Kröger 3 hours ago
How-To update a composer based Mautic 4.2

Create a backup

sudo cp -pr /var/www/mautic /var/www/mautic.backup

composer.json is too restricted in 4.2.2. replace all occurrences of  4.2.2 with ^4.0 using:
sed -ri 's/("mautic\/[a-z\-]+": )"4.2.2"/\1"^4.0"/g' composer.json

Update mautic using:
composer update mautic/* --with-dependencies

Clear cache:
rm -rf /var/www/mautic/docroot/var/cache/*

Restore old Config from Backup:
cp /var/www/mautic.backup/docroot/app/config/local.php /var/www/mautic/docroot/app/config/local.php
2 Likes

Thank you!

1 Like

Did it work for you too?

I’m in the middle of sending a large email campaign, so I’ll try later this week :slight_smile:

1 Like

So I did a quick test on my prod instance (with a snapshot before): I got this message:

## The site is currently offline due to encountering an error. If the problem persists, please contact the system administrator.

#### System administrators, check server logs for errors.

Since it’s prod, I did a rollback.

Was the /var/cache/ folder completely emptied? I get the same error and sometime have to empty cache twice to make it go away.

Yes it was removed. But I will test in my lab :slight_smile:

  Too few arguments to function Mautic\LeadBundle\Segment\Decorator\DecoratorFactory::__construct(), 5 passed in /srv/www/@blabla/bla/mautic/var/cache/  
  prod/ContainerQoyACik/appAppKernelProdContainer.php on line 5216 and exactly 6 expected 

This is what I got after an update.

Okay so @techbill you were right. I did clean the docroot/var/cache folders BUT not the var/cache/ ones!

Now it seems to work.

1 Like

Awesome!

Glad you got it working!