Skip to content

Commit

Permalink
Fix a few deprecated method call sites.
Browse files Browse the repository at this point in the history
I found a few more quickly grepping through the code.
  • Loading branch information
markstory committed Feb 1, 2017
1 parent f33c5ce commit 167a993
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Controller/Controller.php
Expand Up @@ -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 = [];

Expand Down
2 changes: 1 addition & 1 deletion src/Database/Query.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Database/SqlDialectTrait.php
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/ORM/Behavior/TranslateBehavior.php
Expand Up @@ -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)
) {
Expand Down
4 changes: 2 additions & 2 deletions src/ORM/EagerLoader.php
Expand Up @@ -581,7 +581,7 @@ protected function _correctStrategy($loadable)

$config['strategy'] = Association::STRATEGY_SELECT;
$loadable->setConfig($config);
$loadable->canBeJoined(false);
$loadable->setCanBeJoined(false);
}

/**
Expand Down Expand Up @@ -611,7 +611,7 @@ protected function _resolveJoins($associations, $matching = [])
$this->_correctStrategy($loadable);
}

$loadable->canBeJoined(false);
$loadable->setCanBeJoined(false);
$this->_loadExternal[] = $loadable;
}

Expand Down
4 changes: 2 additions & 2 deletions src/ORM/Query.php
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/Table.php
Expand Up @@ -316,7 +316,7 @@ public static function defaultConnectionName()
* {
* $this->belongsTo('Users');
* $this->belongsToMany('Tagging.Tags');
* $this->primaryKey('something_else');
* $this->setPrimaryKey('something_else');
* }
* ```
*
Expand Down

0 comments on commit 167a993

Please sign in to comment.