Upgrade to 4.0.0-rc (by replacing that stateless image)
Wait for startup and migrations
Error 500
Logs
PHP log:
mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Attempted to load class "OAuthRequestListener" from namespace "Mautic\ApiBundle\EventListener\OAuth1". Did you forget a "use" statement for another namespace?" at /data/cache/prod/ContainerEmEgjKk/appAppKernelProdContainer.php line 2336 {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Attempted to load class \"OAuthRequestListener\" from namespace \"Mautic\ApiBundle\EventListener\OAuth1\".\nDid you forget a \"use\" statement for another namespace? at /data/cache/prod/ContainerEmEgjKk/appAppKernelProdContainer.php:2336)"} []
Docker log:
Everything normal, including migrates:
========================================================================
Applying any needed database migrations
[2021-07-31 17:07:05]
[2021-07-31 17:07:05] Mautic Migrations
[2021-07-31 17:07:05]
[2021-07-31 17:07:05] Migrating up to 20210609191822 from 20210502162314
[2021-07-31 17:07:05]
++ migrating 20210609191822
[2021-07-31 17:07:06] -> ALTER TABLE oauth1_access_tokens DROP FOREIGN KEY FK_C33AC86237FDBD6D
[2021-07-31 17:07:06] -> ALTER TABLE oauth1_request_tokens DROP FOREIGN KEY FK_80F3C6EA37FDBD6D
[2021-07-31 17:07:06] -> DROP TABLE oauth1_access_tokens
[2021-07-31 17:07:06] -> DROP TABLE oauth1_consumers
[2021-07-31 17:07:06] -> DROP TABLE oauth1_nonces
[2021-07-31 17:07:06] -> DROP TABLE oauth1_request_tokens
[2021-07-31 17:07:06]
++ migrated (took 431.6ms, used 46.5M memory)
[2021-07-31 17:07:06]
------------------------
[2021-07-31 17:07:06] ++ finished in 434.9ms
[2021-07-31 17:07:06] ++ used 46.5M memory
[2021-07-31 17:07:06] ++ 1 migrations executed
[2021-07-31 17:07:06] ++ 6 sql queries
========================================================================
I would expect it will remove /data/caches automatically when version change was detected.
---
Want to back this issue? **[Post a bounty on it!](https://app.bountysource.com/issues/108499078-fatalthrowableerror-attempted-to-load-class-oauthrequestlistener-on-upgrade?utm_campaign=plugin&utm_content=tracker%2F20392502&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://app.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F20392502&utm_medium=issues&utm_source=github).
I've upgraded Mautic, but it end up on 500 error, probably because caches were not cleared by migrate script - removing cache directory solved issue.
Steps to reproduce
Logs
PHP log:
Docker log: Everything normal, including migrates:
I would expect it will remove /data/caches automatically when version change was detected.