-
Notifications
You must be signed in to change notification settings - Fork 0
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
[BO - Signalement] Mise en évidence des adresses e-mails mal formattées #2566
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ajouter des tests (valide et non valide), d'ailleurs pour faciliter les tests, cette fonction pourrait être une classe helper
Je passe en draft. |
5fd1d7c
to
dba366f
Compare
@hmeneuvrier @sfinx13 en utilisant le validator de Symfony et faisant des tests unitaires, vous pouvez voir que ça laisse passer certains trucs ; mais l'autre méthode que j'utilisais était peut-être trop restrictive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est super bien, effectivement ça laisse passer quelques cas, même avec le mode strict, mais je préfère que ce soit cohérent partout
src/Service/EmailValidator.php
Outdated
@@ -0,0 +1,22 @@ | |||
<?php | |||
|
|||
namespace App\Service; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Y'a un dossier Validator dans le projet, plutôt le mettre la bas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai fait ça
Par contre, je n'ai pas suivi le même format que les autres Validator. Je suis resté sur une classe statique.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oui oui c'est différent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quelques retours tech est une exception à corriger
3222b5d
to
d4c6f0d
Compare
@sfinx13 @hmeneuvrier @numew J'ai pris en compte vos retours. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests et relecture OK pour moi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
866a70e
to
57e474b
Compare
Les corrections sont faites. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tout ok pour moi avec les dernières modifs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lecture et test OK
|
Ok, j'ai vu le dernier retour de Saidi et la modif d'Emilien, je merge ! |
Ticket
#1893
Description
Mise en évidence des adresses e-mail mal formattées dans la fiche signalement et dans les infos de la nouvelle page de suivi usager.
Ajout d'une commande permettant de corriger un bon lot d'adresses e-mails.
Règles de remplacement
Champs concernés sur la table
Signalement
:mailOccupant
,mailDeclarant
,mailProprio
.Non communiqué
,?
,??
,inconnu@inconnu.com
,inconnu@inconnu
,email@inconnu
,test@test
,x@x.com
,test@fr
,x@x.xx
inconnu@histologe.fr
,fr
,,com
,,net
,?fr
,?com
,?net
.fr
,.com
,.net
Tests
make console app="fix-email-addresses"
pour vérifier qu'elle est bien corrigée