I’t trying to upgrade my installations from 4.4.x to latest 6.0.2 .
4.4.X to 5.1 ok
5.1 to 5.2.6 ok
5.2.6 to 6.0.2 error
I’ve created short manual for reproduce.
OS: ubuntu 22.04
php: 8.0 for start
db: mysql 8.0
-
Upgrade versions of apps
apt update -y && apt dist-upgrade -y -
update to actual mautic version - (4.4.11 was on the test server)
cd {/mauticdirectory}
wget https://github.com/mautic/mautic/releases/download/4.4.13/4.4.13-update.zip
sudo -u www-data php bin/console mautic:update:apply --update-package=4.4.13-update.zip
sudo -u www-data php bin/console mautic:update:apply --finish -
remove custom plugins and unsupported official plugin like MauticRecaptchaBundle
-
update to 5.1.1 version
wget https://github.com/mautic/mautic/releases/download/5.1.1/5.1.1-update.zip
sudo -u www-data php bin/console mautic:update:apply --update-package=5.1.1-update.zip
sudo -u www-data php bin/console mautic:update:apply --finish -
install php 8.2
apt install php8.2-{apcu,fpm,cli,curl,mysql,mailparse,gd,mbstring,imagick,bcmath,zip,tidy,soap,intl,xml,imap,redis,opcache} -
change nginx setting for change php version
nano /etc/nginx/sites-enabled
change php8.0-fpm to php8.2-fpm -
del old php 8.0
apt purge php8.0* -
update to 5.2.6 version
wget https://github.com/mautic/mautic/releases/download/5.2.6/5.2.6-update.zip
sudo -u www-data php bin/console mautic:update:apply --update-package=5.2.6-update.zip
sudo -u www-data php bin/console mautic:update:apply --finish -
update to 6.0.2 version
wget https://github.com/mautic/mautic/releases/download/6.0.2/6.0.2-update.zip
sudo -u www-data php bin/console mautic:update:apply --update-package=6.0.2-update.zip
sudo -u www-data php bin/console mautic:update:apply --finish
An error occurred while updating the database. Check log for more details.
Detail error from mautic log
[2025-06-19T10:27:43.126350+00:00] mautic.CRITICAL: Uncaught PHP Exception TypeError: “Cannot assign __PHP_Incomplete_Class to property Symfony\Component\Security\Core\Exception\AuthenticationException::$token of type ?Symfony\Component\Security\Core\Authentication\Token\TokenInterface” at /var/www/mautic/vendor/symfony/security-core/Exception/AuthenticationException.php line 79 {“exception”:“[object] (TypeError(code: 0): Cannot assign __PHP_Incomplete_Class to property Symfony\Component\Security\Core\Exception\AuthenticationException::$token of type ?Symfony\Component\Security\Core\Authentication\Token\TokenInterface at /var/www/mautic/vendor/symfony/security-core/Exception/AuthenticationException.php:79)”} {“hostname”:“msb-dev”,“pid”:50290}
Detailed if run manually
sudo -u www-data php bin/console doctrine:migrations:migrate
WARNING! You are about to execute a migration in database “baza_ss” that could result in schema changes and data loss. Are you sure you wish to continue? (yes/no) [yes]:
yes
[WARNING] You have 49 previously executed migrations in the database that are not registered migrations.
2024-01-27 10:33:12 (20180508202930)
2024-01-27 10:33:13 (20180702014364)
2024-01-27 10:33:13 (20180702014365)
2024-01-27 10:33:14 (20180821144204)
2024-01-27 10:33:15 (20180921144421)
2024-01-27 10:33:15 (20181111095447)
2024-01-27 10:33:15 (20190704154940)
2024-01-27 10:33:17 (20190724110039)
2024-01-27 10:33:17 (20191017140848)
2024-01-27 10:33:18 (20191126093923)
2024-01-27 10:33:18 (20191206113956)
2024-01-27 10:33:19 (20191219155630)
2024-01-27 10:33:19 (20200211095409)
2024-01-27 10:33:20 (20200212141530)
2024-01-27 10:33:20 (20200220172041)
2024-01-27 10:33:20 (20200227110431)
2024-01-27 10:33:20 (20200302164801)
2024-01-27 10:33:20 (20200331160919)
2024-01-27 10:33:21 (20200409102100)
2024-01-27 10:33:21 (20200422144300)
2024-01-27 10:33:21 (20200507122854)
2024-01-27 10:33:22 (20200729170800)
2024-01-27 10:33:23 (20200805185714)
2024-01-27 10:33:23 (20200810153131)
2024-01-27 10:33:24 (20200812180900)
2024-01-27 10:33:24 (20200815153711)
2024-01-27 10:33:24 (20200924080139)
2024-01-27 10:33:24 (20201015084627)
2024-01-27 10:33:24 (20201102120710)
2024-01-27 10:33:24 (20201102133546)
2024-01-27 10:33:25 (20201105120328)
2024-01-27 10:33:25 (20201120122846)
2024-01-27 10:33:26 (20201123070813)
2024-01-27 10:33:27 (20201125155904)
2024-01-27 10:33:27 (20201130201631)
2024-01-27 10:33:27 (20201207114926)
2024-01-27 10:33:27 (20201207140911)
2024-01-27 10:33:27 (20201228041109)
2024-01-27 10:33:28 (20210104171005)
2024-01-27 10:33:28 (20210203143600)
2024-01-27 10:33:29 (20210223174702)
2024-01-27 10:33:29 (20210502162314)
2024-01-27 10:33:29 (20210520100503)
2024-01-27 10:33:30 (20210609191822)
2024-01-27 10:33:30 (20210614151138)
2024-01-27 10:33:30 (20210623071326)
2024-01-27 10:33:31 (20220111202917)
2024-01-27 10:33:31 (20230519081315)
2024-01-27 10:33:31 (20230522115137)
Are you sure you wish to continue? (yes/no) [yes]:
yes
[notice] Migrating up to Mautic\Migrations\Versionzz20230929183000
[notice] Migration Mautic\Migrations\Version20201026101117 skipped during Pre-Checks. Reason: “Schema includes this migration”
[notice] The index ss_company_match does not exist in the ss_companies table.
[error] Migration Mautic\Migrations\Version20211020114811 failed during Execution. Error: “An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1091 Can’t DROP ‘ss_company_match’; check that column/key exists”
In ExceptionConverter.php line 117:
An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1091 Can’t DROP ‘ss_company_match’; check that column/key exists
In Exception.php line 28:
SQLSTATE[42000]: Syntax error or access violation: 1091 Can’t DROP ‘ss_company_match’; check that column/key exists
In Connection.php line 71:
SQLSTATE[42000]: Syntax error or access violation: 1091 Can’t DROP ‘ss_company_match’; check that column/key exists
doctrine:migrations:migrate [–write-sql [WRITE-SQL]] [–dry-run] [–query-time] [–allow-no-migration] [–all-or-nothing [ALL-OR-NOTHING]] [–configuration CONFIGURATION] [–em EM] [–conn CONN] [–] []
sudo -u www-data php bin/console doctrine:migrations:status
±---------------------±---------------------±-----------------------------------------------------------------------+
| Configuration |
±---------------------±---------------------±-----------------------------------------------------------------------+
| Storage | Type | Doctrine\Migrations\Metadata\Storage\TableMetadataStorageConfiguration |
| | Table Name | ss_migrations |
| | Column Name | version |
|----------------------------------------------------------------------------------------------------------------------|
| Database | Driver | Doctrine\DBAL\Driver\PDO\MySQL\Driver |
| | Name | baza_ss |
|----------------------------------------------------------------------------------------------------------------------|
| Versions | Previous | Mautic\Migrations\Version20240708153845 |
| | Current | Mautic\Migrations\Versionzz20230929183000 |
| | Next | Mautic\Migrations\Version20201026101117 |
| | Latest | Mautic\Migrations\Versionzz20230929183000 |
|----------------------------------------------------------------------------------------------------------------------|
| Migrations | Executed | 93 |
| | Executed Unavailable | 49 |
| | Available | 63 |
| | New | 19 |
|----------------------------------------------------------------------------------------------------------------------|
| Migration Namespaces | Mautic\Migrations | /var/www/mautic/app/migrations |
±---------------------±---------------------±-----------------------------------------------------------------------+