Skip to content

Refonte classe Afup\Site\Forum\AppelConferencier#2231

Open
vgreb wants to merge 1 commit into
afup:masterfrom
vgreb:refacto/class-appelconferencier
Open

Refonte classe Afup\Site\Forum\AppelConferencier#2231
vgreb wants to merge 1 commit into
afup:masterfrom
vgreb:refacto/class-appelconferencier

Conversation

@vgreb
Copy link
Copy Markdown
Collaborator

@vgreb vgreb commented May 10, 2026

resolves #2230

@vgreb vgreb self-assigned this May 10, 2026
string $order = 's.date_soumission',
array $onlyIds = [],
): array {
$sql = 'SELECT COUNT(co.id) as commentaires_nombre, ' . $fields . '
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

question : c'est possible de faire autrement pour éviter l'injection SQL ?

Ou alors c'est pour le chantier migration vers doctrine ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Oulah je l'avais pas vu celle là ! Je vais reprendre la requête proprement avec du binding de paramètre Ting.

public function getSpeakersBySession(int $sessionId): CollectionInterface
{
$sql = ' SELECT ';
$sql .= ' LOWER(CONCAT(SUBSTRING(c.prenom, 1, 1), c.nom)) as code, ';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

question : est-ce que code est mappé dans l'entité Speaker ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Non en l'état il ne l'est pas, je vais regarder ça.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

J'ai la possibilité de mapper le champ code sur l'entité, en revanche ça va impliquer de revoir toutes les actions et templates qui utilisent les nouvelles méthodes.

Est-ce que je le fais dans cette MR ou lors de la migration Doctrine ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Est-ce que ce code est utilisé en l'état ?

Avant c'était un array, donc on pouvait avoir l'info.

Le plus simple n'est pas de retourner un tableau ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ouais, je vais faire un array classique, ce sera plus simple à relire.

@vgreb vgreb force-pushed the refacto/class-appelconferencier branch 2 times, most recently from 44ac74d to dd1afd0 Compare May 11, 2026 20:57
@vgreb vgreb force-pushed the refacto/class-appelconferencier branch from dd1afd0 to e00e47a Compare May 11, 2026 21:09
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.

Refonte Afup\Site\Forum\AppelConferencier

2 participants