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

[Qa] getPartner() on null / EntityValueResolve.... #2422

Merged
merged 4 commits into from
Apr 5, 2024

Conversation

numew
Copy link
Collaborator

@numew numew commented Apr 5, 2024

Ticket

#2420

Description

  1. Uncaught PHP Exception Error: "Call to a member function getPartner() on null" at AffectationController.php line 94
    https://sentry.incubateur.net/organizations/betagouv/issues/90999/?project=61&query=is%3Aunresolved&referrer=issue-stream
    Lorsqu'on tente de supprimer une affectation sur un signalement (via le bouton poubelle) on avait un crash si l'affectation a déjà été supprimé (possible si la page est ouverte depuis longtemps ou si on a ouvert deux fois la même page par exemple). Corrigé.

  2. object not found by "Symfony\Bridge\Doctrine\ArgumentResolver\EntityValueResolver"." at EntityValueResolver.php line 76
    https://sentry.incubateur.net/organizations/betagouv/issues/85062/?project=61&query=is%3Aunresolved&referrer=issue-stream
    Sur la route activate_account la route provoquait une requête sur les deux paramètres user + token donc même avec un user valide on avait un not found plutôt qu'une redirection avec le message lien expiré. C'est corrigé.

  3. Deprecated: trim(): Passing null to parameter of type string is deprecated
    https://sentry.incubateur.net/organizations/betagouv/issues/95049/?project=61&query=is%3Aunresolved&referrer=issue-stream
    Correction de la dépréciation

  4. Warning: file_get_contents(...) Not Found
    https://sentry.incubateur.net/organizations/betagouv/issues/86810/?project=61&query=is%3Aunresolved&referrer=issue-stream
    En prod (contrairement au dev) les warning ne levant pas une erreur, une image introuvable ne renvoyait pas le fichier image404 mais un fichier vide. C'est corrigé.

Copy link

sonarcloud bot commented Apr 5, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

Copy link
Collaborator

@hmeneuvrier hmeneuvrier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relecture OK, et test du premier OK

@@ -103,6 +104,7 @@ public function resetPassword(
ActivationTokenGenerator $activationTokenGenerator,
ValidatorInterface $validator,
Security $security,
#[MapEntity(mapping: ['uuid' => 'uuid'])]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

je pensais que le framework était capable de le résoudre seul

Copy link
Collaborator Author

@numew numew Apr 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oui mais il le résout tellement bien par défaut qu'il fait le findBy sur uuid + token. J'ai mis explicitement ça pour qu'il cherche uniquement sur l'uuid. ca corrige le soucis

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bizarrement j'ai pas réussi à reproduire en supprimant l'annotation ça résoud bien l'objet. Voyons voir ce que ça donne dans les prochains jour.

@@ -103,6 +104,7 @@ public function resetPassword(
ActivationTokenGenerator $activationTokenGenerator,
ValidatorInterface $validator,
Security $security,
#[MapEntity(mapping: ['uuid' => 'uuid'])]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bizarrement j'ai pas réussi à reproduire en supprimant l'annotation ça résoud bien l'objet. Voyons voir ce que ça donne dans les prochains jour.

@sfinx13
Copy link
Collaborator

sfinx13 commented Apr 5, 2024

Lecture OK

@sfinx13 sfinx13 merged commit fa372f5 into main Apr 5, 2024
2 of 3 checks passed
@hmeneuvrier hmeneuvrier deleted the hotfix/2420-get-partner-on-null branch April 11, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants