From 96dd800361a17f942aebfbcddf84cccb178f83d9 Mon Sep 17 00:00:00 2001 From: Michele Date: Tue, 23 May 2017 17:29:29 +0200 Subject: [PATCH 1/3] Removed PHP 7.1 fix from Mongo Collection --- tests/CollectionRepositoryTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CollectionRepositoryTest.php b/tests/CollectionRepositoryTest.php index 1b71c3c..6de29c8 100644 --- a/tests/CollectionRepositoryTest.php +++ b/tests/CollectionRepositoryTest.php @@ -314,7 +314,7 @@ function __construct() class UsersMongo extends \Phalcon\Mvc\MongoCollection { - use \MicheleAngioni\PhalconRepositories\MongoFix; +// use \MicheleAngioni\PhalconRepositories\MongoFix; public $id; From 391557d90c5d78e61b2b46f1213b761bb46d2c70 Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 7 Jul 2017 18:01:57 +0200 Subject: [PATCH 2/3] Removed PHP 7.0 from Travis --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ad5bc89..552d750 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - 7.0 - 7.1 services: From 6602af70ce61fdc185959a6be9c4760bc9259a91 Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 7 Jul 2017 18:03:47 +0200 Subject: [PATCH 3/3] Removed unused MongoFix --- src/PhalconRepositories/MongoFix.php | 36 ---------------------------- tests/CollectionRepositoryTest.php | 2 -- 2 files changed, 38 deletions(-) delete mode 100644 src/PhalconRepositories/MongoFix.php diff --git a/src/PhalconRepositories/MongoFix.php b/src/PhalconRepositories/MongoFix.php deleted file mode 100644 index ff3cc7b..0000000 --- a/src/PhalconRepositories/MongoFix.php +++ /dev/null @@ -1,36 +0,0 @@ -= 0) { - $this->_dependencyInjector = \Phalcon\Di::getDefault(); - $this->_modelsManager = $this->_dependencyInjector->getShared("collectionManager"); - $this->_modelsManager->initialize($this); - } - - return parent::save(); - } - - public function delete() - { - if (version_compare(PHP_VERSION, '7.1.0') >= 0) { - $this->_dependencyInjector = \Phalcon\Di::getDefault(); - $this->_modelsManager = $this->_dependencyInjector->getShared("collectionManager"); - $this->_modelsManager->initialize($this); - } - - return parent::delete(); - } - - /** - * WORKAROUND TO FIX PHALCON INCUBATOR MONGO BUG ------> - */ -} \ No newline at end of file diff --git a/tests/CollectionRepositoryTest.php b/tests/CollectionRepositoryTest.php index 6de29c8..908514b 100644 --- a/tests/CollectionRepositoryTest.php +++ b/tests/CollectionRepositoryTest.php @@ -314,8 +314,6 @@ function __construct() class UsersMongo extends \Phalcon\Mvc\MongoCollection { -// use \MicheleAngioni\PhalconRepositories\MongoFix; - public $id; public $username;