-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phalcon\Mvc\Collection::save writeConcern argument should be int or string #12474
Comments
Mongo extension is not supported in phalcon for php 7. Try incubator MongoCollection class. |
Yeah, I know. But it's easier to use an adapter for mongo than using a development version of Phalcon. And more generally, this is a non-conformance to the mongo API, even if is usually silentely ignored. |
It seems to me |
But as i told you @Celelibi collection class in phalcon 3 is only for php 5.x, not php 7. |
Yea, but PHP 5.6 is LTS and 7.0 not. So we will support php5 until 2019 (for Phalcon 3) |
Yea i know this. Just if he wants to his mongo with php 7 he needs to use class from incubator. |
Related to #13697 |
Since version 4.0 Mongo is separate composer package - https://github.com/phalcon/incubator-mongodb Closing. |
Expected and Actual Behavior
When phalcon calls the save method on a collection, it passes the array argument:
["w": true]
in the filephalcon/mvc/collection.zep:912
.It should only pass an integer or a string as the documentation says.
https://secure.php.net/manual/en/mongocollection.save.php
https://secure.php.net/manual/en/mongo.writeconcerns.php
This can be a problem when the Mongo API used isn't that of the legacy mongo PHP extension.
For instance, this adapter between both mongo extensions API has a specific check and fail because of the non-conformance of phalcon to the mongo API.
https://github.com/alcaeus/mongo-php-adapter/blob/master/lib/Alcaeus/MongoDbAdapter/Helper/WriteConcernConverter.php#L27
Details
The text was updated successfully, but these errors were encountered: