Skip to content

ignore#90

Closed
arcdigital wants to merge 1 commit intobackstagephp:mainfrom
arcdigital:custom-fixes
Closed

ignore#90
arcdigital wants to merge 1 commit intobackstagephp:mainfrom
arcdigital:custom-fixes

Conversation

@arcdigital
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings April 2, 2026 17:47
@arcdigital arcdigital closed this Apr 2, 2026
@arcdigital
Copy link
Copy Markdown
Author

sorry - ignore this

@arcdigital arcdigital changed the title fix: updates ignore Apr 2, 2026
@arcdigital arcdigital deleted the custom-fixes branch April 2, 2026 17:50
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the mails.webhook route in routes/webhooks.php will no longer be registered. Multiple drivers/tests generate webhook URLs via URL::signedRoute('mails.webhook', ...), which will throw RouteNotFoundException and 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.

Comment on lines +19 to +28
$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();
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
$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();

Copilot uses AI. Check for mistakes.
Comment thread database/migrations/2_create_mail_events_table.php.stub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants