Skip to content
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

Add DateAnonymizer #32

Closed
SimonMellerin opened this issue Nov 21, 2023 · 4 comments
Closed

Add DateAnonymizer #32

SimonMellerin opened this issue Nov 21, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request MVP
Milestone

Comments

@SimonMellerin
Copy link
Member

No description provided.

@SimonMellerin SimonMellerin added MVP good first issue Good for newcomers labels Nov 21, 2023
@SimonMellerin
Copy link
Member Author

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;

@SimonMellerin SimonMellerin added the enhancement New feature or request label Feb 23, 2024
@SimonMellerin SimonMellerin self-assigned this Mar 7, 2024
@SimonMellerin
Copy link
Member Author

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

@SimonMellerin SimonMellerin removed the good first issue Good for newcomers label Mar 8, 2024
@pounard
Copy link
Member

pounard commented Mar 13, 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.

@pounard pounard assigned pounard and unassigned SimonMellerin Mar 14, 2024
pounard added a commit that referenced this issue Mar 14, 2024
pounard added a commit that referenced this issue Mar 14, 2024
pounard added a commit that referenced this issue Mar 14, 2024
pounard added a commit that referenced this issue Mar 14, 2024
pounard added a commit that referenced this issue Mar 15, 2024
pounard added a commit that referenced this issue Mar 15, 2024
pounard added a commit that referenced this issue Mar 15, 2024
pounard added a commit that referenced this issue Mar 15, 2024
pounard added a commit that referenced this issue Mar 15, 2024
pounard added a commit that referenced this issue Mar 15, 2024
pounard added a commit that referenced this issue Mar 15, 2024
pounard added a commit that referenced this issue Mar 15, 2024
pounard added a commit that referenced this issue Mar 15, 2024
pounard added a commit that referenced this issue Mar 15, 2024
pounard added a commit that referenced this issue Mar 15, 2024
pounard added a commit that referenced this issue Mar 22, 2024
pounard added a commit that referenced this issue Mar 25, 2024
pounard added a commit that referenced this issue Mar 25, 2024
pounard added a commit that referenced this issue Mar 25, 2024
pounard added a commit that referenced this issue Mar 25, 2024
pounard added a commit that referenced this issue Mar 25, 2024
pounard added a commit that referenced this issue Mar 25, 2024
SimonMellerin pushed a commit that referenced this issue Mar 26, 2024
@SimonMellerin
Copy link
Member Author

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)

@pounard pounard added this to the 1.0.0 milestone May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request MVP
Projects
None yet
Development

No branches or pull requests

2 participants