refactor(naming): normalise the Smart Links domain to the bundle's canonical names (0.18.1)

One bundle, two domains (Marketing Programs and Smart Links), one naming scheme.\nNothing in the database changed (no tables, columns, URLs or stored data);\nthe runtime was rebuilt and verified live.\n\n- Route names mautic_smartlinks_* -> mt3s_smartlinks_* (paths unchanged);\n  the menu ids follow\n- Model service aliases collapsed to one canonical alias per model:\n  mautic.mt3smarketingprogram.model.<entity> (core's mautic.<x>.model.<x>\n  pattern), so getModel('mt3smarketingprogram.smart_link'); the dead\n  mt3s.* and mautic.mt3smp.*-era aliases are gone\n- Translation keys mautic.smartlinks.* -> mt3s.smart_links.*\n  (mautic.config.tab.smartlinksconfig stays: core derives it)\n- Settings parameters smartlinks_utm_config/smartlinks_config ->\n  mt3s_smart_links_utm_config/mt3s_smart_links_config, with both legacy\n  keys (smartlinks_* of the standalone bundle, utm_manager_* of the\n  UtmManagerBundle era) still readable until the settings are saved again\n- JS loader prefixes smartlinksSmartLink/smartlinksUtmTaxonomy ->\n  mt3sMpSmartLink/mt3sMpUtmTaxonomy (the mt3sMp* family of the program\n  domain)\n- Integration/Support/ConfigSupport -> SmartlinksConfigSupport; integration\n  display names aligned ('MT3S Marketing Program' / 'Smart Links'); the\n  dead mautic.plugin.smartlinks.name catalog keys removed\n- phpunit suite renamed UtmManagerBundle -> MT3SMarketingProgramBundle;\n  version 0.18.1\n\nVerified: full php -l, 90/90 unit tests (phpunit 11.5 phar), cache clear +\nwarm + assets regenerate + plugins reload (as www-data), live: both lists\nand forms (mauticContent mt3sMpSmartLink/mt3sMpUtmTaxonomy), both config\ntabs, the menu labels, the program pages (regression), the public /l/y32b\nredirect through the legacy utm_manager_* settings (302 with the taxonomy's\nUTM values, wrong host and unknown slug 404), all ini catalogs parse, zero\nnew log errors.
This commit is contained in:
Alexandre Gain committed 2026-11-16 15:47:30 +01:00
1 parent dce849610c
commit 9d81d6c815
53 files changed
+777 -751

No files matched your search

+26 -20
View File
@@ -5,7 +5,7 @@ declare(strict_types=1);
return [
'name' => 'MT3S Marketing Program',
'description' => 'MT3S Marketing: programs, tasks, audiences, and smart links with their UTM taxonomies.',
'version' => '0.18.0',
'version' => '0.18.1',
'author' => 'Experiential',
'routes' => [
@@ -47,20 +47,20 @@ return [
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\AudienceController::executeAction',
],
// Smart Links domain: the list and its object actions.
'mautic_smartlinks_index' => [
'mt3s_smart_links_index' => [
'path' => '/smart-links/{page}',
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\SmartLinkController::indexAction',
],
'mautic_smartlinks_action' => [
'mt3s_smart_links_action' => [
'path' => '/smart-links/{objectAction}/{objectId}',
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\SmartLinkController::executeAction',
],
// UTM Taxonomies: the list and its object actions.
'mautic_smartlinks_taxonomies' => [
'mt3s_smart_links_taxonomies' => [
'path' => '/utm-taxonomies/{page}',
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\UtmTaxonomyController::indexAction',
],
'mautic_smartlinks_taxonomy_action' => [
'mt3s_smart_links_taxonomy_action' => [
'path' => '/utm-taxonomies/{objectAction}/{objectId}',
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\UtmTaxonomyController::executeAction',
],
@@ -74,7 +74,7 @@ return [
// https://{short_link_domain}/l/{slug}: the public entry point of the Smart Links.
// Public routes are served without the /s/ prefix and without authentication.
'public' => [
'mautic_smartlinks_go' => [
'mt3s_smart_links_go' => [
'path' => '/l/{slug}',
'controller' => 'MauticPlugin\MT3SMarketingProgramBundle\Controller\PublicController::goAction',
],
@@ -125,9 +125,9 @@ return [
// Top-level "Smart Links" menu: UTM Taxonomies above the Smart Links list. The two
// domains (Marketing Program and Smart Links) stay separate menu groups.
'mautic.smartlinks.menu.root' => [
'id' => 'mautic_smartlinks',
'route' => 'mautic_smartlinks_index',
'mt3s.smart_links.menu.root' => [
'id' => 'mt3s_smart_links',
'route' => 'mt3s_smart_links_index',
'iconClass' => 'ri-links-line',
'access' => [
'mt3smarketingprogram:smart_links:viewown',
@@ -137,16 +137,16 @@ return [
],
'priority' => 4,
'children' => [
'mautic.smartlinks.menu.taxonomies' => [
'id' => 'mautic_smartlinks_taxonomies',
'route' => 'mautic_smartlinks_taxonomies',
'mt3s.smart_links.menu.taxonomies' => [
'id' => 'mt3s_smart_links_taxonomies',
'route' => 'mt3s_smart_links_taxonomies',
'iconClass' => 'ri-price-tag-3-line',
'access' => ['mt3smarketingprogram:taxonomies:viewown', 'mt3smarketingprogram:taxonomies:viewother'],
'priority' => 5,
],
'mautic.smartlinks.menu.smartlinks' => [
'id' => 'mautic_smartlinks_index',
'route' => 'mautic_smartlinks_index',
'mt3s.smart_links.menu.smartlinks' => [
'id' => 'mt3s_smart_links_index',
'route' => 'mt3s_smart_links_index',
'iconClass' => 'ri-link',
'access' => ['mt3smarketingprogram:smart_links:viewown', 'mt3smarketingprogram:smart_links:viewother'],
'priority' => 4,
@@ -179,7 +179,7 @@ return [
],
],
'mt3s.smart_links.integration.configuration' => [
'class' => MauticPlugin\MT3SMarketingProgramBundle\Integration\Support\ConfigSupport::class,
'class' => MauticPlugin\MT3SMarketingProgramBundle\Integration\Support\SmartlinksConfigSupport::class,
'tags' => [
'mautic.config_integration',
],
@@ -237,13 +237,19 @@ return [
// Stored by Settings > Configuration > Smart Links Settings (SmartLinksConfigSubscriber).
// Read through UtmConfigurationProvider; the default stays empty, the catalog
// defaults are applied by UtmConfigurationNormalizer.
'mt3s_smart_links_utm_config' => [],
'mt3s_smart_links_config' => [
'short_link_domain' => '',
],
// Legacy keys of the earlier eras. Declared so the read fallbacks
// (UtmConfigurationProvider, SmartLinkModel, SmartLinkShortUrlBuilder) can serve
// upgrades from local.php until the settings are saved again; new values are
// always written to the new keys: `smartlinks_*` (the standalone
// SmartlinksBundle, 0.1.0–0.18.0) and `utm_manager_*` (the UtmManagerBundle, < 0.5.0).
'smartlinks_utm_config' => [],
'smartlinks_config' => [
'smartlinks_config' => [
'short_link_domain' => '',
],
// Legacy keys of the standalone Smartlinks plugin era (< 0.18.0). Declared so the
// read fallbacks can serve upgrades from local.php until the settings are saved
// again; new values are always written to the new keys.
'utm_manager_config' => [],
'utm_manager_smart_links' => [
'short_link_domain' => '',
+9 -17
View File
@@ -25,21 +25,13 @@ return function (ContainerConfigurator $configurator): void {
$services->load('MauticPlugin\\MT3SMarketingProgramBundle\\Entity\\', '../Entity/*Repository.php')
->tag(Doctrine\Bundle\DoctrineBundle\DependencyInjection\Compiler\ServiceRepositoryCompilerPass::REPOSITORY_SERVICE_TAG);
// Lets core resolve the model with getModel('mt3smp.program').
$services->alias('mt3s.marketing_program.model.program', MauticPlugin\MT3SMarketingProgramBundle\Model\ProgramModel::class);
$services->alias('mautic.mt3smp.model.program', MauticPlugin\MT3SMarketingProgramBundle\Model\ProgramModel::class);
// getModel('mt3smp.task').
$services->alias('mt3s.marketing_program.model.task', MauticPlugin\MT3SMarketingProgramBundle\Model\TaskModel::class);
$services->alias('mautic.mt3smp.model.task', MauticPlugin\MT3SMarketingProgramBundle\Model\TaskModel::class);
// getModel('mt3smp.stakeholder').
$services->alias('mt3s.marketing_program.model.stakeholder', MauticPlugin\MT3SMarketingProgramBundle\Model\StakeholderModel::class);
$services->alias('mautic.mt3smp.model.stakeholder', MauticPlugin\MT3SMarketingProgramBundle\Model\StakeholderModel::class);
// getModel('mt3smp.audience').
$services->alias('mt3s.marketing_program.model.audience', MauticPlugin\MT3SMarketingProgramBundle\Model\AudienceModel::class);
// Smart Links domain: getModel('smartlinks.smart_link') / getModel('smartlinks.utm_taxonomy').
$services->alias('mt3s.smart_links.model.smart_link', MauticPlugin\MT3SMarketingProgramBundle\Model\SmartLinkModel::class);
$services->alias('mautic.smartlinks.model.smart_link', MauticPlugin\MT3SMarketingProgramBundle\Model\SmartLinkModel::class);
$services->alias('mt3s.smart_links.model.utm_taxonomy', MauticPlugin\MT3SMarketingProgramBundle\Model\UtmTaxonomyModel::class);
$services->alias('mautic.smartlinks.model.utm_taxonomy', MauticPlugin\MT3SMarketingProgramBundle\Model\UtmTaxonomyModel::class);
$services->alias('mautic.mt3smp.model.audience', MauticPlugin\MT3SMarketingProgramBundle\Model\AudienceModel::class);
// Core resolves getModel('mt3smarketingprogram.<entity>') to mautic.mt3smarketingprogram.model.<entity>:
// exactly one alias per model, under the bundle's canonical prefix.
$services->alias('mautic.mt3smarketingprogram.model.program', MauticPlugin\MT3SMarketingProgramBundle\Model\ProgramModel::class);
$services->alias('mautic.mt3smarketingprogram.model.task', MauticPlugin\MT3SMarketingProgramBundle\Model\TaskModel::class);
$services->alias('mautic.mt3smarketingprogram.model.stakeholder', MauticPlugin\MT3SMarketingProgramBundle\Model\StakeholderModel::class);
$services->alias('mautic.mt3smarketingprogram.model.audience', MauticPlugin\MT3SMarketingProgramBundle\Model\AudienceModel::class);
// Smart Links domain: getModel('mt3smarketingprogram.smart_link') / getModel('mt3smarketingprogram.utm_taxonomy').
$services->alias('mautic.mt3smarketingprogram.model.smart_link', MauticPlugin\MT3SMarketingProgramBundle\Model\SmartLinkModel::class);
$services->alias('mautic.mt3smarketingprogram.model.utm_taxonomy', MauticPlugin\MT3SMarketingProgramBundle\Model\UtmTaxonomyModel::class);
};