Skip to content

refactor(seeder): remove environment check from DatabaseSeeder and fi…#42

Merged
sauce-base merged 2 commits into
mainfrom
dev-v2
Jun 4, 2026
Merged

refactor(seeder): remove environment check from DatabaseSeeder and fi…#42
sauce-base merged 2 commits into
mainfrom
dev-v2

Conversation

@roble

@roble roble commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

This pull request includes minor updates focused on improving the development and testing experience. The main changes are the removal of an environment check in the database seeder and the adjustment of test execution mode for magic link configuration tests.

Database seeding changes:

  • Removed the environment check in the DatabaseSeeder so that AuthDatabaseSeeder is always called, regardless of the environment. This means seeders will run in all environments, not just local or testing.

Testing changes:

  • Changed the Magic Link Config test suite to run serially instead of in parallel, which may help avoid race conditions or shared state issues during test execution.

Copilot AI review requested due to automatic review settings June 4, 2026 13:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 aims to improve developer/testing ergonomics by (1) changing the default database seeding behavior for the Auth module and (2) reducing potential E2E test flakiness by avoiding parallel execution for the Magic Link config suite.

Changes:

  • Removed the environment guard from DatabaseSeeder so AuthDatabaseSeeder is invoked unconditionally.
  • Changed the “Magic Link Config” E2E test suite from test.describe.parallel(...) to test.describe(...) (serial execution by default).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/e2e/tests/magic-link/magic-link.config.spec.ts Runs the Magic Link config E2E tests non-parallel to reduce shared-state/race issues.
database/seeders/DatabaseSeeder.php Makes Auth module seeding run regardless of environment (but currently introduces a production security risk due to what it seeds).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 9 to 11
public function run(): void
{
if (! app()->environment(['local', 'testing'])) {
return;
}

$this->call(AuthDatabaseSeeder::class);
@sauce-base sauce-base merged commit b29e6e1 into main Jun 4, 2026
3 of 4 checks passed
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.

3 participants