makinacorpus / DbToolsBundle

A PHP library to backup, restore and anonymize databases
https://dbtoolsbundle.readthedocs.io
MIT License
181 stars 15 forks source link

Anonymizers options improvements #97

Closed pounard closed 8 months ago

pounard commented 9 months ago

As stated in https://github.com/makinacorpus/DbToolsBundle/pull/96#discussion_r1497552466 there might some room for improvements in options handling:

SimonMellerin commented 9 months ago

This validation could also be used by the db-tools:anonymization:dump-config command.

pounard commented 9 months ago

Exactly what I was thinking about ! We probably should not block in case of invalid options for production operation.

pounard commented 8 months ago

Also, I'd like to add helpers on the Option class, such as:

And add new helper along the way for anonymizers to use.

@SimonMellerin @Lonnytunes what is your opinion about this?

SimonMellerin commented 8 months ago

I'm not sure about this, I prefer to keep things simple for now and not over-anticipate needs

pounard commented 8 months ago

It would validates the user input, and I already copy/pasted code (for example the parseDate()).

SimonMellerin commented 8 months ago

This has been implemented, see #128 ans #131

It is already on the main branch and will be available in the next release (1.1.x expected for the next week)