From f96757cfaccf8a3193c7f8e1c68efc0297c0b972 Mon Sep 17 00:00:00 2001 From: Thomas von Hassel Date: Mon, 8 May 2017 10:52:18 +0200 Subject: [PATCH 1/2] update _initializeSchema() example update _initializeSchema() example to not use deprecated class name --- en/orm/database-basics.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/orm/database-basics.rst b/en/orm/database-basics.rst index 453f2b8d51..406dd7f1c9 100644 --- a/en/orm/database-basics.rst +++ b/en/orm/database-basics.rst @@ -431,12 +431,12 @@ CakePHP's database layer will automatically convert our JSON data when creating queries. You can use the custom types you've created by mapping the types in your Table's :ref:`_initializeSchema() method `:: - use Cake\Database\Schema\Table as Schema; + use Cake\Database\Schema\TableSchema; class WidgetsTable extends Table { - protected function _initializeSchema(Schema $schema) + protected function _initializeSchema(TableSchema $schema) { $schema->columnType('widget_prefs', 'json'); return $schema; From dde13f4a333f2e421d6cba19ff97d17be2b3a5b0 Mon Sep 17 00:00:00 2001 From: Thomas von Hassel Date: Mon, 8 May 2017 10:53:32 +0200 Subject: [PATCH 2/2] update _initializeSchema() example update _initializeSchema() example to not use deprecated class name --- en/orm/saving-data.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/orm/saving-data.rst b/en/orm/saving-data.rst index f2558cb5e3..e85cd71e8c 100644 --- a/en/orm/saving-data.rst +++ b/en/orm/saving-data.rst @@ -1074,12 +1074,12 @@ column Types:: Type::map('json', 'App\Database\Type\JsonType'); // In src/Model/Table/UsersTable.php - use Cake\Database\Schema\Table as Schema; + use Cake\Database\Schema\TableSchema; class UsersTable extends Table { - protected function _initializeSchema(Schema $schema) + protected function _initializeSchema(TableSchema $schema) { $schema->columnType('preferences', 'json'); return $schema;