Propagate AnonymizerConfig into AbstractAnonymizer

Aperta
#233 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
php
Ambito
backend, database

Direzione di ricerca

Start by reading AnonymizerConfig, AbstractAnonymizer, AnonymizerRegistry, and the unit tests and subclasses that construct anonymizers. Trace every constructor call and assess the breaking-change question raised in the issue. Done means the configuration is propagated consistently, all affected tests and usages are updated, and the compatibility decision is documented.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Followup of #226.

The idea is to propagate AnonymizerConfig directly to AbstractAnonymizer constructor, instead of de-structuring it as $table and $column parameters.

This has many advantages:

  • Each time we add new parameters into AnonyizerConfig then AbstractAnonymizer::__construct() will remain stable (no refactoring needed).
  • All anonymizer may use AnonyizerConfig properties, and thus gain flexibility.
  • Later file enum and file column anonymizers will require the base path information from #232 to load data files.

Disadvantages:

  • This is a AbstractAnonymizer::__construct() signature change, which means a breaking change.
  • The PR will be huge, there are many places to fix (especially unit tests).

Another question remains: could we actually allow this breaking change to be in a minor version? My opinion is yes, because people extending the AbstractAnonymizer class or any of the existing subclass are likely not needing to change the constructor implementation, and they don't instanciate their code themselves since it's the role of the AnonymizerRegistry class.

Lingua principale
PHP
Stelle
235
Fork
17
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di makinacorpus/DbToolsBundle

Tutte le issue di makinacorpus/DbToolsBundle

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.