-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
MongoDBPurger and non existent collections with MongoDB authorization enabled #264
Comments
Of course, using the |
The purger is designed for test scenarios, so I'm not sure if this is a
valid use-case scenario.
Is this an issue arising in your test setup, or otherwise where?
…On 4 Aug 2017 05:25, "Douglas Reith" ***@***.***> wrote:
Of course, using the MongoDBPurger and having authorization: enabled may
not be a use case you will want to support! I had to have it on in my dev
env for testing. My workaround is to turn off security, restart mongodb,
run the purger, and then turn security back on.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#264 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJakMudCvOtXsRSiBDVi-BKokOo9TbKks5sUo8SgaJpZM4OtOVV>
.
|
We're using the Purger as part of a clean down script for our development environment. So it's not being used in our tests as such. To be fair it isn't doing much so we could just override or re-implement - happy for it to be closed. |
TBH, even in test environments it might be feasible to run with |
I replied in PHPLIB-277, but I'm curious if the authenticated user actually possessed the I assume there's no good reason for the purger to drop embedded documents, so that may in itself be a bug. |
We are using the MongoDBPurger but we found that adding
authorization: enabled
to/etc/mongodb.conf
causes it to fail, due to:https://jira.mongodb.org/browse/PHPLIB-277
I thought another way to avoid ^^ is to ask the Purger to ignore embedded documents. They do not have a collection.
Therefore I have changed the MongoDBPurger code and added
! $metadata->isEmbeddedDocument
here:https://github.com/doctrine/data-fixtures/blob/master/lib/Doctrine/Common/DataFixtures/Purger/MongoDBPurger.php#L69
I wanted to prove it so I tried the test but I ran into #263
The text was updated successfully, but these errors were encountered: