Skip to content

Commit

Permalink
Suppression des dépréciations (#1631)
Browse files Browse the repository at this point in the history
  • Loading branch information
stakovicz authored Feb 17, 2025
1 parent 6923905 commit a4017e1
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 23 deletions.
4 changes: 2 additions & 2 deletions app/Resources/views/event/ticket/ticket.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
{% form_theme ticketForm _self %}

{% block form_errors %}
{% spaceless %}
{% apply spaceless %}
{% if errors|length > 0 %}
<ul class="tickets--errors">
{% for error in errors %}
<li>{{ error.message }}</li>
{% endfor %}
</ul>
{% endif %}
{% endspaceless %}
{% endapply %}
{% endblock form_errors %}

{% block metas %}
Expand Down
4 changes: 3 additions & 1 deletion app/Resources/views/site/secondary_menu.html.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<div class="secondary-menu">
{% for item in menu if item.is_active %}
{% for item in menu %}
{% if item.is_active %}
<a href="" class="secondary-menu__current-item">{{ item.nom }}</a>
{% endif %}
{% endfor %}
<div class="mw1400p center">
<div class="secondary-menu__list">
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"doctrine/dbal": "^2.5",
"ekino/newrelic-bundle": "^1.4",
"erusev/parsedown": "^1.6",
"excelwebzone/recaptcha-bundle": "1.5.13",
"excelwebzone/recaptcha-bundle": "^1.5",
"ezyang/htmlpurifier": "^4.10",
"friendsofpear/pear_exception": "0.0.*",
"guzzlehttp/guzzle": "^6.5",
Expand Down
28 changes: 15 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
new Choice([
'choices' => array_values($antennesInfos),
'multiple' => true,
'strict' => true,
]),
]
]
Expand Down
4 changes: 2 additions & 2 deletions sources/AppBundle/Event/Speaker/SpeakerPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function handleRequest(Request $request, Event $event, Speaker $speaker)

$shouldDisplaySpeakersDinerForm = $event->getSpeakersDinerEnabled() && $event->getDateEndSpeakersDinerInfosCollection() > $now;

if ($shouldDisplaySpeakersDinerForm && $speakersDinerType->isValid()) {
if ($shouldDisplaySpeakersDinerForm && $speakersDinerType->isSubmitted() && $speakersDinerType->isValid()) {
$speakersDinerData = $speakersDinerType->getData();
$speaker->setWillAttendSpeakersDiner($speakersDinerData['will_attend'] === 1);
$speaker->setHasSpecialDiet($speakersDinerData['has_special_diet'] === 1);
Expand All @@ -111,7 +111,7 @@ public function handleRequest(Request $request, Event $event, Speaker $speaker)

$shouldDisplayHotelReservationForm = $event->getAccomodationEnabled() && $event->getDateEndHotelInfosCollection() > $now;

if ($shouldDisplayHotelReservationForm && $hotelReservationType->isValid()) {
if ($shouldDisplayHotelReservationForm && $hotelReservationType->isSubmitted() && $hotelReservationType->isValid()) {
$hotelReservationData = $hotelReservationType->getData();
$speaker->setHotelNightsArray($hotelReservationData['nights']);

Expand Down
2 changes: 1 addition & 1 deletion sources/AppBundle/Planete/FeedFormData.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class FeedFormData
public $userId;
/**
* @var int
* @Assert\Choice({0, 1})
* @Assert\Choice(choices={0, 1}, strict=true)
*/
public $status = Feed::STATUS_ACTIVE;
}
4 changes: 2 additions & 2 deletions sources/AppBundle/Security/TestGithubAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(GithubUserRepository $githubUserRepository)
$this->githubUserRepository = $githubUserRepository;
}

public function getCredentials(Request $request)
public function getCredentials(Request $request): string
{
return $request->get('github_test_user');
}
Expand Down Expand Up @@ -118,6 +118,6 @@ public function start(Request $request, AuthenticationException $authException =

public function supports(Request $request): bool
{
return true;
return (bool) $request->get('github_test_user');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'multiple' => true,
'choices' => $choices,
'constraints' => [
new Choice(['choices' => array_values($choices), 'multiple' => true, 'min' => 1]),
new Choice(['choices' => array_values($choices), 'multiple' => true, 'min' => 1, 'strict' => true]),
new Callback(['callback' => function ($values, ExecutionContextInterface $context): void {
if (in_array(self::NIGHT_NONE, $values)
&& 1 !== count($values)) {
Expand Down

0 comments on commit a4017e1

Please sign in to comment.