@@ -529,6 +529,8 @@ class TableSchema implements TableSchemaInterface, SqlGeneratorInterface
*/
public function primaryKey(): array
{
+ deprecationWarning('`TableSchema::primaryKey()` is deprecated. Use `TableSchema::getPrimaryKey()` instead.');
+
return $this->getPrimarykey();
}
@@ -107,6 +107,8 @@ class ArrayContext implements ContextInterface
+ deprecationWarning('`ArrayContext::primaryKey()` is deprecated. Use `ArrayContext::getPrimaryKey()` instead.');
return $this->getPrimaryKey();
@@ -181,6 +181,8 @@ class EntityContext implements ContextInterface
+ deprecationWarning('`EntityContext::primaryKey()` is deprecated. Use `EntityContext::getPrimaryKey()` instead.');
return (array)$this->_tables[$this->_rootName]->getPrimaryKey();
@@ -64,6 +64,8 @@ class FormContext implements ContextInterface
+ deprecationWarning('`FormContext::primaryKey()` is deprecated. Use `FormContext::getPrimaryKey()` instead.');
return [];
@@ -52,6 +52,8 @@ class NullContext implements ContextInterface
+ deprecationWarning('`NullContext::primaryKey()` is deprecated. Use `NullContext::getPrimaryKey()` instead.');