Conversation
|
sorry - ignore this |
There was a problem hiding this comment.
Pull request overview
This PR updates the package’s defaults by consolidating previously incremental migration stubs into the initial table-creation stubs, removes an internal Terminal helper, and disables automatic registration of the webhook routes.
Changes:
- Commented out package route registration for
webhooks. - Folded added/altered columns into the base
create_*migration stubs and removed the now-redundant incremental migration stubs. - Removed
src/Shared/Terminal.php.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Shared/Terminal.php | Removed internal console helper class. |
| src/MailsServiceProvider.php | Disables automatic loading of routes/webhooks.php by commenting out hasRoutes('webhooks'). |
| database/migrations/1_create_mails_table.php.stub | Expands base mails table schema (mailer/transport/stream_id/tags + longText/jsonb types). |
| database/migrations/2_create_mail_events_table.php.stub | Expands base events table schema (longText link, jsonb payload, adds unsuppressed_at). |
| database/migrations/3_add_unsuppressed_at_to_mail_events.php.stub | Deleted incremental migration stub that added unsuppressed_at / mailer fields. |
| database/migrations/4_add_transport_column_to_mails_table.php.stub | Deleted incremental migration stub that added transport. |
| database/migrations/4_add_tags_to_mails_table.php.stub | Deleted incremental migration stub that added tags. |
| database/migrations/5_change_columns_to_long_text.php.stub | Deleted incremental migration stub that expanded html/text columns. |
| database/migrations/5_change_link_to_long_text.php.stub | Deleted incremental migration stub that expanded link column. |
Comments suppressed due to low confidence (1)
src/MailsServiceProvider.php:63
hasRoutes('webhooks')is now commented out, so themails.webhookroute inroutes/webhooks.phpwill no longer be registered. Multiple drivers/tests generate webhook URLs viaURL::signedRoute('mails.webhook', ...), which will throwRouteNotFoundExceptionand effectively break webhook delivery/registration. Re-enable route registration (or gate it behind a config flag while keeping the default enabled) so the webhook route remains available.
->hasMigrations($this->getMigrations())
// ->hasRoutes('webhooks')
->hasCommands(
MonitorMailCommand::class,
PruneMailCommand::class,
ResendMailCommand::class,
WebhooksMailCommand::class,
CheckBounceRateCommand::class,
);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| $table->jsonb('from')->nullable(); | ||
| $table->jsonb('reply_to')->nullable(); | ||
| $table->jsonb('to')->nullable(); | ||
| $table->jsonb('cc')->nullable(); | ||
| $table->jsonb('bcc')->nullable(); | ||
| $table->longText('html')->nullable(); | ||
| $table->longText('text')->nullable(); | ||
| $table->unsignedBigInteger('opens')->default(0); | ||
| $table->unsignedBigInteger('clicks')->default(0); | ||
| $table->jsonb('tags')->nullable(); |
There was a problem hiding this comment.
This migration now bakes in columns/type changes (e.g., longText for html/text, jsonb for address fields, transport/stream_id, tags) while the separate upgrade migration stubs that previously added/altered these columns were removed in this PR. Existing installations upgrading from an older schema will not receive these schema changes automatically, which can lead to runtime insert/truncation errors. Consider keeping additive/altering migrations for upgrades (or documenting a required manual migration / major-version break).
| $table->jsonb('from')->nullable(); | |
| $table->jsonb('reply_to')->nullable(); | |
| $table->jsonb('to')->nullable(); | |
| $table->jsonb('cc')->nullable(); | |
| $table->jsonb('bcc')->nullable(); | |
| $table->longText('html')->nullable(); | |
| $table->longText('text')->nullable(); | |
| $table->unsignedBigInteger('opens')->default(0); | |
| $table->unsignedBigInteger('clicks')->default(0); | |
| $table->jsonb('tags')->nullable(); | |
| $table->json('from')->nullable(); | |
| $table->json('reply_to')->nullable(); | |
| $table->json('to')->nullable(); | |
| $table->json('cc')->nullable(); | |
| $table->json('bcc')->nullable(); | |
| $table->longText('html')->nullable(); | |
| $table->longText('text')->nullable(); | |
| $table->unsignedBigInteger('opens')->default(0); | |
| $table->unsignedBigInteger('clicks')->default(0); | |
| $table->json('tags')->nullable(); |
No description provided.