Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Remove redundant Doctrine method on schema builder #40731

Merged
merged 2 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions src/Illuminate/Database/Schema/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,19 +384,6 @@ protected function createBlueprint($table, Closure $callback = null)
return Container::getInstance()->make(Blueprint::class, compact('table', 'callback', 'prefix'));
}

/**
* Register a custom Doctrine mapping type.
*
* @param string $class
* @param string $name
* @param string $type
* @return void
*/
public function registerCustomDoctrineType($class, $name, $type)
{
$this->connection->registerDoctrineType($class, $name, $type);
}

/**
* Get the database connection instance.
*
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Support/Facades/DB.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* @method static void enableQueryLog()
* @method static void disableQueryLog()
* @method static void flushQueryLog()
* @method static void registerDoctrineType(string $class, string $name, string $type)
* @method static \Illuminate\Database\Connection beforeExecuting(\Closure $callback)
* @method static void listen(\Closure $callback)
* @method static void rollBack(int $toLevel = null)
Expand Down
1 change: 0 additions & 1 deletion src/Illuminate/Support/Facades/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* @method static bool dropColumns(string $table, array $columns)
* @method static bool hasTable(string $table)
* @method static void defaultStringLength(int $length)
* @method static void registerCustomDoctrineType(string $class, string $name, string $type)
* @method static array getColumnListing(string $table)
* @method static string getColumnType(string $table, string $column)
* @method static void morphUsingUuids()
Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/Database/SchemaBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function testRegisterCustomDoctrineType()
$this->markTestSkipped('Test requires a SQLite connection.');
}

Schema::registerCustomDoctrineType(TinyInteger::class, TinyInteger::NAME, 'TINYINT');
Schema::getConnection()->registerDoctrineType(TinyInteger::class, TinyInteger::NAME, 'TINYINT');

Schema::create('test', function (Blueprint $table) {
$table->string('test_column');
Expand All @@ -72,7 +72,7 @@ public function testRegisterCustomDoctrineTypeASecondTime()
$this->markTestSkipped('Test requires a SQLite connection.');
}

Schema::registerCustomDoctrineType(TinyInteger::class, TinyInteger::NAME, 'TINYINT');
Schema::getConnection()->registerDoctrineType(TinyInteger::class, TinyInteger::NAME, 'TINYINT');

Schema::create('test', function (Blueprint $table) {
$table->string('test_column');
Expand Down