Skip to content

Commit

Permalink
[9.x] Fixed #[WithMigration('queue')] should load the default migra…
Browse files Browse the repository at this point in the history
…tions (#249)

* wip

* Update WithMigrationTest.php

* Delete laravel/migrations/queue/.gitkeep

* Update CHANGELOG-9.x.md
  • Loading branch information
crynobone authored Oct 30, 2024
1 parent 681a071 commit 26860d0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG-9.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

This changelog references the relevant changes (bug and security fixes) done to `orchestra/testbench-core`.

## 9.5.6

Released: 2024-10-31

### Fixed

* Fixed `#[WithMigration('queue')]` should load the default migrations.

## 9.5.5

Released: 2024-10-25
Expand Down
Empty file removed laravel/migrations/queue/.gitkeep
Empty file.
2 changes: 1 addition & 1 deletion src/Attributes/WithMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ final class WithMigration implements InvokableContract
public function __construct()
{
$this->types = Collection::make(\func_num_args() > 0 ? \func_get_args() : ['laravel'])
->transform(static fn ($type) => \in_array($type, ['cache', 'session']) ? 'laravel' : $type)
->transform(static fn ($type) => \in_array($type, ['cache', 'queue', 'session']) ? 'laravel' : $type)
->all();
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Attributes/WithMigrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ class WithMigrationTest extends TestCase
public function it_can_be_resolved()
{
$this->assertSame(['laravel'], (new WithMigration)->types);
$this->assertSame(['queue'], (new WithMigration('queue'))->types);
$this->assertSame(['laravel'], (new WithMigration('queue'))->types);
}
}

0 comments on commit 26860d0

Please sign in to comment.