Skip to content
Permalink
Browse files

Fix a few deprecated method call sites.

I found a few more quickly grepping through the code.
  • Loading branch information...
markstory committed Feb 1, 2017
1 parent f33c5ce commit 167a9938205065a2ff36886924fa4e52694d8e99
@@ -212,7 +212,7 @@ class Controller implements EventListenerInterface, EventDispatcherInterface
* Holds all passed params.
*
* @var array
* @deprecated 3.1.0 Use `$this->request->params['pass']` instead.
* @deprecated 3.1.0 Use `$this->request->getParam('pass')` instead.
*/
public $passedArgs = [];
@@ -1371,7 +1371,7 @@ public function insert(array $columns, array $types = [])
if (!$this->_parts['values']) {
$this->_parts['values'] = new ValuesExpression($columns, $this->getTypeMap()->setTypes($types));
} else {
$this->_parts['values']->columns($columns);
$this->_parts['values']->setColumns($columns);
}
return $this;
@@ -87,7 +87,7 @@ public function quoteIdentifier($identifier)
public function queryTranslator($type)
{
return function ($query) use ($type) {
if ($this->autoQuoting()) {
if ($this->isAutoQuotingEnabled()) {
$query = (new IdentifierQuoter($this))->quote($query);
}
@@ -216,7 +216,7 @@ public function beforeFind(Event $event, Query $query, $options)
return function ($q) use ($field, $locale, $query, $select) {
$q->where([$q->repository()->aliasField('locale') => $locale]);
if ($query->autoFields() ||
if ($query->isAutoFieldsEnabled() ||
in_array($field, $select, true) ||
in_array($this->_table->aliasField($field), $select, true)
) {
@@ -581,7 +581,7 @@ protected function _correctStrategy($loadable)
$config['strategy'] = Association::STRATEGY_SELECT;
$loadable->setConfig($config);
$loadable->canBeJoined(false);
$loadable->setCanBeJoined(false);
}
/**
@@ -611,7 +611,7 @@ protected function _resolveJoins($associations, $matching = [])
$this->_correctStrategy($loadable);
}
$loadable->canBeJoined(false);
$loadable->setCanBeJoined(false);
$this->_loadExternal[] = $loadable;
}
@@ -495,7 +495,7 @@ public function matching($assoc, callable $builder = null)
* ->select(['total_articles' => $query->func()->count('Articles.id')])
* ->leftJoinWith('Articles')
* ->group(['Users.id'])
* ->autoFields(true);
* ->setAutoFields(true);
* ```
*
* You can also customize the conditions passed to the LEFT JOIN:
@@ -508,7 +508,7 @@ public function matching($assoc, callable $builder = null)
* return $q->where(['Articles.votes >=' => 5]);
* })
* ->group(['Users.id'])
* ->autoFields(true);
* ->setAutoFields(true);
* ```
*
* This will create the following SQL:
@@ -316,7 +316,7 @@ public static function defaultConnectionName()
* {
* $this->belongsTo('Users');
* $this->belongsToMany('Tagging.Tags');
* $this->primaryKey('something_else');
* $this->setPrimaryKey('something_else');
* }
* ```
*

0 comments on commit 167a993

Please sign in to comment.
You can’t perform that action at this time.