Skip to content

Commit

Permalink
Merge pull request #34 from arilia/deprecations
Browse files Browse the repository at this point in the history
Remove usage of deprecations
  • Loading branch information
josegonzalez authored Apr 18, 2018
2 parents 1c4f90d + 4371d04 commit 18336b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Model/Behavior/VersionBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}

Expand Down

0 comments on commit 18336b1

Please sign in to comment.