Skip to content

Commit 67a0562

Browse files
committed
Merge branch '10.x'
# Conflicts: # CHANGELOG.md
2 parents b420627 + c13d4c8 commit 67a0562

File tree

6 files changed

+18
-9
lines changed

6 files changed

+18
-9
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Release Notes for 11.x
2+
3+
## [Unreleased](https://github.com/laravel/framework/compare/v11.0.0..master)
4+
5+
## [v11.0.0 (2023-??-??)](https://github.com/laravel/framework/compare/v11.0.0...master)
6+
7+
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).

src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ public function compileTypes()
115115
.'left join pg_type el on el.oid = t.typelem '
116116
.'left join pg_class ce on ce.oid = el.typrelid '
117117
."where ((t.typrelid = 0 and (ce.relkind = 'c' or ce.relkind is null)) or c.relkind = 'c') "
118+
."and not exists (select 1 from pg_depend d where d.objid in (t.oid, t.typelem) and d.deptype = 'e') "
118119
."and n.nspname not in ('pg_catalog', 'information_schema')";
119120
}
120121

src/Illuminate/Database/Schema/SQLiteBuilder.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Illuminate\Database\Schema;
44

5+
use Illuminate\Database\QueryException;
56
use Illuminate\Support\Facades\File;
67

78
class SQLiteBuilder extends Builder
@@ -37,7 +38,13 @@ public function dropDatabaseIfExists($name)
3738
*/
3839
public function getTables()
3940
{
40-
$withSize = rescue(fn () => $this->connection->scalar($this->grammar->compileDbstatExists()), false, false);
41+
$withSize = false;
42+
43+
try {
44+
$withSize = $this->connection->scalar($this->grammar->compileDbstatExists());
45+
} catch (QueryException $e) {
46+
//
47+
}
4148

4249
return $this->connection->getPostProcessor()->processTables(
4350
$this->connection->selectFromWriteConnection($this->grammar->compileTables($withSize))

src/Illuminate/Foundation/Testing/DatabaseTransactions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function beginDatabaseTransaction()
3333
$connection->unsetEventDispatcher();
3434
$connection->rollBack();
3535
$connection->setEventDispatcher($dispatcher);
36-
$database->purge($name);
36+
$connection->disconnect();
3737
}
3838
});
3939
}

src/Illuminate/Foundation/Testing/RefreshDatabase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function beginDatabaseTransaction()
108108
$connection->unsetEventDispatcher();
109109
$connection->rollBack();
110110
$connection->setEventDispatcher($dispatcher);
111-
$database->purge($name);
111+
$connection->disconnect();
112112
}
113113
});
114114
}

src/Illuminate/Foundation/Testing/TestCase.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,6 @@ protected function tearDown(): void
187187

188188
ParallelTesting::callTearDownTestCaseCallbacks($this);
189189

190-
$database = $this->app['db'] ?? null;
191-
192-
foreach (array_keys($database?->getConnections() ?? []) as $name) {
193-
$database->purge($name);
194-
}
195-
196190
$this->app->flush();
197191

198192
$this->app = null;

0 commit comments

Comments
 (0)