From 4371d0459f383a06da5a12dfac970368f16a78aa Mon Sep 17 00:00:00 2001 From: arilia Date: Wed, 18 Apr 2018 08:08:00 +0200 Subject: [PATCH] Remove usage of deprecations removed usage of alias() and association($name) in favour of getAlias() and getAssociation($name) --- src/Model/Behavior/VersionBehavior.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Model/Behavior/VersionBehavior.php b/src/Model/Behavior/VersionBehavior.php index 27397af..0eb5da6 100644 --- a/src/Model/Behavior/VersionBehavior.php +++ b/src/Model/Behavior/VersionBehavior.php @@ -145,7 +145,7 @@ public function versionAssociation($field = null, $options = []) $this->_table->hasMany($name, $options); } - return $this->_table->association($name); + return $this->_table->getAssociation($name); } /** @@ -403,7 +403,7 @@ protected function _extractForeignKey($entity) */ protected function _associationName($field = null) { - $alias = Inflector::singularize($this->_table->alias()); + $alias = Inflector::singularize($this->_table->getAlias()); if ($field) { $field = Inflector::camelize($field); } @@ -422,7 +422,7 @@ protected function _referenceName() $name = namespaceSplit(get_class($table)); $name = substr(end($name), 0, -5); if (empty($name)) { - $name = $table->table() ?: $table->alias(); + $name = $table->table() ?: $table->getAlias(); $name = Inflector::camelize($name); }