bjori / mongo-php-transistor

A trait to save and load your objects in MongoDB
BSD 2-Clause "Simplified" License
28 stars 3 forks source link

refresh _lastModified #1

Closed renanbr closed 8 years ago

renanbr commented 8 years ago

the _lastModified property could be refreshed, once bsonSerialize() is called just for writing purpose

renanbr commented 8 years ago

Sorry for the multiples commits. It seems the tests are failing because CI server is running with the legacy mongo extension.

Anyway, before fixed the tests I would like to know if you think this PR is pertinent. With this patch I don't need to override bsonSerialize() and I can use this Trait as-is.

bjori commented 8 years ago

Absolutely, I've completely neglected this experiment -- but I think the idea is still solid and I'd be happy to merge in any changes that are needed (especially the obvious update to the new namespace names etc) :D

It looks like the tests are using lots of functionality that changed just before the first release of pecl/mongodb -- for example the namespace name and executeInsert.

If you have time to fix the tests and update them to use the correct methods (e.g. MongoDB\Driver\Manager::executeBulkWrite) then that would be very much appreciated !

renanbr commented 8 years ago

Glad to hear this project is not dead :+1: Once the feature proposed in this PR depends to the tests fixes, I've open another PR #2 as you've suggested

bjori commented 8 years ago

Ah. This PR now conflicts after having merged the https://github.com/bjori/mongo-php-transistor/pull/2 separately with the test fixes.

Can you rebase and push again please?

Thanks so much for these fixes! :D

renanbr commented 8 years ago

np, i think it's ok now

bjori commented 8 years ago

Thanks for your help! :D