diff --git a/src/Illuminate/Database/Schema/Builder.php b/src/Illuminate/Database/Schema/Builder.php index 40f78880b8ce..dd4290aa3f6e 100755 --- a/src/Illuminate/Database/Schema/Builder.php +++ b/src/Illuminate/Database/Schema/Builder.php @@ -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. * diff --git a/src/Illuminate/Support/Facades/DB.php b/src/Illuminate/Support/Facades/DB.php index 554dd22030ff..08ca4a9c5756 100755 --- a/src/Illuminate/Support/Facades/DB.php +++ b/src/Illuminate/Support/Facades/DB.php @@ -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) diff --git a/src/Illuminate/Support/Facades/Schema.php b/src/Illuminate/Support/Facades/Schema.php index eaefe5c817ea..2b0584d3fa5f 100755 --- a/src/Illuminate/Support/Facades/Schema.php +++ b/src/Illuminate/Support/Facades/Schema.php @@ -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() diff --git a/tests/Integration/Database/SchemaBuilderTest.php b/tests/Integration/Database/SchemaBuilderTest.php index b3de68a09306..1b5a5401c2e2 100644 --- a/tests/Integration/Database/SchemaBuilderTest.php +++ b/tests/Integration/Database/SchemaBuilderTest.php @@ -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'); @@ -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');