# Update Mautic 5.2.6 -\> 6.0.2 (composer-based)

**URL:** <https://forum.mautic.org/t/update-mautic-5-2-6-6-0-2-composer-based/35844>\
**Category:** Mautic 6 Install/Upgrade Support\
**Created:** [June 12, 2025, 10:23am UTC](https://forum.mautic.org/t/update-mautic-5-2-6-6-0-2-composer-based/35844 "2025-06-12T10:23:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jschleucher](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/jschleucher/32/13517_2.png) [@jschleucher](https://forum.mautic.org/u/jschleucher)\
**Post date:** [June 12, 2025, 10:23am UTC](https://forum.mautic.org/t/update-mautic-5-2-6-6-0-2-composer-based/35844/1 "2025-06-12T10:23:19Z")

</div>

**Your software**  
My Mautic version is: 5.2.6  
My PHP version is: 8.3.22  
My Database type and version is: MariaDB 10.11.11

**Your problem**  
I just moved a system running M5.2.6 over to composer (was non-composer install), following [How to switch to Composer — Mautic Documentation 0.1 documentation](https://docs.mautic.org/en/5.x/getting_started/switching_composer.html#), without warnings or errors during that step. The site has been running without visible problems.

I am now trying to upgrade (composer-based) to 6.0.2 following this guide: [How to update Mautic — Mautic Documentation 0.1 documentation](https://docs.mautic.org/en/5.x/getting_started/how_to_update_mautic.html#updating-mautic-composer-based-installs). I changed all occurrences of 5.2.6 to 6.0.2 in `composer.json` and ran `composer update --with-dependencies`.  
This produces a lot of errors, and the php commands (`cache:clear` etc) don’t work anymore.

First, there are some warnings in this build step:

```auto
> npm ci --prefer-offline --no-audit
npm WARN deprecated osenv@0.1.5: This package is no longer supported.
npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated glob@7.1.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported
npm WARN deprecated glob@7.1.7: Glob versions prior to v9 are no longer supported
npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 o

```

Then, after updating themes and co. these errors. (Project root is `/var/www/begegnung`):

```auto
 [WARNING] Some commands could not be registered:

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In getSession_Storage_Factory_ServiceService.php line 24:

  Class "Symfony\Bundle\FrameworkBundle\Session\ServiceSessionFactory" not found

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

 [WARNING] Some commands could not be registered:

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In getSession_Storage_Factory_ServiceService.php line 24:

  Class "Symfony\Bundle\FrameworkBundle\Session\ServiceSessionFactory" not found

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FieldModel.php line 478:

  Mautic\LeadBundle\Model\FieldModel::__construct(): Argument #6 ($fieldList) must be of type Mautic\LeadBundle\Field\FieldList, Mautic\LeadBundle\Field\FieldsWithUniqueIdentifier given,
  called in /var/www/begegnung/var/cache/prod/ContainerAtVkLkd/AppKernelProdContainer.php on line 4473

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

In FilesystemLoader.php line 99:

  The "/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/views" directory does not exist ("/var/www/begegnung/vendor/friendsofsymfony/oauth-server-bundle/Resources/
  views").

```

Another observation (perhaps related??): Restoring the codebase (via restoring `composer.lock` and `composer.json`) and `composer install` does not work for me, but resets the site to the “Mautic is ready to install”. If it’s not related, I do not care about this.

Any help on these errors is greatly appreciated!
