From 74251de72fd6f9631cb7c2c6d42e6ba0a47a817c Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 5 May 2018 17:35:31 -0400 Subject: [PATCH] fix: drop a few more deprecated method calls --- src/Listener/ViewListener.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Listener/ViewListener.php b/src/Listener/ViewListener.php index 229ab319..06a3c489 100644 --- a/src/Listener/ViewListener.php +++ b/src/Listener/ViewListener.php @@ -65,7 +65,7 @@ public function beforePaginate(Event $event) $this->associations = $this->_associations(array_keys($related)); } - if (!$event->getSubject()->query->contain()) { + if (!$event->getSubject()->query->getContain()) { $event->getSubject()->query->contain($this->_getRelatedModels(['manyToOne', 'oneToOne'])); } } @@ -211,7 +211,7 @@ protected function _getRelatedModels($associationTypes = []) foreach ($associationTypes as $assocType) { $associations = array_merge( $associations, - $this->_table()->associations()->type($assocType) + $this->_table()->associations()->getByType($assocType) ); } }