Skip to content

Feature/dotenv thematisation#2306

Open
vgreb wants to merge 2 commits into
afup:masterfrom
vgreb:feature/dotenv-thematisation
Open

Feature/dotenv thematisation#2306
vgreb wants to merge 2 commits into
afup:masterfrom
vgreb:feature/dotenv-thematisation

Conversation

@vgreb

@vgreb vgreb commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Reprise de #1897

@vgreb vgreb force-pushed the feature/dotenv-thematisation branch from 6a754f7 to 76b618a Compare June 26, 2026 19:49
@vgreb vgreb force-pushed the feature/dotenv-thematisation branch from 76b618a to 09d13ad Compare June 26, 2026 20:18
@vgreb vgreb force-pushed the feature/dotenv-thematisation branch from 09d13ad to 4da5cbc Compare June 26, 2026 20:23
Comment on lines +26 to +30
public function __invoke(Request $request): Response
{
$id = $request->query->get('id');

$event = $this->eventActionHelper->getEventById($id);

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.

Il y a un système tout fait pour récupérer l'event en cours de sélection : https://github.com/afup/web/blob/master/doc/backoffice/event-selector.md

/**
* @return CollectionInterface<EventTheme>
*/
public function getByEventOrderedByPriority(int $eventId): CollectionInterface

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.

Suggested change
public function getByEventOrderedByPriority(int $eventId): CollectionInterface
public function getByThemesOrderedByPriority(int $eventId): CollectionInterface

Comment on lines +333 to +334
// @phpstan-ignore-next-line (generics variance)
$metadata->setRepository(self::class);

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.

Tu peux ignorer une erreur explicitement plutôt que toute la ligne :

Suggested change
// @phpstan-ignore-next-line (generics variance)
$metadata->setRepository(self::class);
$metadata->setRepository(self::class); // @phpstan-ignore argument.type

$builder->add($idForumField)
->add('name', TextType::class, [
'label' => 'Nom du thème',
'constraints' => [new Assert\NotBlank(['message' => 'Titre du forum manquant'])],

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.

Utiliser un array c'est déprécié :

Suggested change
'constraints' => [new Assert\NotBlank(['message' => 'Titre du forum manquant'])],
'constraints' => [new Assert\NotBlank(message: 'Titre du forum manquant')],

->add('description', TextareaType::class, [
'label' => 'Description',
'help' => 'Le thème de description apparait sur la page de programme',
'constraints' => [new Assert\NotBlank(), new Assert\Length(['max' => 600])],

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.

Pareil ici :

Suggested change
'constraints' => [new Assert\NotBlank(), new Assert\Length(['max' => 600])],
'constraints' => [new Assert\NotBlank(), new Assert\Length(max: 600)],

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.

2 participants