Bump migration pin + use maildev for E2E SMTP enable

This commit is contained in:
Prem Palanisamy
2026-05-21 17:18:03 +01:00
parent 8f9643b598
commit 03c7c24422
2 changed files with 16 additions and 16 deletions
Generated
+4 -4
View File
@@ -4679,12 +4679,12 @@
"source": {
"type": "git",
"url": "https://github.com/utopia-php/migration.git",
"reference": "9813afb2d7e0ddf8f00002fa30c0318d697e8d97"
"reference": "edcb0aa3285b44616e570e5fe092aaac97deb686"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/migration/zipball/9813afb2d7e0ddf8f00002fa30c0318d697e8d97",
"reference": "9813afb2d7e0ddf8f00002fa30c0318d697e8d97",
"url": "https://api.github.com/repos/utopia-php/migration/zipball/edcb0aa3285b44616e570e5fe092aaac97deb686",
"reference": "edcb0aa3285b44616e570e5fe092aaac97deb686",
"shasum": ""
},
"require": {
@@ -4744,7 +4744,7 @@
"source": "https://github.com/utopia-php/migration/tree/add-email-templates-migration",
"issues": "https://github.com/utopia-php/migration/issues"
},
"time": "2026-05-21T15:55:26+00:00"
"time": "2026-05-21T16:14:58+00:00"
},
{
"name": "utopia-php/mongo",
@@ -3126,17 +3126,20 @@ trait MigrationsBase
$sourceProjectId = $this->getProject()['$id'];
$destinationProjectId = $this->getDestinationProject()['$id'];
// The source SDK path requires custom SMTP enabled before a template can be saved.
$this->client->call(Client::METHOD_PATCH, '/projects/' . $sourceProjectId . '/smtp', $consoleHeaders, [
// The source SDK path requires custom SMTP enabled before a template can be
// saved — and the enable call validates the SMTP connection. `maildev` is the
// dev mailcatcher in the test cluster's docker-compose; it accepts unauthenticated
// connections on port 1025, so it's the only host that lets us pass validation.
$smtpHost = 'maildev';
$smtpPort = 1025;
$smtpUpdate = $this->client->call(Client::METHOD_PATCH, '/projects/' . $sourceProjectId . '/smtp', $consoleHeaders, [
'enabled' => true,
'senderName' => 'Test Sender',
'senderEmail' => 'sender@example.com',
'host' => 'smtp.example.com',
'port' => 587,
'username' => 'test',
'password' => 'test',
'secure' => 'tls',
'host' => $smtpHost,
'port' => $smtpPort,
]);
$this->assertEquals(200, $smtpUpdate['headers']['status-code'], 'SMTP enable on source failed: ' . \json_encode($smtpUpdate['body']));
$templateId = 'verification';
$locale = 'en';
@@ -3181,11 +3184,8 @@ trait MigrationsBase
'enabled' => true,
'senderName' => 'Dest Sender',
'senderEmail' => 'dest@example.com',
'host' => 'smtp.example.com',
'port' => 587,
'username' => 'test',
'password' => 'test',
'secure' => 'tls',
'host' => $smtpHost,
'port' => $smtpPort,
]);
$fetched = $this->client->call(