refactor(plugin): rebrand as MT3SMarketingProgram, release 0.17.0

Rename the plugin's vendor/namespace from experiential/Program to mt3s/MT3SMarketingProgram (composer: mt3s/mautic-marketing-program-bundle):

- ProgramBundle -> MT3SMarketingProgramBundle; extension, integration,
  config support, permissions, events and twig extension renamed likewise
- Initiative* -> Program*: controller (InitiativeController ->
  ProgramController), model, entities, repositories, form types and views
  (new _tabs/_task_table/_tab_table_filter partials, details page)
- Settings config form theme -> _config_mt3smarketingprogramconfig_widget;
  routes and translations re-prefixed (mt3s_marketing_program_*)
- Assets: icon.svg -> mt3s-mp-icon.svg; program.js -> mt3s-mp-program.js
  (OnLoad hooks renamed mt3sMpProgram*)
- Add Command/RefreshStatsCommand; Migrations/Version_0_17_0.php renames
  the tables to mt3s_mp_program_*
This commit is contained in:
Alexandre Gain committed 2026-11-15 17:48:01 +01:00
1 parent 687d33d30c
commit ea88b7a772
131 files changed
+3238 -2836

No files matched your search

+9 -11
View File
@@ -2,15 +2,13 @@
declare(strict_types=1);
namespace MauticPlugin\ProgramBundle\Migrations;
namespace MauticPlugin\MT3SMarketingProgramBundle\Migrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\ORM\Tools\SchemaTool;
use Mautic\IntegrationsBundle\Migration\AbstractMigration;
use MauticPlugin\ProgramBundle\Entity\Audience;
use MauticPlugin\ProgramBundle\Entity\AudienceType as AudienceTypeEnum;
use MauticPlugin\ProgramBundle\Entity\Initiative;
use MauticPlugin\MT3SMarketingProgramBundle\Entity\Audience;
use MauticPlugin\MT3SMarketingProgramBundle\Entity\AudienceType as AudienceTypeEnum;
/**
* Since 0.11.0 a plan has audiences (table initiative_audiences, initiative_audiences_stages before 0.15.0) with any
* number of Mautic stages (join table initiative_audiences_stages). Creates both tables for installs created
@@ -53,8 +51,8 @@ class Version_0_11_0 extends AbstractMigration
// An install created before 0.11.0 that somehow never got the tables: create the current
// (0.15.0) ones from the entity mapping directly.
if (!$schema->hasTable($this->concatPrefix(Audience::TABLE_NAME))) {
$this->addSql($this->getCreateTableSql(Audience::TABLE_NAME));
if (!$schema->hasTable($this->concatPrefix('initiative_audiences'))) {
$this->addSql($this->getCreateTableSql('initiative_audiences'));
}
if (!$schema->hasTable($this->concatPrefix('initiative_audiences_stages'))
@@ -65,7 +63,7 @@ class Version_0_11_0 extends AbstractMigration
foreach ($this->getColumnsToRename($schema) as $field => $column) {
$this->addSql(sprintf(
'ALTER TABLE %s CHANGE %s %s',
$this->concatPrefix(Audience::TABLE_NAME),
$this->concatPrefix('initiative_audiences'),
$field,
$this->getColumnDefinition($field, $column)
));
@@ -77,11 +75,11 @@ class Version_0_11_0 extends AbstractMigration
*/
private function getColumnsToRename(Schema $schema): array
{
if (!$schema->hasTable($this->concatPrefix(Audience::TABLE_NAME))) {
if (!$schema->hasTable($this->concatPrefix('initiative_audiences'))) {
return [];
}
$table = $schema->getTable($this->concatPrefix(Audience::TABLE_NAME));
$table = $schema->getTable($this->concatPrefix('initiative_audiences'));
$rename = [];
foreach (self::COLUMNS as $field => $column) {
@@ -95,7 +93,7 @@ class Version_0_11_0 extends AbstractMigration
private function hasForeignKeys(Schema $schema): bool
{
$audiences = $this->concatPrefix(Audience::TABLE_NAME);
$audiences = $this->concatPrefix('initiative_audiences');
if (!$schema->hasTable($audiences)) {
return false;