Giter Club home page Giter Club logo

Comments (4)

SimonMellerin avatar SimonMellerin commented on September 18, 2024

Also add options to be able to anonymize int by adding noise.

    #[ORM\Column]
    // This will add to the value a random interval between -P1D and P1D
    #[Anonymize(type: 'date', options: ['delta' => 'P1D'])]
    private ?int $age = null;

from dbtoolsbundle.

SimonMellerin avatar SimonMellerin commented on September 18, 2024

Won't be easy to do without makinacorpus/php-query-builder#5

from dbtoolsbundle.

pounard avatar pounard commented on September 18, 2024

Actually, things changed, I implemented makinacorpus/php-query-builder#8 instead, which gives us date addition and subtraction over all supported vendors.

Now let's implement this feature as we discussed:

  • A date range anonymizer, range is given by user: we simply compute a random number of day or hours or minutes (depending some granularity option) in that range, and set it.
  • A date delta anonymizer, more or less X day, hours, minutes (granularity again) and simply date add the number (which can be negative, by the way).

I don't see any other use case here, there's no use of a "percent" parameter which wouldn't make any sense for dates ?

We could also add a "date range anonymizer" multi-column which anonmizes 2 columns at once (start and stop) which would keep the first bound always less than the second bound.

from dbtoolsbundle.

SimonMellerin avatar SimonMellerin commented on September 18, 2024

This has been implemented, see #127

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

from dbtoolsbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.