You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But we still have this check in our core MongoDB class. Should we change it
if ( ! class_exists('Mongo'))
{
thrownew \Mongo_DbException("The MongoDB PECL extension has not been installed or enabled");
}
The new check should be
if ( ! class_exists('Mongo') && ! class_exists('MongoDB\Client'))
{
thrownew \Mongo_DbException("The MongoDB PECL extension has not been installed or enabled");
}
By the way, I think in the near future we should remove the ! class_exists('Mongo') check too.
The text was updated successfully, but these errors were encountered:
That is assuming the new MongoDB\Client class has exactly the same API als the old Mongo class. Is that the case? If not, the entire abstraction layer has to be rewritten, in which case you'd probably be better of using an external Mongo library.
Thank you for your reply.
Currently we have to override the core class and override some methods to match with the new MongoDB Client.
Actually some methods in the driver have been changed, and I think the best solution is to write a new Abstraction Driver or using an external library.
currently we only override only some methods we used.
But I think I will check remaining methods whether they need to be changed or not.
I will share my complete code after I finish :)
PHP MongoDB Driver has been updated in 2016, the old client class
Mongo
is deprecated.https://derickrethans.nl/new-drivers.html
But we still have this check in our core MongoDB class. Should we change it
The new check should be
By the way, I think in the near future we should remove the
! class_exists('Mongo')
check too.The text was updated successfully, but these errors were encountered: