Skip to content

Commit

Permalink
Remove use of new Expression
Browse files Browse the repository at this point in the history
This closes laravel#53838 by eliminating the passing of un-escaped schema and table names to the `exists()` and `truncate()` methods
  • Loading branch information
MizouziE authored Dec 11, 2024
1 parent 0755902 commit 6867398
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Illuminate/Foundation/Testing/DatabaseTruncation.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ function (Collection $tables) use ($connection, $name) {
}
)
->each(function (array $table) use ($connection) {
$table = $connection->table(
new Expression($table['schema'] ? $table['schema'].'.'.$table['name'] : $table['name'])
);
$table = $connection->table($table['schema'] ? $table['schema'].'.'.$table['name'] : $table['name']);

if ($table->exists()) {
$table->truncate();
Expand Down

0 comments on commit 6867398

Please sign in to comment.