Skip to content

Commit 84def94

Browse files
committed
Fixing issue when running in Parallel test mode
1 parent ab8550b commit 84def94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/MysqlConnection.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
use Grimzy\LaravelMysqlSpatial\Schema\Builder;
77
use Grimzy\LaravelMysqlSpatial\Schema\Grammars\MySqlGrammar;
88
use Illuminate\Database\MySqlConnection as IlluminateMySqlConnection;
9+
use Illuminate\Support\Facades\ParallelTesting;
910

1011
class MysqlConnection extends IlluminateMySqlConnection
1112
{
1213
public function __construct($pdo, $database = '', $tablePrefix = '', array $config = [])
1314
{
1415
parent::__construct($pdo, $database, $tablePrefix, $config);
1516

16-
if (class_exists(DoctrineType::class)) {
17+
if (class_exists(DoctrineType::class) && !ParallelTesting::token()) {
1718
// Prevent geometry type fields from throwing a 'type not found' error when changing them
1819
$geometries = [
1920
'geometry',

0 commit comments

Comments
 (0)