Skip to content

Commit

Permalink
Merge branch '10.x'
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
driesvints committed Dec 13, 2023
2 parents b420627 + c13d4c8 commit 67a0562
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Release Notes for 11.x

## [Unreleased](https://github.com/laravel/framework/compare/v11.0.0..master)

## [v11.0.0 (2023-??-??)](https://github.com/laravel/framework/compare/v11.0.0...master)

Check the upgrade guide in the [Official Laravel Upgrade Documentation](https://laravel.com/docs/11.x/upgrade). Also you can see some release notes in the [Official Laravel Release Documentation](https://laravel.com/docs/11.x/releases).
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public function compileTypes()
.'left join pg_type el on el.oid = t.typelem '
.'left join pg_class ce on ce.oid = el.typrelid '
."where ((t.typrelid = 0 and (ce.relkind = 'c' or ce.relkind is null)) or c.relkind = 'c') "
."and not exists (select 1 from pg_depend d where d.objid in (t.oid, t.typelem) and d.deptype = 'e') "
."and n.nspname not in ('pg_catalog', 'information_schema')";
}

Expand Down
9 changes: 8 additions & 1 deletion src/Illuminate/Database/Schema/SQLiteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Illuminate\Database\Schema;

use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\File;

class SQLiteBuilder extends Builder
Expand Down Expand Up @@ -37,7 +38,13 @@ public function dropDatabaseIfExists($name)
*/
public function getTables()
{
$withSize = rescue(fn () => $this->connection->scalar($this->grammar->compileDbstatExists()), false, false);
$withSize = false;

try {
$withSize = $this->connection->scalar($this->grammar->compileDbstatExists());
} catch (QueryException $e) {
//
}

return $this->connection->getPostProcessor()->processTables(
$this->connection->selectFromWriteConnection($this->grammar->compileTables($withSize))
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Testing/DatabaseTransactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function beginDatabaseTransaction()
$connection->unsetEventDispatcher();
$connection->rollBack();
$connection->setEventDispatcher($dispatcher);
$database->purge($name);
$connection->disconnect();
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Testing/RefreshDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function beginDatabaseTransaction()
$connection->unsetEventDispatcher();
$connection->rollBack();
$connection->setEventDispatcher($dispatcher);
$database->purge($name);
$connection->disconnect();
}
});
}
Expand Down
6 changes: 0 additions & 6 deletions src/Illuminate/Foundation/Testing/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,6 @@ protected function tearDown(): void

ParallelTesting::callTearDownTestCaseCallbacks($this);

$database = $this->app['db'] ?? null;

foreach (array_keys($database?->getConnections() ?? []) as $name) {
$database->purge($name);
}

$this->app->flush();

$this->app = null;
Expand Down

0 comments on commit 67a0562

Please sign in to comment.