- The Pipedrive Plugin has been removed from Mautic Core, you can use https://www.mautic.org/blog/integrator/exciting-news-new-integration-plugin-pipedrive-crm instead.
- The Citrix Plugin has been removed from Mautic Core. you can use https://www.leuchtfeuer.com/en/mautic/downloads/mautic-goto-plugin/ instead.
- The LinkedIn plugin has been removed from Mautic Core as it did not work with new LinkedIn API. See mautic#12147
- The calendar feature was removed. See mautic#11270
- The Froala assets are disabled by default. Enable them if you use the legacy email or page builder. See mautic#12416
- New shortening service in Mautic 5, reconfiguration is needed after migrating to Mautic 5. A user reads the documentation to understand how to set it up in the configuration.
The underlying library used for sending emails (Swift Mailer) was discontinued and Mautic 5 is using the Symfony Mailer library instead. There are user facing changes coming with this change.
- All the email transports were removed from Mautic's core and must be re-created as separate plugins.
- The good news is that Mautic now supports email transports created for Symfony Mailer.
- SMTP transport is the only transport supported by Mautic after fresh installation.
- The "Email Step" was removed from the installation wizzard because the transports were removed. The email transport must be configurad right after Mautic installation.
- The email transport configuration has changed from various fields unique for each transport to unified "DSN". Any transport can be configured using the same form. There is a migration that should handle most of the email transport configuration from Mautic 4 and re-configure it for Mautic 5.
- The command
bin/console mautic:emails:send
for sending emails via cron jobs was removed and now Symfony Messenger is used instead. Use this command to start a consumer:bin/console messenger:consume email
. The Messenger in the async configuration can work with various queues.
- Platform Requirements
- Minimal PHP version was increased from 7.4 to 8.0 and 8.1.
- Configuration
- Replace all occurances of
%kernel.root_dir%
to%kernel.project_dir%/app
as the "root_dir" was deprecated in Symfony 4 and removed in Symfony 5. The "project_dir" variable is path to the Mautic root directory. The "root_dir" variable was path to the app directory. - The index_dev.php was removed. Use env variables to set the environment.
- We are following symfony env naming convention. synfomy 4.4
.env
contains default values for the environment variables needed by the app.env.local
uncommitted file with local overrides.env.$APP_ENV
committed environment-specific defaults.env.$APP_ENV.local
uncommitted environment-specific overrides
- The system run similar index_dev.php if you use
APP_ENV=dev
andAPP_DEBUG=1
in your .env.local file. - Remove Custom shortener API URL from configuration (link_shortener_url variable) and remove
Mautic\CoreBundle\Helper\UrlHelper::buildShortUrl()
method. As a developer, use the \Mautic\CoreBundle\Shortener\Shortener::class service. - the application config (
/app/config
) was separated from local config (/config
) to make Mautic more compatible with a Composer based workflows.
There is a Doctrine migration that moves the local config files to the new directory.
- Replace all occurances of
- Installation
- The email step was removed from both GUI and CLI installers.
- The installation is considered completed once
db_driver
andsite_url
parameters are set. It used to bedb_driver
andmailer_from_name
.
- Mailer
- The Swiftmailer library was replaced with SymfonyMailer. Details in mautic#11613
- There is only one callback route for all transports now. Changed from
/mailer/{transport}/callback
to/mailer/callback
. Mautic\EmailBundle\Mailer\Exception\UnsupportedTransportException
was removed. UseEmailEvents::ON_TRANSPORT_WEBHOOK
instead.Mautic\EmailBundle\Mailer\Transport\CallbackTransportInterface
was removed. UseEmailEvents::ON_TRANSPORT_WEBHOOK
instead.Mautic\EmailBundle\Event\TransportWebhookEvent
does not have the transport in it. Each transport must validate the callback payload and decide if they are able to process it or not. If so, set theResponse
to the event to indicate success.Swift_Message
was replaced withMautic\EmailBundle\Mailer\Message\MauticMessage
.Swift_Transport
was replaced withSymfony\Component\Mailer\Transport\TransportInterface
.- The following classes were removed without any replacement:
Mautic\EmailBundle\Exception\PartialEmailSendFailure
Mautic\EmailBundle\Helper\PlainTextMessageHelper
Mautic\EmailBundle\Model\TransportType
Mautic\EmailBundle\DependencyInjection\Compiler\SpoolTransportPass
Mautic\EmailBundle\DependencyInjection\Compiler\EmailTransportPass
Mautic\EmailBundle\DependencyInjection\Compiler\SwiftmailerDynamicMailerPass
- All configuration keys connected with the email transports (starting with
mailer_
) were replaced with the single configuration keymailer_dsn
. - All classes the resided in the
app/bundles/EmailBundle/SwiftMailer
were removed. - Spooling was removed in favour of the queuing functionality provided by the Symfony messenger.
- Commands
- The command
bin/console mautic:segments:update
will no longer update the campaign members but only the segment members. Use also commandbin/console mautic:campaigns:update
to update the campaign members if you haven't already. Both commands are recommended from Mautic 1. - Command
Mautic\LeadBundle\Command\CheckQueryBuildersCommand
and the methods it use:Mautic\LeadBundle\Model\ListModel::getVersionNew()
Mautic\LeadBundle\Model\ListModel::getVersionOld()
mautic:broadcast:send --limit=10 --batch=2
fix process emails with combination of parameters limit/batch. Before it processed all emails with batch 10. Now process 10 emails with batch 2. If you used to use before, probably you need change it.
- The command
- Services
- Repository service
mautic.user.token.repository
forMautic\UserBundle\Entity\UserTokenRepository
was removed as it was duplicated. Usemautic.user.repository.user_token
instead. - In tests replace
self::$container->get('mautic.http.client.mock_handler')
withself::$container->get(\GuzzleHttp\Handler\MockHandler::class)
to get HTTP client mock handler.
- Repository service
- JS Dependencies
- Most of the JS libraries were moved from hard-coded location in the CoreBundle to package.json so we can manage them with NPM
- This means that when you run
composer install
then it will also runnpm install
to download JS dependencies andbin/console mautic:assets:generate
to build the production assets. - Libraries
jquery-color
,jquery-play-sound
andhtml5notifications
were removed as unused. Details in mautic#12265. - Library
jvectormap
was replaced with its accessorjvectormap-next
as it was unmaintaned. Details in mautic#12359. - Library
quicksearch
was updated from unmaintained vendor to latest version of its successor. Details in mautic#12372. - Library
jQueryUI
was updated from version 1.12.1 to 1.13.2. Details in mautic#12394. - Modernizr JS was upgraded from 2.8.3 to 3.12.0 and reduced to only used features. Details in mautic#12402.
- CK editor was upgraded from v4 to v5. See mautic#12641.
- Other
Mautic\UserBundle\Security\Firewall\AuthenticationListener::class
no longer implements the deprecatedSymfony\Component\Security\Http\Firewall\ListenerInterface
and was made final. Thepublic function handle(GetResponseEvent $event)
method was changed topublic function __invoke(RequestEvent $event): void
to support Symfony 5.Mautic\IntegrationsBundle\Configuration\PluginConfiguration
removed - we don't use itMautic\SmsBundle\Callback\ResponseInterface
removed - we don't use itMautic\CoreBundle\Controller\AbstractModalFormController
removed - we don't use itMautic\CoreBundle\Templating\Helper\ExceptionHelper
removed - we don't use itMautic\LeadBundle\Model\LeadModel::getContactFromRequest()
method removed. UseMautic\LeadBundle\Helper\ContactRequestHelper::getContactFromQuery()
instead.Mautic\LeadBundle\Model\LeadModel::mergeLeads()
method removed. Use\Mautic\LeadBundle\Deduplicate\ContactMerger::merge()
directly.Mautic\LeadBundle\Model\LeadModel::checkForDuplicateContact()
method do not take Lead as a second parameter anymore and so it do not merges contacts. Use\Mautic\LeadBundle\Deduplicate\ContactMerger::merge()
afterwards.- Class
Mautic\LeadBundle\Model\LegacyLeadModel
removed. Use\Mautic\LeadBundle\Deduplicate\ContactMerger
instead. - Method
Mautic\ReportBundle\Event\ReportGeneratorEvent::applyTagFilter()
removed. UseMautic\ReportBundle\Builder\MauticReportBuilder::getTagCondition()
instead. - Class
Mautic\CoreBundle\Form\DataTransformer\EmojiToShortTransformer
was removed. Details Mautic\CoreBundle\Doctrine\AbstractMauticMigration::entityManager
protected property was removed as unused.- The User entity no longer implements
Symfony\Component\Security\Core\User\AdvancedUserInterface
as it was removed from Symfony 5. These methods required by the interface were also removed:Mautic\UserBundle\Entity\User::isAccountNonExpired()
Mautic\UserBundle\Entity\User::isAccountNonLocked()
Mautic\UserBundle\Entity\User::isCredentialsNonExpired()
Mautic\UserBundle\Entity\User::isEnabled()
- Two French regions were updates based on ISO_3166-2 (Val-d'Oise, La Réunion). If you use it in API, please change values to Val d'Oise or Réunion
AbstractMauticTestCase::loadFixtures
andAbstractMauticTestCase::loadFixtureFiles
now accept only two arguments:array $fixtures
andbool $append
. If you need to use old parameters - refer to the documentation ofLiipTestFixturesBundle
- Transactional emails in campaigns ignore the DNC setting.
- There are no unsubscribe headers in transactional emails.
- The SortablePanels templates, JS and CSS was removed as unused.
- Country name of Swaziland was update to Eswatini based on Standard: ISO 3166.
- Region names in Austria, Germany and Switzerland were updated based on Standard: ISO_3166-2.
Mautic\CoreBundle\Controller\CommonController::addFlash()
was renamed toCommonController::addFlashMessage()
to prevent naming collision withSymfony\Bundle\FrameworkBundle\Controller\AbstractController::addFlash()
. Controllers adding flash messages should use$this->addFlashMessage()
.- Deprecated cookie
mtc_sid
removed. - The dev dependency
php-http/mock-client
was removed as abandoned and unused. See mautic#12439 'mautic.guzzle.client'
service was removed. Use'mautic.http.client'
instead.- Removed onlyForBC themes: coffee, Mauve, nature
- Replaced asset minification library
mrclay/minify
withmatthiasmullie/minify
for faster asset generation.
QueueBundle removed in favor symfony's messenger, see: readme
- Related configuration is no longer valid.
- Events removed without replacement: QueueEvents, Event\QueueConsumerEvent, Event\QueueEvent
QueueService
removed without replacement- Helper removed
app/bundles/QueueBundle/Helper/QueueRequestHelper.php
in favor of serialization (reused) - Command
mautic:queue:process
is no longer available, use messenger:consume instead
Mautic 5 adds support for Symfony's autowiring and autoconfigure for services.
Advantages:
- New services no longer need to have any definition in the app/bundles/*Bundle/Config/config.php. Symfony will guess what services are needed in the services by types of arguments in the constructor.
- Services that aren't used in other services as dependencies like subscribers, commands and form types were deleted completely.
- Existing service definitions can be reduced to setting just the string alias to keep backward compatibility and controllers working.
app/config/services.php
is automatically configuring all bundles including plugins so if the bundle doesn't do anything uncommon then it should work out of the box.- The legacy services definitions in
*Bundle/Config/config.php
file are still working but will be removed in Mautic 6.
Possible backward compatibility breaks:
- If your plugin does break it may be using some value objects out of common places. Get inspiration in existing
plugins/*Bundle/Config/services.php
to exclude the folders or files from autowiring. - Some services might need to be configured. For example if they need a config parameter in the constructor. Follow the official Symfony docs to configure such services.
- Start converting your controllers to support DI over loading services from container as that is an anti-pattern that Symfony no longer supports. That is the reason why all the services are set as public so the old controllers can still work. This will change throughout the life of Mautic 5 and will be removed in Mautic 6. See https://symfony.com/doc/current/controller/service.html