Skip to content

Conversation

@emilschn
Copy link
Collaborator

@emilschn emilschn commented Jan 7, 2026

Ticket

#5189

Description

Mise à jour de la version de Symfony vers 7.4

Changements apportés

  • Modification versions de composants
  • Remplacement des $request->get par $request->request->get ou $request->query->get selon les cas
  • Ajout d'un service pour récupérer les données string et array pour éviter de répéter des tests

Pré-requis

make composer

Tests

  • CI Ok
  • Vérifier les différents formulaires modifiés (je préfère ne pas lister, de peur d'en oublier ; j'ai testé manuellement normalement mais bon... je préfère un deuxième check)

@emilschn emilschn changed the title [WIP] [QA] Mise à jour vers Symfony 7.4 [QA] Mise à jour vers Symfony 7.4 Jan 7, 2026
@emilschn emilschn changed the title [QA] Mise à jour vers Symfony 7.4 [WIP] [QA] Mise à jour vers Symfony 7.4 Jan 7, 2026
@emilschn emilschn force-pushed the feature/5189-symfony-7-4 branch from 46c45cf to 9282321 Compare January 9, 2026 09:28
@emilschn emilschn changed the title [WIP] [QA] Mise à jour vers Symfony 7.4 [QA] Mise à jour vers Symfony 7.4 Jan 9, 2026
@emilschn emilschn marked this pull request as ready for review January 9, 2026 12:18
$epcis = json_decode($request->get('epcis'));
$statut = $request->get('statut');
$strEtiquettes = json_decode($request->get('etiquettes') ?? '[]');
if (Request::METHOD_POST === $request->getMethod()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

J'ai pas compris/trouvé a quel moment on peux etre dans une méthode différente de POST ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Dans les tests ; sinon je peux modifier les tests

Copy link
Collaborator

Choose a reason for hiding this comment

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

Je pense qu'il ne faut pas agir sur le code de prod pour faire fonctionner les tests (surtout que la ca signifie que les tests ne vérifient pas un comportement existant)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

C'est modifié, c'était pas grand chose

}
$authorizedTerritories = $user->getPartnersTerritories();
$territoryId = $request->get('territoire');
if (Request::METHOD_POST === $request->getMethod()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Idem, je comprend pas quel point d'entrée peux amener au GET ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Dans les tests ; sinon je peux modifier les tests

Copy link
Collaborator

Choose a reason for hiding this comment

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

Je préférerais une modification des tests

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

C'est modifié, c'était pas grand chose

$user,
$filters,
(int) $request->get('offset')
(int) $request->query->get('offset')
Copy link
Collaborator

Choose a reason for hiding this comment

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

C'est hors sujet mais je serais curieux de comprendre à quel moment on utilise ca ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

On à pas de réponse à cette question si je comprends bien. Est-ce qu'on scrée un ticket à part si on veux creuser le sujet et supprimer ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

J'ai testé dans différents cas, et j'ai supprimé du coup (ainsi que le paramètre de la fonction qui n'a pas d'utilité du coup)

array $requestData,
array $expectedUserData,
): void {
$code = $requestData['code'];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Supprimer les 3 lignes ?

Copy link
Collaborator Author

@emilschn emilschn Jan 12, 2026

Choose a reason for hiding this comment

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

j'ai mis ça pour que ce soit envoyé dans l'url comme dans les cas réels ; sinon ça marche en vrai, mais pas dans les tests

Copy link
Collaborator

Choose a reason for hiding this comment

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

on aurait pu faire un peu plus propre avec cette ligne
$request = new Request([], $requestData, ['code' => $requestData['code']]);
(idem sur le reste des modification de ce fichier, mais c'est pas bloquant)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK !

@sonarqubecloud
Copy link

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 et tests OK

Copy link
Collaborator

@numew numew left a comment

Choose a reason for hiding this comment

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

Ok

@numew numew merged commit b05318f into develop Jan 16, 2026
5 checks passed
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.

4 participants