chriskite / phactory

A Database Factory for PHP Unit Tests
http://phactory.org
MIT License
140 stars 39 forks source link

Fix MongoDB Collection.insert() error #45

Open sdwire opened 3 years ago

sdwire commented 3 years ago

Collection insert() parameters are expected to be passed by reference. PHP 7.4 seems to enforce that pretty rigidly, triggering an error when the method is called. The call_user_func_array() approach to proxying collection methods seemed to force parameters into a pass-by-value state. This pull request makes the insert() method work again.