Skip to content

Commit

Permalink
Fix main seeder detection (no debug info bug)
Browse files Browse the repository at this point in the history
  • Loading branch information
chojnicki authored Jan 4, 2022
1 parent b3e6b16 commit 6cac1f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Seeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public function __construct()
*/
public function __destruct()
{
if (get_class($this) != 'DatabaseSeeder') return; // print debug only on main seeder
$seederName = (new \ReflectionClass($this))->getShortName();
if ($seederName != 'DatabaseSeeder') return; // print debug only on main seeder

if (! $this->debug) return;

Expand Down

0 comments on commit 6cac1f9

Please sign in to comment.