From eea1b9caedaf5e83173bf77cdb23ab0705903304 Mon Sep 17 00:00:00 2001 From: SAUGUES--EYRAUD Julien Date: Tue, 21 Apr 2026 09:51:06 +0200 Subject: [PATCH 1/4] Ajout de room_id dans timeSlot --- .idea/.gitignore | 10 ++ .idea/Conventionist.iml | 151 ++++++++++++++++ .idea/dataSources.xml | 15 ++ .idea/laravel-idea.xml | 8 + .idea/modules.xml | 8 + .idea/php.xml | 168 ++++++++++++++++++ .idea/phpunit.xml | 10 ++ .idea/symfony2.xml | 6 + .idea/vcs.xml | 6 + migrations/Version20260420144514.php | 43 +++++ .../Admin/TimeSlotCrudController.php | 19 +- src/DataFixtures/TimeSlotFixture.php | 12 ++ src/Entity/Room.php | 37 ++++ src/Entity/TimeSlot.php | 19 +- 14 files changed, 508 insertions(+), 4 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/Conventionist.iml create mode 100644 .idea/dataSources.xml create mode 100644 .idea/laravel-idea.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/php.xml create mode 100644 .idea/phpunit.xml create mode 100644 .idea/symfony2.xml create mode 100644 .idea/vcs.xml create mode 100644 migrations/Version20260420144514.php diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b60ab01 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/Conventionist.iml b/.idea/Conventionist.iml new file mode 100644 index 0000000..b61ee93 --- /dev/null +++ b/.idea/Conventionist.iml @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml new file mode 100644 index 0000000..0d6df1b --- /dev/null +++ b/.idea/dataSources.xml @@ -0,0 +1,15 @@ + + + + + mariadb + true + org.mariadb.jdbc.Driver + jdbc:mariadb://localhost:33306/app + + + + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/.idea/laravel-idea.xml b/.idea/laravel-idea.xml new file mode 100644 index 0000000..2354ce3 --- /dev/null +++ b/.idea/laravel-idea.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..b9fee1f --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 0000000..98abe28 --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/phpunit.xml b/.idea/phpunit.xml new file mode 100644 index 0000000..83eacae --- /dev/null +++ b/.idea/phpunit.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/symfony2.xml b/.idea/symfony2.xml new file mode 100644 index 0000000..2dfac5e --- /dev/null +++ b/.idea/symfony2.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..c8397c9 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/migrations/Version20260420144514.php b/migrations/Version20260420144514.php new file mode 100644 index 0000000..5a2e675 --- /dev/null +++ b/migrations/Version20260420144514.php @@ -0,0 +1,43 @@ +addSql('ALTER TABLE time_slot ADD room_id VARCHAR(36) NOT NULL'); + $this->addSql('ALTER TABLE time_slot ADD CONSTRAINT FK_1B3294A54177093 FOREIGN KEY (room_id) REFERENCES room (id)'); + $this->addSql('CREATE INDEX IDX_1B3294A54177093 ON time_slot (room_id)'); + $this->addSql('DROP INDEX IDX_75EA56E016BA31DB ON messenger_messages'); + $this->addSql('DROP INDEX IDX_75EA56E0FB7336F0 ON messenger_messages'); + $this->addSql('DROP INDEX IDX_75EA56E0E3BD61CE ON messenger_messages'); + $this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0E3BD61CE16BA31DBBF396750 ON messenger_messages (queue_name, available_at, delivered_at, id)'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('DROP INDEX IDX_75EA56E0FB7336F0E3BD61CE16BA31DBBF396750 ON messenger_messages'); + $this->addSql('CREATE INDEX IDX_75EA56E016BA31DB ON messenger_messages (delivered_at)'); + $this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0 ON messenger_messages (queue_name)'); + $this->addSql('CREATE INDEX IDX_75EA56E0E3BD61CE ON messenger_messages (available_at)'); + $this->addSql('ALTER TABLE time_slot DROP FOREIGN KEY FK_1B3294A54177093'); + $this->addSql('DROP INDEX IDX_1B3294A54177093 ON time_slot'); + $this->addSql('ALTER TABLE time_slot DROP room_id'); + } +} diff --git a/src/Controller/Admin/TimeSlotCrudController.php b/src/Controller/Admin/TimeSlotCrudController.php index 159efe2..3ac0dee 100644 --- a/src/Controller/Admin/TimeSlotCrudController.php +++ b/src/Controller/Admin/TimeSlotCrudController.php @@ -6,6 +6,7 @@ use App\Entity\TimeSlot; use App\Repository\BoothRepository; use App\Repository\EventRepository; +use App\Repository\RoomRepository; use App\Repository\TimeSlotRepository; use Doctrine\ORM\EntityManagerInterface; use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController; @@ -28,6 +29,7 @@ public function __construct( private readonly EntityManagerInterface $em, private readonly EventRepository $eventRepository, private readonly BoothRepository $boothRepository, + private readonly RoomRepository $roomRepository, private readonly TimeSlotRepository $scheduledActivityRepository, private readonly TranslatorInterface $translator, private readonly CsrfTokenManagerInterface $csrfTokenManager, @@ -45,9 +47,18 @@ public function createFromCalendar(Request $request): Response $start = $request->request->get('start'); $end = $request->request->get('end'); $booth = $request->request->get('booth_id'); + $room = $request->request->get('room_id'); $event = $request->request->get('event_id'); + if($booth && $room) { + if($room != $booth->get('room_id')) { + throw new BadRequestHttpException('Parameters don\'t match.'); + } + } + else if($booth) { + $room = $this->boothRepository->find($booth)->getRoom()->getId(); + } - if (!$start || !$end || !$booth || !$event) { + if (!$start || !$end || !$room || !$event) { throw new BadRequestHttpException('Missing required parameters.'); } try { @@ -58,12 +69,13 @@ public function createFromCalendar(Request $request): Response $end = null; } $booth = $this->boothRepository->find($booth); + $room = $this->roomRepository->find($room); $event = $this->eventRepository->find($event); - if (!$start || !$end || !$booth || !$event) { + if (!$start || !$end || !$room || !$event) { throw new BadRequestHttpException('Missing required parameters.'); } - $newSlot = TimeSlot::create($event, $booth, $start, $end); + $newSlot = TimeSlot::create($event, $booth, $room, $start, $end); $this->em->persist($newSlot); $this->em->flush(); @@ -86,6 +98,7 @@ public function configureFields(string $pageName): iterable { yield Field\AssociationField::new('event')->setRequired(true); yield Field\AssociationField::new('booth')->setRequired(true); + yield Field\AssociationField::new('room')->setRequired(true); yield Field\DateTimeField::new('startsAt')->setTimezone('UTC'); yield Field\DateTimeField::new('endsAt')->setTimezone('UTC'); yield EquipmentField::new('availableEquipment') diff --git a/src/DataFixtures/TimeSlotFixture.php b/src/DataFixtures/TimeSlotFixture.php index a77db28..250fbfe 100644 --- a/src/DataFixtures/TimeSlotFixture.php +++ b/src/DataFixtures/TimeSlotFixture.php @@ -6,6 +6,7 @@ use App\DataFixtures\Tools\Ref; use App\Entity\Booth; use App\Entity\Event; +use App\Entity\Room; use App\Entity\TimeSlot; use Doctrine\Bundle\FixturesBundle\ORMFixtureInterface; use Doctrine\Common\DataFixtures\DependentFixtureInterface; @@ -42,6 +43,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+100 days'))->setTime(1, 0), 'endsAt' => (new \DateTimeImmutable('+100 days'))->setTime(2, 0), 'booth' => new Ref(Booth::class, 'booth-Table face pôle JdR 1'), + 'room' => new Ref(Room::class, 'room-Hall principal'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -49,6 +51,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+100 days'))->setTime(2, 0), 'endsAt' => (new \DateTimeImmutable('+100 days'))->setTime(3, 0), 'booth' => new Ref(Booth::class, 'booth-Table face pôle JdR 1'), + 'room' => new Ref(Room::class, 'room-Hall principal'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -56,6 +59,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+100 days'))->setTime(3, 0), 'endsAt' => (new \DateTimeImmutable('+100 days'))->setTime(4, 0), 'booth' => new Ref(Booth::class, 'booth-Table face pôle JdR 1'), + 'room' => new Ref(Room::class, 'room-Hall principal'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -63,6 +67,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+100 days'))->setTime(4, 0), 'endsAt' => (new \DateTimeImmutable('+100 days'))->setTime(5, 0), 'booth' => new Ref(Booth::class, 'booth-Table face pôle JdR 1'), + 'room' => new Ref(Room::class, 'room-Hall principal'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -70,6 +75,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+100 days'))->setTime(6, 0), 'endsAt' => (new \DateTimeImmutable('+100 days'))->setTime(7, 30), 'booth' => new Ref(Booth::class, 'booth-Hall jeux 01'), + 'room' => new Ref(Room::class, 'room-Hall jeux'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -77,6 +83,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(3, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(7, 0), 'booth' => new Ref(Booth::class, 'booth-Public'), + 'room' => new Ref(Room::class, 'room-Scène'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -84,6 +91,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(3, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(7, 0), 'booth' => new Ref(Booth::class, 'booth-Public'), + 'room' => new Ref(Room::class, 'room-Scène'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -91,6 +99,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(7, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(8, 0), 'booth' => new Ref(Booth::class, 'booth-Table proto 1'), + 'room' => new Ref(Room::class, 'room-Salle entresol'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -98,6 +107,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(7, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(9, 0), 'booth' => new Ref(Booth::class, 'booth-Hall jeux 01'), + 'room' => new Ref(Room::class, 'room-Hall jeux'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => false, ], @@ -105,6 +115,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(10, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(11, 0), 'booth' => new Ref(Booth::class, 'booth-Hall jeux 01'), + 'room' => new Ref(Room::class, 'room-Hall jeux'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => false, ], @@ -112,6 +123,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(11, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(12, 0), 'booth' => new Ref(Booth::class, 'booth-Stand désactivé'), + 'room' => new Ref(Room::class, 'room-Hall jeux'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => false, ], diff --git a/src/Entity/Room.php b/src/Entity/Room.php index 1b8d471..f13e04b 100644 --- a/src/Entity/Room.php +++ b/src/Entity/Room.php @@ -28,10 +28,17 @@ class Room implements HasNestedRelations, HasCreators #[Assert\Valid] private Collection $booths; + /** + * @var Collection + */ + #[ORM\OneToMany(targetEntity: TimeSlot::class, mappedBy: 'Room')] + private Collection $timeSlots; + public function __construct() { $this->generateId(); $this->booths = new ArrayCollection(); + $this->timeSlots = new ArrayCollection(); } public function __toString(): string @@ -131,4 +138,34 @@ public function hasBooth(Booth $booth): bool { return $this->booths->contains($booth); } + + /** + * @return Collection + */ + public function getTimeSlots(): Collection + { + return $this->timeSlots; + } + + public function addTimeSlot(TimeSlot $timeSlot): static + { + if (!$this->timeSlots->contains($timeSlot)) { + $this->timeSlots->add($timeSlot); + $timeSlot->setRoom($this); + } + + return $this; + } + + public function removeTimeSlot(TimeSlot $timeSlot): static + { + if ($this->timeSlots->removeElement($timeSlot)) { + // set the owning side to null (unless already changed) + if ($timeSlot->getRoom() === $this) { + $timeSlot->setRoom(null); + } + } + + return $this; + } } diff --git a/src/Entity/TimeSlot.php b/src/Entity/TimeSlot.php index 72f2e4f..508e41c 100644 --- a/src/Entity/TimeSlot.php +++ b/src/Entity/TimeSlot.php @@ -41,6 +41,10 @@ class TimeSlot implements HasCreators #[ORM\OneToMany(targetEntity: ScheduledActivity::class, mappedBy: 'timeSlot')] private Collection $scheduledActivities; + #[ORM\ManyToOne(inversedBy: 'timeSlots')] + #[ORM\JoinColumn(nullable: false)] + private Room $room; + public function __construct() { $this->generateId(); @@ -48,7 +52,7 @@ public function __construct() $this->scheduledActivities = new ArrayCollection(); } - public static function create(Event $event, Booth $booth, \DateTimeImmutable $startsAt, \DateTimeImmutable $endsAt): self + public static function create(Event $event, Booth $booth, Room $room, \DateTimeImmutable $startsAt, \DateTimeImmutable $endsAt): self { $item = new self(); @@ -56,6 +60,7 @@ public static function create(Event $event, Booth $booth, \DateTimeImmutable $st $item->endsAt = $endsAt; $item->event = $event; $item->booth = $booth; + $item->room = $room; return $item; } @@ -194,4 +199,16 @@ public function getScheduledActivities(): Collection { return $this->scheduledActivities; } + + public function getRoom(): Room + { + return $this->room; + } + + public function setRoom(Room $Room): static + { + $this->room = $Room; + + return $this; + } } From febb2d287163296eb49f90db1585195c4a32b508 Mon Sep 17 00:00:00 2001 From: JulienSauguesEyraud Date: Tue, 21 Apr 2026 16:05:34 +0200 Subject: [PATCH 2/4] Verif room des forms timeSlot --- .php-cs-fixer.cache | 1 + migrations/Version20250319080855.php | 382 +++++++++--------- migrations/Version20260420144514.php | 16 - migrations/Version20260421134401.php | 25 ++ migrations/Version20260421135255.php | 28 ++ src/Admin/Field/MapImageField.php | 1 - src/Controller/Admin/DashboardController.php | 1 - src/Controller/Admin/FloorCrudController.php | 1 + src/Controller/Admin/GenericCrudMethods.php | 4 +- .../Admin/TimeSlotCrudController.php | 15 +- src/Controller/Admin/VenueCrudController.php | 5 +- src/Entity/Booth.php | 1 - src/Entity/Event.php | 12 +- src/Entity/Field/MapImage.php | 2 +- src/Entity/Room.php | 30 -- src/Entity/TimeSlot.php | 21 +- src/EventListener/MapImagePersistListener.php | 2 +- src/Validator/NoOverlappingTimeSlot.php | 1 + .../NoOverlappingTimeSlotValidator.php | 10 + .../Admin/BoothCrudControllerTest.php | 1 - tests/Twig/ActivityExtensionTest.php | 2 +- translations/validators.en.yaml | 1 + translations/validators.fr.yaml | 1 + 23 files changed, 294 insertions(+), 269 deletions(-) create mode 100644 .php-cs-fixer.cache create mode 100644 migrations/Version20260421134401.php create mode 100644 migrations/Version20260421135255.php diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache new file mode 100644 index 0000000..2316fd9 --- /dev/null +++ b/.php-cs-fixer.cache @@ -0,0 +1 @@ +{"php":"8.3.30","version":"3.95.1","indent":" ","lineEnding":"\n","rules":{"align_multiline_comment":true,"backtick_to_shell_exec":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["return"]},"braces_position":{"allow_single_line_anonymous_functions":true,"allow_single_line_empty_anonymous_classes":true},"class_attributes_separation":{"elements":{"method":"one"}},"class_definition":{"single_line":true},"class_reference_name_casing":true,"clean_namespace":true,"concat_space":true,"declare_parentheses":true,"echo_tag_syntax":true,"empty_loop_body":{"style":"braces"},"empty_loop_condition":true,"fully_qualified_strict_types":true,"function_declaration":{"closure_fn_spacing":"one"},"general_phpdoc_tag_rename":{"replacements":{"inheritDocs":"inheritDoc"}},"global_namespace_import":{"import_classes":false,"import_constants":false,"import_functions":false},"include":true,"increment_style":true,"integer_literal_case":true,"lambda_not_used_import":true,"linebreak_after_opening_tag":true,"magic_constant_casing":true,"magic_method_casing":true,"method_argument_space":{"after_heredoc":true,"on_multiline":"ignore"},"native_function_casing":true,"native_type_declaration_casing":true,"no_alias_language_construct_call":true,"no_alternative_syntax":true,"no_binary_string":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":{"tokens":["attribute","case","continue","curly_brace_block","default","extra","parenthesis_brace_block","square_brace_block","switch","throw","use"]},"no_leading_namespace_whitespace":true,"no_mixed_echo_print":true,"no_multiline_whitespace_around_double_arrow":true,"no_null_property_initialization":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_superfluous_phpdoc_tags":{"allow_hidden_params":true,"remove_inheritdoc":true},"no_trailing_comma_in_singleline":true,"no_unneeded_braces":{"namespaces":true},"no_unneeded_control_parentheses":{"statements":["break","clone","continue","echo_print","negative_instanceof","others","return","switch_case","yield","yield_from"]},"no_unneeded_import_alias":true,"no_unset_cast":true,"no_unused_imports":true,"no_useless_concat_operator":true,"no_useless_else":true,"no_useless_nullsafe_operator":true,"no_useless_return":true,"no_whitespace_before_comma_in_array":{"after_heredoc":true},"normalize_index_brace":true,"nullable_type_declaration_for_default_null_value":true,"object_operator_without_whitespace":true,"operator_linebreak":{"only_booleans":true},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"alpha"},"php_unit_fqcn_annotation":true,"php_unit_method_casing":true,"phpdoc_align":true,"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag_normalizer":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":{"replacements":{"const":"var","link":"see","property-read":"property","property-write":"property","type":"var"}},"phpdoc_no_package":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_order":{"order":["param","return","throws"]},"phpdoc_return_self_reference":true,"phpdoc_scalar":{"types":["boolean","callback","double","integer","never-return","never-returns","no-return","real","str"]},"phpdoc_separation":{"groups":[["Annotation","NamedArgumentConstructor","Target"],["author","copyright","license"],["category","package","subpackage"],["property","property-read","property-write"],["deprecated","link","see","since"]],"skip_unlisted_annotations":false},"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_tag_type":{"tags":{"inheritDoc":"inline"}},"phpdoc_to_comment":{"allow_before_return_statement":false},"phpdoc_trim":true,"phpdoc_trim_consecutive_blank_line_separation":true,"phpdoc_types":true,"phpdoc_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"phpdoc_var_annotation_correct_order":true,"phpdoc_var_without_name":true,"protected_to_private":true,"semicolon_after_instruction":true,"simple_to_complex_string_variable":true,"single_import_per_statement":true,"single_line_comment_spacing":true,"single_line_comment_style":{"comment_types":["hash"]},"single_line_throw":true,"single_quote":true,"single_space_around_construct":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"statement_indentation":{"stick_comment_to_next_continuous_control_statement":true},"switch_continue_to_break":true,"trailing_comma_in_multiline":{"after_heredoc":true,"elements":["array_destructuring","arrays","match","parameters"]},"trim_array_spaces":true,"type_declaration_spaces":{"elements":["function","property"]},"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"nullable_type_declaration":true,"ordered_types":{"null_adjustment":"always_last","sort_algorithm":"none"},"single_class_element_per_statement":true,"types_spaces":true,"array_indentation":true,"array_syntax":true,"attribute_block_no_spaces":true,"cast_spaces":true,"new_with_parentheses":{"anonymous_class":false},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"modifier_keywords":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"return_type_declaration":true,"short_scalar_cast":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_line_after_imports":true,"spaces_inside_parentheses":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"final_class":true,"final_internal_class":true},"ruleCustomisationPolicyVersion":"null-policy","hashes":{"config\/preload.php":"43f0d906da7ba45a9a6ce95a6bfc28b4","migrations\/Version20260420144514.php":"6f3e8fe0545d71fca7061f12d944a2f9","migrations\/Version20260421112931.php":"f6e0ee2b85e6dd8a9c98fe3f64ce79e2","src\/Validator\/NoOverlappingTimeSlotValidator.php":"8263fe5a66de746581c482b18a4c9d98","src\/Validator\/NoOverlappingTimeSlot.php":"b24bf1e5ae6270af877269c55028873b","src\/Validator\/NoOverlappingSchedules.php":"8d0aeafc26f77ee86c83f4dd01887b6d","src\/Locales.php":"afc46b113bc4690defcad9beb7559ec7","src\/Kernel.php":"d0740a74a2e533ba3605644e975e5f99","src\/Twig\/Extension\/TypesExtension.php":"62d9dc635bc22ca13225ba44e0c70282","src\/Twig\/Extension\/ActivityExtension.php":"abb054b0a5d66e01ae669d77c4fe26ab","src\/EventListener\/MapImagePersistListener.php":"090a9bdc287462d8b63d04d395dc5647","src\/EventListener\/LocaleListener.php":"3639209cf784cae566804c5369d289dd","src\/Mailer\/PasswordResetMailer.php":"9947a71b50f2fb9f5c0f58efa786c1cd","src\/DataFixtures\/BoothFixture.php":"dfd5c8ff50acf546151ce89c84f62b7d","src\/Admin\/Field\/AssociationField.php":"a04589c5f881d0327aec09807630f5a6","src\/Admin\/Field\/EquipmentField.php":"9f8d877014ea20d384ce91613a83583f","src\/Admin\/Field\/AssociationCollectionField.php":"06d9f78b4de9057517394687dca5d3c8","src\/Admin\/Field\/MapImageField.php":"23863a0e3ddd30081d5d481a0938a76e","tests\/TestUtils\/CreateUser.php":"8fef4ac4eb088af6a7272378f9bf8ef0","tests\/TestUtils\/Assertions\/SessionHasFlashMessage.php":"257a06b8f5f6f8e4343139697fe76a89","tests\/TestUtils\/Assertions\/FlashMessageAssertions.php":"ee410e8269d28e0d22fbd9feb50f55b0","tests\/TestUtils\/GetUser.php":"c75254a59e5a41c2f557922208ed593b","tests\/TestUtils\/ProvidesLocales.php":"4254a325e294e9a9890816b0891db420","src\/Mailer\/RegistrationEmailVerifier.php":"dcbf8020e37ea0f0658b48b5e7e29445","src\/Repository\/UserRepository.php":"42aadbab49c439dbc9368347dd8240bf","src\/Repository\/TimeSlotRepository.php":"19ac3676e11a3731a07a02014da854f2","src\/Repository\/AttendeeRepository.php":"267fb9aeb9a3acb135541c971d8e4319","src\/Repository\/BoothRepository.php":"70721d5f1d5c73d0d989d9e216eea299","src\/Repository\/RoomRepository.php":"38e8adeb689861f87befb636364aede9","src\/Repository\/EventRepository.php":"78303f5ad0ec2ca53d2a367340fe9156","src\/Repository\/ActivityRepository.php":"b3bc29c754663ccb6816166ce52087d7","src\/Repository\/ResetPasswordRequestRepository.php":"429534dec9abc4f68682413cd1da3064","src\/Repository\/ScheduledActivityRepository.php":"689f6e8166da7e0fd4c69d4089185966","src\/Entity\/HasNestedRelations.php":"1a39e824e07e36657e83f786d7b557b5","src\/Entity\/Attendee.php":"2d04bd534c416d831e7ef8851db29445","src\/Security\/Voter\/TimeSlotVoter.php":"17b97fbd7b11979a832690c6c6f3a0f8","src\/Security\/Voter\/ActivityVoter.php":"9993ed80ff44c61aa25bd1b10cd25920","src\/Security\/Voter\/EventVoter.php":"00c2b7b6eceab26305c5749a7d29dfc8","src\/Security\/Voter\/ScheduledActivityVoter.php":"bd8852422890fe84f4a18ce4112ea58e","src\/Security\/Voter\/VenueVoter.php":"53c46ce3d7041f48b3d2f11933c194f3","src\/Security\/AppFormAuthenticator.php":"ce7d7fe59ba97c223acacaf8fe8df896","src\/Security\/UserChecker.php":"9e70ec05bb87f20d9a853ee613f1ab11","src\/DataFixtures\/AttendeeFixture.php":"9127335b39dbbe320fad7778ef53b996","src\/Entity\/Field\/Published.php":"26745bd481c9d5ad71948d4f40410643","src\/Entity\/Field\/Id.php":"4083dee5aea1ce2e4ea7ac99326322b0","src\/Entity\/Field\/MapImage.php":"111aa6bbf95624aa9ef57603a0297b64","src\/Entity\/Field\/Description.php":"42802ab0a39b10b8e0a786e42ffb0cf0","src\/Entity\/Field\/StartEndDates.php":"494097044252e1ed986db3b26f84883f","src\/Entity\/Field\/Creators.php":"3c2ac5101338640410c8db5ff1374130","src\/Entity\/Field\/Name.php":"2c21f7d7d304a186e7d3fc81975d1522","src\/Entity\/Field\/Timestampable.php":"86681ec1753e01b3c4814ee5fd294398","src\/Entity\/Activity.php":"967ad453227f6237d555d263afba35f4","src\/Entity\/ScheduledActivity.php":"2243060430b1c0cfc122ca7073c2567e","src\/Form\/Type\/AssociativeArrayItemType.php":"beba4dc1d8623f4c6c17edfffd8b9226","src\/Form\/Type\/RegisterAsActivityAttendeeType.php":"89ada8c026995986bf53bf2e4e754e64","src\/Form\/Type\/SubmitActivityToSlotType.php":"f1d92af288949eef625ac188ff85f138","src\/Form\/Type\/RegistrationFormType.php":"d02e8b1557c2995518ab7e6c1271310a","src\/Form\/Type\/ResetPasswordRequestFormType.php":"59c7e721a4c03c94ed456dd80dc55f1c","src\/Form\/Type\/AssociativeArrayType.php":"74e5920574557e06a260a41cd43e1706","src\/Form\/Type\/ChangePasswordFormType.php":"9641985ef94a5ee31d53fe0e130cc1f8","src\/Form\/Type\/RoleType.php":"513e1d62f4e01ee1dff90558e5a8420c","src\/Form\/Type\/ActivityType.php":"96372aa5d99b5bfd977a451b6ae8e40d","src\/Validator\/NoOverlappingSchedulesValidator.php":"3dbf0c61aa45549f1bed1b0fc2214987","src\/DataFixtures\/RoomFixture.php":"d38360aed6328b7250709a64b2448a68","src\/DataFixtures\/EventFixture.php":"0d87cd14053ad0ec422827c8b8bbe3e8","src\/DataFixtures\/VenueFixture.php":"9c31784255b095d7058b3637c059359e","src\/DataFixtures\/FloorFixture.php":"f2eca9bfdaebb5248cef5abc73843167","src\/DataFixtures\/TimeSlotFixture.php":"4e29e4dfd730bb066ded7b0ec0f8aa8b","src\/DataFixtures\/Tools\/GetObjectsFromData.php":"9fc61d6df1e082c54370500324966335","src\/DataFixtures\/Tools\/Ref.php":"8db064d31c21d4865f1f180c3cca6ed9","src\/DataFixtures\/ScheduledActivityFixture.php":"46f5ed3fdc549d14086dd0ad3e8d9675","src\/DataFixtures\/UserFixture.php":"ec1c8b54f806e07169d5ac4c253fb5dc","src\/DataFixtures\/ActivityFixture.php":"d07f4d45901a80d0d06232acccaacc44","tests\/Controller\/Admin\/VenueCrudControllerTest.php":"fbf520d126f1c62180c94f1addfc7139","tests\/Controller\/Admin\/EventCrudControllerTest.php":"122f7cbc69796ea15d135c7e66e70cc5","tests\/Controller\/Admin\/FloorCrudControllerTest.php":"4f0c51b205fe0b159db40e08ecb62dbe","tests\/Controller\/Admin\/DashboardControllerTest.php":"d8ae7376c1f6020a038356e4d0dc0387","tests\/Controller\/Admin\/BoothCrudControllerTest.php":"f30cace27b4befa7bc0533e91cbc681f","tests\/Entity\/EventTest.php":"dea9d385fee970d5b3682b2b1951142b","tests\/Security\/UserCheckerTest.php":"d5deac2cc2d9d12d17e029810136bd48","config\/reference.php":"c6c937abe63453ff9323b47846b6fa3f","config\/bundles.php":"6d21a0a5a93d390f1150109da890c6af","config\/routes.php":"8eea48238ff725926705aae3e9c97a7d","src\/Repository\/VenueRepository.php":"073da69179ba2f7a1d81d221ce521916","src\/Repository\/FloorRepository.php":"b9d0f82537f9486c9dc67021c04d9b03","src\/Enum\/ScheduleActivityState.php":"c67703e743d0f2f9b0d1a57862817ba2","src\/Controller\/Public\/ResetPasswordController.php":"97a6837682fda295a786fa5d4ef6d9d5","src\/Controller\/Public\/IndexController.php":"2189fdee36a0972968fd190287345cc7","src\/Controller\/Public\/EventController.php":"b3745197b56820fd99d159b02b947f94","src\/Controller\/Public\/RegistrationController.php":"d83241950b603db943be6dbeea868c8f","src\/Controller\/Public\/SubmitActivityToSlotController.php":"d5a0a901059092984a57786b812ac142","src\/Controller\/Public\/ActivityAttendeeRegisterController.php":"180f2bfdef5f71305ade6364d3890eac","src\/Controller\/Public\/AuthController.php":"f516aaef0853f8c6f6f3edcf012402b8","tests\/Controller\/Public\/SubmitActivityToSlotControllerTest.php":"2c957803cf0cf65871ee08a8dda76f08","tests\/Controller\/Public\/IndexControllerTest.php":"3068dc7ee1b90cc4c0b33f3a84695826","tests\/Controller\/Public\/AuthControllerTest.php":"983df6126bcb7c9e31dd37b659ee24d4","tests\/Controller\/Admin\/ActivityCrudControllerTest.php":"b33a593dda3b433ca840e5b0f1cc4dc6","tests\/Controller\/Admin\/ScheduledActivityCrudControllerTest.php":"0a5c1a0040370f61d5c08f350fcbd506","tests\/Controller\/Admin\/RoomCrudControllerTest.php":"3bc2ae69ff8bb3c73f7ffe877170ce63","tests\/Controller\/Admin\/CalendarControllerTest.php":"6f62d14d09973ffd41583fe42a12d241","tests\/Controller\/Admin\/Utils\/TestAdminNew.php":"6eef7e220e8d18d5979f9b0729d25afd","tests\/Controller\/Admin\/Utils\/TestAdminEdit.php":"d6a2031f6be4e08e60dedf2e321b6fd1","tests\/Controller\/Admin\/Utils\/TestAdminIndex.php":"98983e8e5bb5907983df5ff60372bd9d","tests\/SmokeTest.php":"887058351021ae408ebe1bb75a1e6c62","tests\/Twig\/ActivityExtensionTest.php":"f9cf3ce57c13793fb0f054e7f521a6a8","tests\/Twig\/TypesExtensionTest.php":"99a57f214f855d60624a094bfdf5864c","tests\/Mailer\/RegistrationEmailVerifierTest.php":"b388a5441f79464012d2f06e9b7d2505","tests\/bootstrap.php":"d96f1da1e2fa0b32a808fed4b9abc96f","tests\/Enum\/ScheduleActivityStateTest.php":"b97076f251d842bf977becb8f57b5704","tests\/Controller\/Public\/EventControllerTest.php":"82f046f73a4a51a449b5f21fdb9f28a5","tests\/Controller\/Public\/RegistrationControllerTest.php":"eca5fc71328856466c3d695e74850b10","tests\/Controller\/Public\/ResetPasswordControllerTest.php":"301209d5c1f4ffedf0aec8c3144aa762","tests\/Controller\/Public\/ActivityAttendeeRegisterControllerTest.php":"dfe9fca0e323944741f7f4d6f32b94b9","src\/Controller\/Admin\/DashboardController.php":"90dcd0d615e388b48ab485e7c6a0d3eb","src\/Controller\/Admin\/NestedControllers\/NestedFloorCrudController.php":"f01badadefee42fcf36f8062c959fa3c","src\/Controller\/Admin\/NestedControllers\/NestedRoomCrudController.php":"4a3ee95fab80737dabb645eb3fa9722d","src\/Controller\/Admin\/NestedControllers\/NestedBoothCrudController.php":"824ea08a47b376b54641cd55083c953e","src\/Controller\/Admin\/VenueCrudController.php":"d940d7538b432b0b67833dc0347b434d","src\/Controller\/Admin\/FloorCrudController.php":"4d19ae0549b35b47d11bce6c44277580","src\/Controller\/Admin\/Traits\/DisableAllActions.php":"8c72b3bc34aac4d1dfb310c612210feb","src\/Entity\/Booth.php":"340e8242ee2680107612c62bdc2619fe","src\/Entity\/TimeSlot.php":"56787a452434833e2f99054cb29f1001","src\/Entity\/Venue.php":"9029df8bbed1f6ba68050fca1ca23fc0","src\/Entity\/Behaviors\/CloneVar.php":"caac4568bcc2301b9aaeff055df7b4ec","src\/Entity\/ResetPasswordRequest.php":"1dbc9f67d85b08a9a07475675cf69f43","src\/Entity\/User.php":"c56e999c916d5011500721dc3d9d9afd","src\/Entity\/Room.php":"14c1dcaae60f29d3c27b3b1ae1f7cd69","src\/Entity\/HasCreators.php":"9dad48627fed10216fe8182f7c72f6ac","src\/Entity\/HasMapImage.php":"6a6d08578cae43d183f5366887f6f489","src\/Entity\/Floor.php":"1dc28428d1a8cf2e3a5e750cf9947ab3","src\/Entity\/Event.php":"b5709d11f4c966171a60079f8d321d60","src\/Entity\/Field\/GenericContact.php":"6c7a6a00ff1557ba922651fcc9e89c57","src\/Entity\/Field\/Address.php":"fa7e1eab22a6189c418f6650e09237fb","src\/Controller\/Admin\/AttendeeCrudController.php":"8e42a3d6a93bf69b0969c23a89aa2d96","src\/Controller\/Admin\/BoothCrudController.php":"6305bf09962eb60a139a23834e6dde6d","src\/Controller\/Admin\/GenericCrudMethods.php":"6c8ff0563d269d56ff02a58a05377d1e","src\/Controller\/Admin\/ScheduledActivityCrudController.php":"38d6dcd7aed0a67cfd87f9817cb9c75b","src\/Controller\/Admin\/UsersCrudController.php":"4876c5f501664c045eee5beb081bc97b","src\/Controller\/Admin\/TimeSlotCrudController.php":"ce81164b1e904d61670eff6f3a2acce3","src\/Controller\/Admin\/EventCrudController.php":"50d7fda8ef3abcd304d46a1e11be4a4d","src\/Controller\/Admin\/RoomCrudController.php":"9217c724b54f4843562fdaa1d2d991fb","src\/Controller\/Admin\/ActivityCrudController.php":"b3cafb6d76f31cd52ec3f1dfa2d0cbc7","src\/Controller\/Admin\/CalendarController.php":"01a1f2474738cca63ee349aad409b5e9","migrations\/Version20260421134401.php":"f210e1add7eb8309723785327ec0f4a0","migrations\/Version20250319080855.php":"a6bfbf8524c1100635ffcc3d222e83a3","migrations\/Version20260421135255.php":"f71c9b869316febcd79289a99fcbff6d"}} \ No newline at end of file diff --git a/migrations/Version20250319080855.php b/migrations/Version20250319080855.php index d8fb630..fe29694 100644 --- a/migrations/Version20250319080855.php +++ b/migrations/Version20250319080855.php @@ -11,225 +11,225 @@ final class Version20250319080855 extends AbstractMigration { public function up(Schema $schema): void { - $this->addSql(' - CREATE TABLE activities ( - name VARCHAR(255) NOT NULL, - max_number_of_participants INT DEFAULT NULL, - needed_equipment JSON DEFAULT \'[]\' NOT NULL, - id VARCHAR(36) NOT NULL, - description LONGTEXT NOT NULL, - created_at DATETIME NOT NULL, - updated_at DATETIME NOT NULL, - PRIMARY KEY(id) - ) DEFAULT CHARACTER SET utf8mb4 + $this->addSql(' + CREATE TABLE activities ( + name VARCHAR(255) NOT NULL, + max_number_of_participants INT DEFAULT NULL, + needed_equipment JSON DEFAULT \'[]\' NOT NULL, + id VARCHAR(36) NOT NULL, + description LONGTEXT NOT NULL, + created_at DATETIME NOT NULL, + updated_at DATETIME NOT NULL, + PRIMARY KEY(id) + ) DEFAULT CHARACTER SET utf8mb4 '); - $this->addSql(' - CREATE TABLE activity_user ( - activity_id VARCHAR(36) NOT NULL, - user_id VARCHAR(36) NOT NULL, - INDEX IDX_8E570DDB81C06096 (activity_id), - INDEX IDX_8E570DDBA76ED395 (user_id), - PRIMARY KEY(activity_id, - user_id) - ) DEFAULT CHARACTER SET utf8mb4 + $this->addSql(' + CREATE TABLE activity_user ( + activity_id VARCHAR(36) NOT NULL, + user_id VARCHAR(36) NOT NULL, + INDEX IDX_8E570DDB81C06096 (activity_id), + INDEX IDX_8E570DDBA76ED395 (user_id), + PRIMARY KEY(activity_id, + user_id) + ) DEFAULT CHARACTER SET utf8mb4 '); - $this->addSql(' - CREATE TABLE attendee ( - name VARCHAR(255) NOT NULL, - number_of_attendees INT NOT NULL, - id VARCHAR(36) NOT NULL, - scheduled_activity_id VARCHAR(36) NOT NULL, - registered_by_id VARCHAR(36) NOT NULL, - INDEX IDX_1150D56733E31936 (scheduled_activity_id), - INDEX IDX_1150D56727E92E18 (registered_by_id), - PRIMARY KEY(id) - ) DEFAULT CHARACTER SET utf8mb4 + $this->addSql(' + CREATE TABLE attendee ( + name VARCHAR(255) NOT NULL, + number_of_attendees INT NOT NULL, + id VARCHAR(36) NOT NULL, + scheduled_activity_id VARCHAR(36) NOT NULL, + registered_by_id VARCHAR(36) NOT NULL, + INDEX IDX_1150D56733E31936 (scheduled_activity_id), + INDEX IDX_1150D56727E92E18 (registered_by_id), + PRIMARY KEY(id) + ) DEFAULT CHARACTER SET utf8mb4 '); - $this->addSql(' - CREATE TABLE `booth` ( - max_number_of_participants INT DEFAULT NULL, - available_equipment JSON DEFAULT \'[]\' NOT NULL, - id VARCHAR(36) NOT NULL, - name VARCHAR(255) NOT NULL, - allow_attendee_registration TINYINT(1) DEFAULT 1 NOT NULL, - room_id VARCHAR(36) NOT NULL, - INDEX IDX_D24EDE054177093 (room_id), - PRIMARY KEY(id) - ) DEFAULT CHARACTER SET utf8mb4 + $this->addSql(' + CREATE TABLE `booth` ( + max_number_of_participants INT DEFAULT NULL, + available_equipment JSON DEFAULT \'[]\' NOT NULL, + id VARCHAR(36) NOT NULL, + name VARCHAR(255) NOT NULL, + allow_attendee_registration TINYINT(1) DEFAULT 1 NOT NULL, + room_id VARCHAR(36) NOT NULL, + INDEX IDX_D24EDE054177093 (room_id), + PRIMARY KEY(id) + ) DEFAULT CHARACTER SET utf8mb4 '); - $this->addSql(' - CREATE TABLE event ( - name VARCHAR(255) NOT NULL, - slug VARCHAR(255) NOT NULL, - is_online_event TINYINT(1) NOT NULL, - allow_activity_registration TINYINT(1) DEFAULT 1 NOT NULL, - allow_attendee_registration TINYINT(1) DEFAULT 1 NOT NULL, - locale VARCHAR(255) DEFAULT NULL, - url VARCHAR(255) DEFAULT NULL, - id VARCHAR(36) NOT NULL, - description LONGTEXT NOT NULL, - contact_name VARCHAR(255) DEFAULT NULL, - contact_email VARCHAR(255) DEFAULT NULL, - contact_phone VARCHAR(255) DEFAULT NULL, - starts_at DATETIME NOT NULL, - ends_at DATETIME NOT NULL, - is_published TINYINT(1) DEFAULT 0 NOT NULL, - created_at DATETIME NOT NULL, - updated_at DATETIME NOT NULL, - venue_id VARCHAR(36) NOT NULL, - INDEX IDX_3BAE0AA740A73EBA (venue_id), - PRIMARY KEY(id) - ) DEFAULT CHARACTER SET utf8mb4 + $this->addSql(' + CREATE TABLE event ( + name VARCHAR(255) NOT NULL, + slug VARCHAR(255) NOT NULL, + is_online_event TINYINT(1) NOT NULL, + allow_activity_registration TINYINT(1) DEFAULT 1 NOT NULL, + allow_attendee_registration TINYINT(1) DEFAULT 1 NOT NULL, + locale VARCHAR(255) DEFAULT NULL, + url VARCHAR(255) DEFAULT NULL, + id VARCHAR(36) NOT NULL, + description LONGTEXT NOT NULL, + contact_name VARCHAR(255) DEFAULT NULL, + contact_email VARCHAR(255) DEFAULT NULL, + contact_phone VARCHAR(255) DEFAULT NULL, + starts_at DATETIME NOT NULL, + ends_at DATETIME NOT NULL, + is_published TINYINT(1) DEFAULT 0 NOT NULL, + created_at DATETIME NOT NULL, + updated_at DATETIME NOT NULL, + venue_id VARCHAR(36) NOT NULL, + INDEX IDX_3BAE0AA740A73EBA (venue_id), + PRIMARY KEY(id) + ) DEFAULT CHARACTER SET utf8mb4 '); - $this->addSql(' - CREATE TABLE event_user ( - event_id VARCHAR(36) NOT NULL, - user_id VARCHAR(36) NOT NULL, - INDEX IDX_92589AE271F7E88B (event_id), - INDEX IDX_92589AE2A76ED395 (user_id), - PRIMARY KEY(event_id, user_id) - ) DEFAULT CHARACTER SET utf8mb4 + $this->addSql(' + CREATE TABLE event_user ( + event_id VARCHAR(36) NOT NULL, + user_id VARCHAR(36) NOT NULL, + INDEX IDX_92589AE271F7E88B (event_id), + INDEX IDX_92589AE2A76ED395 (user_id), + PRIMARY KEY(event_id, user_id) + ) DEFAULT CHARACTER SET utf8mb4 '); - $this->addSql(' - CREATE TABLE floor ( - name VARCHAR(255) NOT NULL, - id VARCHAR(36) NOT NULL, - venue_id VARCHAR(36) NOT NULL, - INDEX IDX_BE45D62E40A73EBA (venue_id), - PRIMARY KEY(id) - ) DEFAULT CHARACTER SET utf8mb4 + $this->addSql(' + CREATE TABLE floor ( + name VARCHAR(255) NOT NULL, + id VARCHAR(36) NOT NULL, + venue_id VARCHAR(36) NOT NULL, + INDEX IDX_BE45D62E40A73EBA (venue_id), + PRIMARY KEY(id) + ) DEFAULT CHARACTER SET utf8mb4 '); - $this->addSql(' - CREATE TABLE reset_password_request ( - selector VARCHAR(20) NOT NULL, - hashed_token VARCHAR(100) NOT NULL, - requested_at DATETIME NOT NULL, - expires_at DATETIME NOT NULL, - id VARCHAR(36) NOT NULL, - user_id VARCHAR(36) NOT NULL, - INDEX IDX_7CE748AA76ED395 (user_id), - PRIMARY KEY(id) - ) DEFAULT CHARACTER SET utf8mb4 + $this->addSql(' + CREATE TABLE reset_password_request ( + selector VARCHAR(20) NOT NULL, + hashed_token VARCHAR(100) NOT NULL, + requested_at DATETIME NOT NULL, + expires_at DATETIME NOT NULL, + id VARCHAR(36) NOT NULL, + user_id VARCHAR(36) NOT NULL, + INDEX IDX_7CE748AA76ED395 (user_id), + PRIMARY KEY(id) + ) DEFAULT CHARACTER SET utf8mb4 '); - $this->addSql(' - CREATE TABLE room ( - name VARCHAR(255) NOT NULL, - id VARCHAR(36) NOT NULL, - floor_id VARCHAR(36) NOT NULL, - INDEX IDX_729F519B854679E2 (floor_id), - PRIMARY KEY(id) - ) DEFAULT CHARACTER SET utf8mb4 + $this->addSql(' + CREATE TABLE room ( + name VARCHAR(255) NOT NULL, + id VARCHAR(36) NOT NULL, + floor_id VARCHAR(36) NOT NULL, + INDEX IDX_729F519B854679E2 (floor_id), + PRIMARY KEY(id) + ) DEFAULT CHARACTER SET utf8mb4 '); - $this->addSql(' - CREATE TABLE scheduled_activities ( - state VARCHAR(255) NOT NULL, - id VARCHAR(36) NOT NULL, - created_at DATETIME NOT NULL, - updated_at DATETIME NOT NULL, - activity_id VARCHAR(36) NOT NULL, - time_slot_id VARCHAR(36) NOT NULL, - submitted_by VARCHAR(36) DEFAULT NULL, - INDEX IDX_2B83275C81C06096 (activity_id), - INDEX IDX_2B83275CD62B0FA (time_slot_id), - INDEX IDX_2B83275C641EE842 (submitted_by), - PRIMARY KEY(id) - ) DEFAULT CHARACTER SET utf8mb4 + $this->addSql(' + CREATE TABLE scheduled_activities ( + state VARCHAR(255) NOT NULL, + id VARCHAR(36) NOT NULL, + created_at DATETIME NOT NULL, + updated_at DATETIME NOT NULL, + activity_id VARCHAR(36) NOT NULL, + time_slot_id VARCHAR(36) NOT NULL, + submitted_by VARCHAR(36) DEFAULT NULL, + INDEX IDX_2B83275C81C06096 (activity_id), + INDEX IDX_2B83275CD62B0FA (time_slot_id), + INDEX IDX_2B83275C641EE842 (submitted_by), + PRIMARY KEY(id) + ) DEFAULT CHARACTER SET utf8mb4 '); - $this->addSql(' - CREATE TABLE time_slot ( - is_open TINYINT(1) DEFAULT 1 NOT NULL, - available_equipment JSON DEFAULT \'[]\' NOT NULL, - id VARCHAR(36) NOT NULL, - starts_at DATETIME NOT NULL, - ends_at DATETIME NOT NULL, - created_at DATETIME NOT NULL, - updated_at DATETIME NOT NULL, - event_id VARCHAR(36) NOT NULL, - booth_id VARCHAR(36) NOT NULL, - INDEX IDX_1B3294A71F7E88B (event_id), - INDEX IDX_1B3294A18707CED (booth_id), - PRIMARY KEY(id) - ) DEFAULT CHARACTER SET utf8mb4 + $this->addSql(' + CREATE TABLE time_slot ( + is_open TINYINT(1) DEFAULT 1 NOT NULL, + available_equipment JSON DEFAULT \'[]\' NOT NULL, + id VARCHAR(36) NOT NULL, + starts_at DATETIME NOT NULL, + ends_at DATETIME NOT NULL, + created_at DATETIME NOT NULL, + updated_at DATETIME NOT NULL, + event_id VARCHAR(36) NOT NULL, + booth_id VARCHAR(36) NOT NULL, + INDEX IDX_1B3294A71F7E88B (event_id), + INDEX IDX_1B3294A18707CED (booth_id), + PRIMARY KEY(id) + ) DEFAULT CHARACTER SET utf8mb4 '); - $this->addSql(' - CREATE TABLE `user` ( - username VARCHAR(180) NOT NULL, - email VARCHAR(255) NOT NULL, - roles JSON NOT NULL, - password VARCHAR(255) NOT NULL, - password_confirmation_token VARCHAR(255) DEFAULT NULL, - email_confirmed_at DATETIME DEFAULT NULL, - timezone VARCHAR(255) DEFAULT \'Europe/Paris\' NOT NULL, - locale VARCHAR(255) DEFAULT \'fr\' NOT NULL, - id VARCHAR(36) NOT NULL, - created_at DATETIME NOT NULL, - updated_at DATETIME NOT NULL, - UNIQUE INDEX UNIQ_IDENTIFIER_USERNAME (username), - UNIQUE INDEX UNIQ_IDENTIFIER_EMAIL (email), - PRIMARY KEY(id) - ) DEFAULT CHARACTER SET utf8mb4 + $this->addSql(' + CREATE TABLE `user` ( + username VARCHAR(180) NOT NULL, + email VARCHAR(255) NOT NULL, + roles JSON NOT NULL, + password VARCHAR(255) NOT NULL, + password_confirmation_token VARCHAR(255) DEFAULT NULL, + email_confirmed_at DATETIME DEFAULT NULL, + timezone VARCHAR(255) DEFAULT \'Europe/Paris\' NOT NULL, + locale VARCHAR(255) DEFAULT \'fr\' NOT NULL, + id VARCHAR(36) NOT NULL, + created_at DATETIME NOT NULL, + updated_at DATETIME NOT NULL, + UNIQUE INDEX UNIQ_IDENTIFIER_USERNAME (username), + UNIQUE INDEX UNIQ_IDENTIFIER_EMAIL (email), + PRIMARY KEY(id) + ) DEFAULT CHARACTER SET utf8mb4 '); - $this->addSql(' - CREATE TABLE venue ( - name VARCHAR(255) NOT NULL, - id VARCHAR(36) NOT NULL, - address1 VARCHAR(255) DEFAULT NULL, - address2 VARCHAR(255) DEFAULT NULL, - state VARCHAR(255) DEFAULT NULL, - zip_code VARCHAR(255) DEFAULT NULL, - city VARCHAR(255) DEFAULT NULL, - country VARCHAR(255) DEFAULT NULL, - latitude VARCHAR(255) DEFAULT NULL, - longitude VARCHAR(255) DEFAULT NULL, - contact_name VARCHAR(255) DEFAULT NULL, - contact_email VARCHAR(255) DEFAULT NULL, - contact_phone VARCHAR(255) DEFAULT NULL, - created_at DATETIME NOT NULL, - updated_at DATETIME NOT NULL, - map_image_data VARCHAR(255) DEFAULT NULL, - map_width INT DEFAULT NULL, - map_height INT DEFAULT NULL, - map_mime_type VARCHAR(255) DEFAULT NULL, - PRIMARY KEY(id) - ) DEFAULT CHARACTER SET utf8mb4 + $this->addSql(' + CREATE TABLE venue ( + name VARCHAR(255) NOT NULL, + id VARCHAR(36) NOT NULL, + address1 VARCHAR(255) DEFAULT NULL, + address2 VARCHAR(255) DEFAULT NULL, + state VARCHAR(255) DEFAULT NULL, + zip_code VARCHAR(255) DEFAULT NULL, + city VARCHAR(255) DEFAULT NULL, + country VARCHAR(255) DEFAULT NULL, + latitude VARCHAR(255) DEFAULT NULL, + longitude VARCHAR(255) DEFAULT NULL, + contact_name VARCHAR(255) DEFAULT NULL, + contact_email VARCHAR(255) DEFAULT NULL, + contact_phone VARCHAR(255) DEFAULT NULL, + created_at DATETIME NOT NULL, + updated_at DATETIME NOT NULL, + map_image_data VARCHAR(255) DEFAULT NULL, + map_width INT DEFAULT NULL, + map_height INT DEFAULT NULL, + map_mime_type VARCHAR(255) DEFAULT NULL, + PRIMARY KEY(id) + ) DEFAULT CHARACTER SET utf8mb4 '); - $this->addSql(' - CREATE TABLE venue_user ( - venue_id VARCHAR(36) NOT NULL, - user_id VARCHAR(36) NOT NULL, - INDEX IDX_3BB5DBE140A73EBA (venue_id), - INDEX IDX_3BB5DBE1A76ED395 (user_id), - PRIMARY KEY(venue_id, user_id) - ) DEFAULT CHARACTER SET utf8mb4 + $this->addSql(' + CREATE TABLE venue_user ( + venue_id VARCHAR(36) NOT NULL, + user_id VARCHAR(36) NOT NULL, + INDEX IDX_3BB5DBE140A73EBA (venue_id), + INDEX IDX_3BB5DBE1A76ED395 (user_id), + PRIMARY KEY(venue_id, user_id) + ) DEFAULT CHARACTER SET utf8mb4 '); - $this->addSql(' - CREATE TABLE messenger_messages ( - id BIGINT AUTO_INCREMENT NOT NULL, - body LONGTEXT NOT NULL, - headers LONGTEXT NOT NULL, - queue_name VARCHAR(190) NOT NULL, - created_at DATETIME NOT NULL, - available_at DATETIME NOT NULL, - delivered_at DATETIME DEFAULT NULL, - INDEX IDX_75EA56E0FB7336F0 (queue_name), - INDEX IDX_75EA56E0E3BD61CE (available_at), - INDEX IDX_75EA56E016BA31DB (delivered_at), - PRIMARY KEY(id) - ) DEFAULT CHARACTER SET utf8mb4 + $this->addSql(' + CREATE TABLE messenger_messages ( + id BIGINT AUTO_INCREMENT NOT NULL, + body LONGTEXT NOT NULL, + headers LONGTEXT NOT NULL, + queue_name VARCHAR(190) NOT NULL, + created_at DATETIME NOT NULL, + available_at DATETIME NOT NULL, + delivered_at DATETIME DEFAULT NULL, + INDEX IDX_75EA56E0FB7336F0 (queue_name), + INDEX IDX_75EA56E0E3BD61CE (available_at), + INDEX IDX_75EA56E016BA31DB (delivered_at), + PRIMARY KEY(id) + ) DEFAULT CHARACTER SET utf8mb4 '); $this->addSql('ALTER TABLE activity_user ADD CONSTRAINT FK_8E570DDB81C06096 FOREIGN KEY (activity_id) REFERENCES activities (id) ON DELETE CASCADE'); diff --git a/migrations/Version20260420144514.php b/migrations/Version20260420144514.php index 5a2e675..5cb5056 100644 --- a/migrations/Version20260420144514.php +++ b/migrations/Version20260420144514.php @@ -23,21 +23,5 @@ public function up(Schema $schema): void $this->addSql('ALTER TABLE time_slot ADD room_id VARCHAR(36) NOT NULL'); $this->addSql('ALTER TABLE time_slot ADD CONSTRAINT FK_1B3294A54177093 FOREIGN KEY (room_id) REFERENCES room (id)'); $this->addSql('CREATE INDEX IDX_1B3294A54177093 ON time_slot (room_id)'); - $this->addSql('DROP INDEX IDX_75EA56E016BA31DB ON messenger_messages'); - $this->addSql('DROP INDEX IDX_75EA56E0FB7336F0 ON messenger_messages'); - $this->addSql('DROP INDEX IDX_75EA56E0E3BD61CE ON messenger_messages'); - $this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0E3BD61CE16BA31DBBF396750 ON messenger_messages (queue_name, available_at, delivered_at, id)'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('DROP INDEX IDX_75EA56E0FB7336F0E3BD61CE16BA31DBBF396750 ON messenger_messages'); - $this->addSql('CREATE INDEX IDX_75EA56E016BA31DB ON messenger_messages (delivered_at)'); - $this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0 ON messenger_messages (queue_name)'); - $this->addSql('CREATE INDEX IDX_75EA56E0E3BD61CE ON messenger_messages (available_at)'); - $this->addSql('ALTER TABLE time_slot DROP FOREIGN KEY FK_1B3294A54177093'); - $this->addSql('DROP INDEX IDX_1B3294A54177093 ON time_slot'); - $this->addSql('ALTER TABLE time_slot DROP room_id'); } } diff --git a/migrations/Version20260421134401.php b/migrations/Version20260421134401.php new file mode 100644 index 0000000..709317e --- /dev/null +++ b/migrations/Version20260421134401.php @@ -0,0 +1,25 @@ +addSql('ALTER TABLE time_slot CHANGE booth_id booth_id VARCHAR(36) DEFAULT NULL'); + } +} diff --git a/migrations/Version20260421135255.php b/migrations/Version20260421135255.php new file mode 100644 index 0000000..e2482ea --- /dev/null +++ b/migrations/Version20260421135255.php @@ -0,0 +1,28 @@ +addSql('DROP INDEX IDX_75EA56E0FB7336F0 ON messenger_messages'); + $this->addSql('DROP INDEX IDX_75EA56E0E3BD61CE ON messenger_messages'); + $this->addSql('DROP INDEX IDX_75EA56E016BA31DB ON messenger_messages'); + $this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0E3BD61CE16BA31DBBF396750 ON messenger_messages (queue_name, available_at, delivered_at, id)'); + } +} diff --git a/src/Admin/Field/MapImageField.php b/src/Admin/Field/MapImageField.php index 6cc22e2..1f65a9b 100644 --- a/src/Admin/Field/MapImageField.php +++ b/src/Admin/Field/MapImageField.php @@ -2,7 +2,6 @@ namespace App\Admin\Field; -use App\Form\Type\MapImageType; use EasyCorp\Bundle\EasyAdminBundle\Contracts\Field\FieldInterface; use EasyCorp\Bundle\EasyAdminBundle\Field\FieldTrait; use EasyCorp\Bundle\EasyAdminBundle\Field\ImageField; diff --git a/src/Controller/Admin/DashboardController.php b/src/Controller/Admin/DashboardController.php index b36f3ec..7bd6f74 100644 --- a/src/Controller/Admin/DashboardController.php +++ b/src/Controller/Admin/DashboardController.php @@ -2,7 +2,6 @@ namespace App\Controller\Admin; -use App\Entity; use EasyCorp\Bundle\EasyAdminBundle\Attribute\AdminDashboard; use EasyCorp\Bundle\EasyAdminBundle\Config\Assets; use EasyCorp\Bundle\EasyAdminBundle\Config\Dashboard; diff --git a/src/Controller/Admin/FloorCrudController.php b/src/Controller/Admin/FloorCrudController.php index 62fb8f3..b1bd3aa 100644 --- a/src/Controller/Admin/FloorCrudController.php +++ b/src/Controller/Admin/FloorCrudController.php @@ -50,6 +50,7 @@ public function configureFilters(Filters $filters): Filters ->andWhere('creators IN (:creator)') ->setParameter('creator', $this->getUser()) ; + return $qb; }, ])); diff --git a/src/Controller/Admin/GenericCrudMethods.php b/src/Controller/Admin/GenericCrudMethods.php index 408c879..8dcf809 100644 --- a/src/Controller/Admin/GenericCrudMethods.php +++ b/src/Controller/Admin/GenericCrudMethods.php @@ -88,7 +88,7 @@ private function addRootEntityToRelations(FormBuilderInterface $builder): FormBu return $builder ->addEventListener(FormEvents::SUBMIT, function (FormEvent $event): void { $entity = $event->getForm()->getData(); - if (!($entity instanceof HasNestedRelations)) { + if (!$entity instanceof HasNestedRelations) { throw new \RuntimeException(\sprintf('Invalid usage of "%s". It must be associated with an entity instance that implements "%s".', static::class, HasNestedRelations::class)); } $entity->refreshNestedRelations(); @@ -98,7 +98,7 @@ private function addRootEntityToRelations(FormBuilderInterface $builder): FormBu private function checkParent(): void { - if (!($this instanceof AbstractCrudController)) { + if (!$this instanceof AbstractCrudController) { throw new \RuntimeException(\sprintf('Invalid usage of "%s". It must extend "%s".', static::class, AbstractCrudController::class)); } } diff --git a/src/Controller/Admin/TimeSlotCrudController.php b/src/Controller/Admin/TimeSlotCrudController.php index 3ac0dee..69c1bd3 100644 --- a/src/Controller/Admin/TimeSlotCrudController.php +++ b/src/Controller/Admin/TimeSlotCrudController.php @@ -49,13 +49,14 @@ public function createFromCalendar(Request $request): Response $booth = $request->request->get('booth_id'); $room = $request->request->get('room_id'); $event = $request->request->get('event_id'); - if($booth && $room) { - if($room != $booth->get('room_id')) { + + $booth = $this->boothRepository->find($booth); + if ($booth && $room) { + if ($room !== $booth->getRoom()->getId()) { throw new BadRequestHttpException('Parameters don\'t match.'); } - } - else if($booth) { - $room = $this->boothRepository->find($booth)->getRoom()->getId(); + } elseif ($booth) { + $room = $booth->getRoom()->getId(); } if (!$start || !$end || !$room || !$event) { @@ -68,7 +69,7 @@ public function createFromCalendar(Request $request): Response $start = null; $end = null; } - $booth = $this->boothRepository->find($booth); + $room = $this->roomRepository->find($room); $event = $this->eventRepository->find($event); if (!$start || !$end || !$room || !$event) { @@ -97,7 +98,7 @@ public static function getEntityFqcn(): string public function configureFields(string $pageName): iterable { yield Field\AssociationField::new('event')->setRequired(true); - yield Field\AssociationField::new('booth')->setRequired(true); + yield Field\AssociationField::new('booth')->setRequired(false); yield Field\AssociationField::new('room')->setRequired(true); yield Field\DateTimeField::new('startsAt')->setTimezone('UTC'); yield Field\DateTimeField::new('endsAt')->setTimezone('UTC'); diff --git a/src/Controller/Admin/VenueCrudController.php b/src/Controller/Admin/VenueCrudController.php index c606d5f..ed93feb 100644 --- a/src/Controller/Admin/VenueCrudController.php +++ b/src/Controller/Admin/VenueCrudController.php @@ -28,11 +28,12 @@ */ final class VenueCrudController extends AbstractCrudController { - use GenericCrudMethods {configureCrud as baseConfigureCrud;} + use GenericCrudMethods {configureCrud as baseConfigureCrud; } public function __construct( private readonly TranslatorInterface $translator, - ) {} + ) { + } public static function getEntityFqcn(): string { diff --git a/src/Entity/Booth.php b/src/Entity/Booth.php index 1ab992d..194e365 100644 --- a/src/Entity/Booth.php +++ b/src/Entity/Booth.php @@ -3,7 +3,6 @@ namespace App\Entity; use App\Repository\BoothRepository; -use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Entity/Event.php b/src/Entity/Event.php index b9aba94..402199f 100644 --- a/src/Entity/Event.php +++ b/src/Entity/Event.php @@ -184,12 +184,16 @@ public function getCalendarSchedulesJson(array $states): array if (!\in_array($scheduledActivity->getState(), $states)) { continue; } + $ressource = $slot->getRoom()->getId(); + if ($slot->getBooth()) { + $ressource = $slot->getBooth()->getId(); + } $json[] = [ 'id' => $scheduledActivity->getId(), 'title' => $scheduledActivity->getActivity()?->getName(), 'start' => $slot->getStartsAt(), 'end' => $slot->getEndsAt(), - 'resourceId' => $slot->getBooth()->getId(), + 'resourceId' => $ressource, 'extendedProps' => [ 'type' => 'activity', 'description' => $scheduledActivity->getActivity()?->getDescription(), @@ -198,12 +202,16 @@ public function getCalendarSchedulesJson(array $states): array ]; } if (!$activities->count()) { + $ressource = $slot->getRoom()->getId(); + if ($slot->getBooth()) { + $ressource = $slot->getBooth()->getId(); + } $json[] = [ 'id' => $slot->getId(), 'title' => '', 'start' => $slot->getStartsAt(), 'end' => $slot->getEndsAt(), - 'resourceId' => $slot->getBooth()->getId(), + 'resourceId' => $ressource, 'extendedProps' => ['type' => 'empty_slot'], 'color' => '#000', ]; diff --git a/src/Entity/Field/MapImage.php b/src/Entity/Field/MapImage.php index 6e78c00..990b3f8 100644 --- a/src/Entity/Field/MapImage.php +++ b/src/Entity/Field/MapImage.php @@ -78,7 +78,7 @@ public function getMapJson(): array 'width' => $this->mapWidth, 'height' => $this->mapHeight, 'mimeType' => $this->mapMimeType, - 'rooms' => array_map(static fn(Room $room) => $room->getMapJson(), $this->rooms->toArray()), + 'rooms' => array_map(static fn (Room $room) => $room->getMapJson(), $this->rooms->toArray()), ]; } } diff --git a/src/Entity/Room.php b/src/Entity/Room.php index f13e04b..c2864ce 100644 --- a/src/Entity/Room.php +++ b/src/Entity/Room.php @@ -138,34 +138,4 @@ public function hasBooth(Booth $booth): bool { return $this->booths->contains($booth); } - - /** - * @return Collection - */ - public function getTimeSlots(): Collection - { - return $this->timeSlots; - } - - public function addTimeSlot(TimeSlot $timeSlot): static - { - if (!$this->timeSlots->contains($timeSlot)) { - $this->timeSlots->add($timeSlot); - $timeSlot->setRoom($this); - } - - return $this; - } - - public function removeTimeSlot(TimeSlot $timeSlot): static - { - if ($this->timeSlots->removeElement($timeSlot)) { - // set the owning side to null (unless already changed) - if ($timeSlot->getRoom() === $this) { - $timeSlot->setRoom(null); - } - } - - return $this; - } } diff --git a/src/Entity/TimeSlot.php b/src/Entity/TimeSlot.php index 508e41c..191634b 100644 --- a/src/Entity/TimeSlot.php +++ b/src/Entity/TimeSlot.php @@ -24,10 +24,13 @@ class TimeSlot implements HasCreators #[ORM\JoinColumn(name: 'event_id', nullable: false)] private Event $event; - #[ORM\ManyToOne(targetEntity: Booth::class)] + #[ORM\ManyToOne(targetEntity: Room::class)] #[ORM\JoinColumn(nullable: false)] - #[Assert\NotBlank] - private Booth $booth; + private Room $room; + + #[ORM\ManyToOne(targetEntity: Booth::class)] + #[ORM\JoinColumn(nullable: true)] + private ?Booth $booth = null; #[ORM\Column(name: 'is_open', type: Types::BOOLEAN, nullable: false, options: ['default' => 1])] #[Assert\Type('bool')] @@ -41,10 +44,6 @@ class TimeSlot implements HasCreators #[ORM\OneToMany(targetEntity: ScheduledActivity::class, mappedBy: 'timeSlot')] private Collection $scheduledActivities; - #[ORM\ManyToOne(inversedBy: 'timeSlots')] - #[ORM\JoinColumn(nullable: false)] - private Room $room; - public function __construct() { $this->generateId(); @@ -162,12 +161,12 @@ public function setEvent(Event $event): void $this->event->addTimeslot($this); } - public function getBooth(): Booth + public function getBooth(): ?Booth { return $this->booth; } - public function setBooth(Booth $booth): void + public function setBooth(?Booth $booth): void { $this->booth = $booth; } @@ -205,10 +204,8 @@ public function getRoom(): Room return $this->room; } - public function setRoom(Room $Room): static + public function setRoom(Room $Room): void { $this->room = $Room; - - return $this; } } diff --git a/src/EventListener/MapImagePersistListener.php b/src/EventListener/MapImagePersistListener.php index d33fb0e..72d7cdd 100644 --- a/src/EventListener/MapImagePersistListener.php +++ b/src/EventListener/MapImagePersistListener.php @@ -35,7 +35,7 @@ public function updateImageSize(EntityLifecycleEventInterface $event): void return; } - $imagePath = \rtrim($this->publicDir, '/') . '/' . \ltrim($entity->getMapImage(), '/'); + $imagePath = \rtrim($this->publicDir, '/').'/'.\ltrim($entity->getMapImage(), '/'); if (!file_exists($imagePath)) { throw new \RuntimeException('Cannot load image: file does not exist.'); } diff --git a/src/Validator/NoOverlappingTimeSlot.php b/src/Validator/NoOverlappingTimeSlot.php index dbd740d..494572c 100644 --- a/src/Validator/NoOverlappingTimeSlot.php +++ b/src/Validator/NoOverlappingTimeSlot.php @@ -8,6 +8,7 @@ final class NoOverlappingTimeSlot extends Constraint { public string $timeSlotAlreadyTaken = 'This time slot overlaps with another at the same time and place.'; + public string $boothDontBelongToRoom = 'The booth does not belong to this room. The right room should be : {{ room }}'; public function getTargets(): string|array { diff --git a/src/Validator/NoOverlappingTimeSlotValidator.php b/src/Validator/NoOverlappingTimeSlotValidator.php index 4b186fe..50ca15b 100644 --- a/src/Validator/NoOverlappingTimeSlotValidator.php +++ b/src/Validator/NoOverlappingTimeSlotValidator.php @@ -34,5 +34,15 @@ public function validate(mixed $value, Constraint $constraint): void ; $this->context->buildViolation('')->atPath('endsAt')->addViolation(); } + + if ($value->getBooth()) { + if ($value->getRoom() !== $value->getBooth()->getRoom()) { + $this->context + ->buildViolation($constraint->boothDontBelongToRoom) + ->setParameter('{{ room }}', $value->getBooth()->getRoom()->getName()) + ->atPath('room') + ->addViolation(); + } + } } } diff --git a/tests/Controller/Admin/BoothCrudControllerTest.php b/tests/Controller/Admin/BoothCrudControllerTest.php index 08635db..a1bc009 100644 --- a/tests/Controller/Admin/BoothCrudControllerTest.php +++ b/tests/Controller/Admin/BoothCrudControllerTest.php @@ -9,7 +9,6 @@ use App\DataFixtures\Tools\Ref; use App\Entity\Room; use App\Tests\TestUtils\GetUser; -use EasyCorp\Bundle\EasyAdminBundle\Config\Action; use EasyCorp\Bundle\EasyAdminBundle\Test\AbstractCrudTestCase; use EasyCorp\Bundle\EasyAdminBundle\Test\Trait\CrudTestFormAsserts; diff --git a/tests/Twig/ActivityExtensionTest.php b/tests/Twig/ActivityExtensionTest.php index dae7eab..8b3c7d9 100644 --- a/tests/Twig/ActivityExtensionTest.php +++ b/tests/Twig/ActivityExtensionTest.php @@ -27,7 +27,7 @@ public function testBasicIntegration(string $username, string $activityId, bool $user = $this->getUser($username); /** @var ScheduledActivity $activity */ $activity = self::getContainer()->get(ScheduledActivityRepository::class)->find($activityId); - self::assertNotNull($activity, \sprintf("Activity with id \"%s\" was not found in database.", $activityId)); + self::assertNotNull($activity, \sprintf('Activity with id "%s" was not found in database.', $activityId)); $result = $extension->isUserRegisteredToActivity($user, $activity); diff --git a/translations/validators.en.yaml b/translations/validators.en.yaml index 71d93fc..5e0d1d4 100644 --- a/translations/validators.en.yaml +++ b/translations/validators.en.yaml @@ -9,3 +9,4 @@ 'Please enter an email': 'Please enter an email' 'This schedule overlaps with another activity at the same time and place.': 'This schedule overlaps with another activity at the same time and place.' 'This time slot overlaps with another at the same time and place.': 'This time slot overlaps with another at the same time and place.' +'The booth does not belong to this room. The right room should be : {{ room }}': 'The booth does not belong to this room. The right room should be : {{ room }}' diff --git a/translations/validators.fr.yaml b/translations/validators.fr.yaml index 23cdefa..2147e34 100644 --- a/translations/validators.fr.yaml +++ b/translations/validators.fr.yaml @@ -9,3 +9,4 @@ 'Please enter an email': 'Veuillez entrer une adresse e-mail' 'This schedule overlaps with another activity at the same time and place.': 'Ce programme se chevauche avec une autre activity au même moment et au même endroit.' 'This time slot overlaps with another at the same time and place.': 'Ce créneau horaire fait double emploi avec un autre créneau au même moment et au même endroit.' +'The booth does not belong to this room. The right room should be : {{ room }}': "Le stand n'appartient pas à cette salle. La bonne salle devrait être : {{ room }}" From 7e3a8f6109f90441b7b9c86466fc0b0c820d183c Mon Sep 17 00:00:00 2001 From: JulienSauguesEyraud Date: Mon, 27 Apr 2026 14:34:20 +0200 Subject: [PATCH 3/4] amelioration migrations --- .php-cs-fixer.cache | 2 +- migrations/Version20260420144514.php | 4 +++- src/DataFixtures/TimeSlotFixture.php | 22 +++++++++++----------- src/Entity/TimeSlot.php | 6 +++--- test.bash | 24 ++++++++++++++++++++++++ 5 files changed, 42 insertions(+), 16 deletions(-) create mode 100755 test.bash diff --git a/.php-cs-fixer.cache b/.php-cs-fixer.cache index 2316fd9..e3c985f 100644 --- a/.php-cs-fixer.cache +++ b/.php-cs-fixer.cache @@ -1 +1 @@ -{"php":"8.3.30","version":"3.95.1","indent":" ","lineEnding":"\n","rules":{"align_multiline_comment":true,"backtick_to_shell_exec":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["return"]},"braces_position":{"allow_single_line_anonymous_functions":true,"allow_single_line_empty_anonymous_classes":true},"class_attributes_separation":{"elements":{"method":"one"}},"class_definition":{"single_line":true},"class_reference_name_casing":true,"clean_namespace":true,"concat_space":true,"declare_parentheses":true,"echo_tag_syntax":true,"empty_loop_body":{"style":"braces"},"empty_loop_condition":true,"fully_qualified_strict_types":true,"function_declaration":{"closure_fn_spacing":"one"},"general_phpdoc_tag_rename":{"replacements":{"inheritDocs":"inheritDoc"}},"global_namespace_import":{"import_classes":false,"import_constants":false,"import_functions":false},"include":true,"increment_style":true,"integer_literal_case":true,"lambda_not_used_import":true,"linebreak_after_opening_tag":true,"magic_constant_casing":true,"magic_method_casing":true,"method_argument_space":{"after_heredoc":true,"on_multiline":"ignore"},"native_function_casing":true,"native_type_declaration_casing":true,"no_alias_language_construct_call":true,"no_alternative_syntax":true,"no_binary_string":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":{"tokens":["attribute","case","continue","curly_brace_block","default","extra","parenthesis_brace_block","square_brace_block","switch","throw","use"]},"no_leading_namespace_whitespace":true,"no_mixed_echo_print":true,"no_multiline_whitespace_around_double_arrow":true,"no_null_property_initialization":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_superfluous_phpdoc_tags":{"allow_hidden_params":true,"remove_inheritdoc":true},"no_trailing_comma_in_singleline":true,"no_unneeded_braces":{"namespaces":true},"no_unneeded_control_parentheses":{"statements":["break","clone","continue","echo_print","negative_instanceof","others","return","switch_case","yield","yield_from"]},"no_unneeded_import_alias":true,"no_unset_cast":true,"no_unused_imports":true,"no_useless_concat_operator":true,"no_useless_else":true,"no_useless_nullsafe_operator":true,"no_useless_return":true,"no_whitespace_before_comma_in_array":{"after_heredoc":true},"normalize_index_brace":true,"nullable_type_declaration_for_default_null_value":true,"object_operator_without_whitespace":true,"operator_linebreak":{"only_booleans":true},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"alpha"},"php_unit_fqcn_annotation":true,"php_unit_method_casing":true,"phpdoc_align":true,"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag_normalizer":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":{"replacements":{"const":"var","link":"see","property-read":"property","property-write":"property","type":"var"}},"phpdoc_no_package":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_order":{"order":["param","return","throws"]},"phpdoc_return_self_reference":true,"phpdoc_scalar":{"types":["boolean","callback","double","integer","never-return","never-returns","no-return","real","str"]},"phpdoc_separation":{"groups":[["Annotation","NamedArgumentConstructor","Target"],["author","copyright","license"],["category","package","subpackage"],["property","property-read","property-write"],["deprecated","link","see","since"]],"skip_unlisted_annotations":false},"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_tag_type":{"tags":{"inheritDoc":"inline"}},"phpdoc_to_comment":{"allow_before_return_statement":false},"phpdoc_trim":true,"phpdoc_trim_consecutive_blank_line_separation":true,"phpdoc_types":true,"phpdoc_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"phpdoc_var_annotation_correct_order":true,"phpdoc_var_without_name":true,"protected_to_private":true,"semicolon_after_instruction":true,"simple_to_complex_string_variable":true,"single_import_per_statement":true,"single_line_comment_spacing":true,"single_line_comment_style":{"comment_types":["hash"]},"single_line_throw":true,"single_quote":true,"single_space_around_construct":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"statement_indentation":{"stick_comment_to_next_continuous_control_statement":true},"switch_continue_to_break":true,"trailing_comma_in_multiline":{"after_heredoc":true,"elements":["array_destructuring","arrays","match","parameters"]},"trim_array_spaces":true,"type_declaration_spaces":{"elements":["function","property"]},"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"nullable_type_declaration":true,"ordered_types":{"null_adjustment":"always_last","sort_algorithm":"none"},"single_class_element_per_statement":true,"types_spaces":true,"array_indentation":true,"array_syntax":true,"attribute_block_no_spaces":true,"cast_spaces":true,"new_with_parentheses":{"anonymous_class":false},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"modifier_keywords":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"return_type_declaration":true,"short_scalar_cast":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_line_after_imports":true,"spaces_inside_parentheses":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"final_class":true,"final_internal_class":true},"ruleCustomisationPolicyVersion":"null-policy","hashes":{"config\/preload.php":"43f0d906da7ba45a9a6ce95a6bfc28b4","migrations\/Version20260420144514.php":"6f3e8fe0545d71fca7061f12d944a2f9","migrations\/Version20260421112931.php":"f6e0ee2b85e6dd8a9c98fe3f64ce79e2","src\/Validator\/NoOverlappingTimeSlotValidator.php":"8263fe5a66de746581c482b18a4c9d98","src\/Validator\/NoOverlappingTimeSlot.php":"b24bf1e5ae6270af877269c55028873b","src\/Validator\/NoOverlappingSchedules.php":"8d0aeafc26f77ee86c83f4dd01887b6d","src\/Locales.php":"afc46b113bc4690defcad9beb7559ec7","src\/Kernel.php":"d0740a74a2e533ba3605644e975e5f99","src\/Twig\/Extension\/TypesExtension.php":"62d9dc635bc22ca13225ba44e0c70282","src\/Twig\/Extension\/ActivityExtension.php":"abb054b0a5d66e01ae669d77c4fe26ab","src\/EventListener\/MapImagePersistListener.php":"090a9bdc287462d8b63d04d395dc5647","src\/EventListener\/LocaleListener.php":"3639209cf784cae566804c5369d289dd","src\/Mailer\/PasswordResetMailer.php":"9947a71b50f2fb9f5c0f58efa786c1cd","src\/DataFixtures\/BoothFixture.php":"dfd5c8ff50acf546151ce89c84f62b7d","src\/Admin\/Field\/AssociationField.php":"a04589c5f881d0327aec09807630f5a6","src\/Admin\/Field\/EquipmentField.php":"9f8d877014ea20d384ce91613a83583f","src\/Admin\/Field\/AssociationCollectionField.php":"06d9f78b4de9057517394687dca5d3c8","src\/Admin\/Field\/MapImageField.php":"23863a0e3ddd30081d5d481a0938a76e","tests\/TestUtils\/CreateUser.php":"8fef4ac4eb088af6a7272378f9bf8ef0","tests\/TestUtils\/Assertions\/SessionHasFlashMessage.php":"257a06b8f5f6f8e4343139697fe76a89","tests\/TestUtils\/Assertions\/FlashMessageAssertions.php":"ee410e8269d28e0d22fbd9feb50f55b0","tests\/TestUtils\/GetUser.php":"c75254a59e5a41c2f557922208ed593b","tests\/TestUtils\/ProvidesLocales.php":"4254a325e294e9a9890816b0891db420","src\/Mailer\/RegistrationEmailVerifier.php":"dcbf8020e37ea0f0658b48b5e7e29445","src\/Repository\/UserRepository.php":"42aadbab49c439dbc9368347dd8240bf","src\/Repository\/TimeSlotRepository.php":"19ac3676e11a3731a07a02014da854f2","src\/Repository\/AttendeeRepository.php":"267fb9aeb9a3acb135541c971d8e4319","src\/Repository\/BoothRepository.php":"70721d5f1d5c73d0d989d9e216eea299","src\/Repository\/RoomRepository.php":"38e8adeb689861f87befb636364aede9","src\/Repository\/EventRepository.php":"78303f5ad0ec2ca53d2a367340fe9156","src\/Repository\/ActivityRepository.php":"b3bc29c754663ccb6816166ce52087d7","src\/Repository\/ResetPasswordRequestRepository.php":"429534dec9abc4f68682413cd1da3064","src\/Repository\/ScheduledActivityRepository.php":"689f6e8166da7e0fd4c69d4089185966","src\/Entity\/HasNestedRelations.php":"1a39e824e07e36657e83f786d7b557b5","src\/Entity\/Attendee.php":"2d04bd534c416d831e7ef8851db29445","src\/Security\/Voter\/TimeSlotVoter.php":"17b97fbd7b11979a832690c6c6f3a0f8","src\/Security\/Voter\/ActivityVoter.php":"9993ed80ff44c61aa25bd1b10cd25920","src\/Security\/Voter\/EventVoter.php":"00c2b7b6eceab26305c5749a7d29dfc8","src\/Security\/Voter\/ScheduledActivityVoter.php":"bd8852422890fe84f4a18ce4112ea58e","src\/Security\/Voter\/VenueVoter.php":"53c46ce3d7041f48b3d2f11933c194f3","src\/Security\/AppFormAuthenticator.php":"ce7d7fe59ba97c223acacaf8fe8df896","src\/Security\/UserChecker.php":"9e70ec05bb87f20d9a853ee613f1ab11","src\/DataFixtures\/AttendeeFixture.php":"9127335b39dbbe320fad7778ef53b996","src\/Entity\/Field\/Published.php":"26745bd481c9d5ad71948d4f40410643","src\/Entity\/Field\/Id.php":"4083dee5aea1ce2e4ea7ac99326322b0","src\/Entity\/Field\/MapImage.php":"111aa6bbf95624aa9ef57603a0297b64","src\/Entity\/Field\/Description.php":"42802ab0a39b10b8e0a786e42ffb0cf0","src\/Entity\/Field\/StartEndDates.php":"494097044252e1ed986db3b26f84883f","src\/Entity\/Field\/Creators.php":"3c2ac5101338640410c8db5ff1374130","src\/Entity\/Field\/Name.php":"2c21f7d7d304a186e7d3fc81975d1522","src\/Entity\/Field\/Timestampable.php":"86681ec1753e01b3c4814ee5fd294398","src\/Entity\/Activity.php":"967ad453227f6237d555d263afba35f4","src\/Entity\/ScheduledActivity.php":"2243060430b1c0cfc122ca7073c2567e","src\/Form\/Type\/AssociativeArrayItemType.php":"beba4dc1d8623f4c6c17edfffd8b9226","src\/Form\/Type\/RegisterAsActivityAttendeeType.php":"89ada8c026995986bf53bf2e4e754e64","src\/Form\/Type\/SubmitActivityToSlotType.php":"f1d92af288949eef625ac188ff85f138","src\/Form\/Type\/RegistrationFormType.php":"d02e8b1557c2995518ab7e6c1271310a","src\/Form\/Type\/ResetPasswordRequestFormType.php":"59c7e721a4c03c94ed456dd80dc55f1c","src\/Form\/Type\/AssociativeArrayType.php":"74e5920574557e06a260a41cd43e1706","src\/Form\/Type\/ChangePasswordFormType.php":"9641985ef94a5ee31d53fe0e130cc1f8","src\/Form\/Type\/RoleType.php":"513e1d62f4e01ee1dff90558e5a8420c","src\/Form\/Type\/ActivityType.php":"96372aa5d99b5bfd977a451b6ae8e40d","src\/Validator\/NoOverlappingSchedulesValidator.php":"3dbf0c61aa45549f1bed1b0fc2214987","src\/DataFixtures\/RoomFixture.php":"d38360aed6328b7250709a64b2448a68","src\/DataFixtures\/EventFixture.php":"0d87cd14053ad0ec422827c8b8bbe3e8","src\/DataFixtures\/VenueFixture.php":"9c31784255b095d7058b3637c059359e","src\/DataFixtures\/FloorFixture.php":"f2eca9bfdaebb5248cef5abc73843167","src\/DataFixtures\/TimeSlotFixture.php":"4e29e4dfd730bb066ded7b0ec0f8aa8b","src\/DataFixtures\/Tools\/GetObjectsFromData.php":"9fc61d6df1e082c54370500324966335","src\/DataFixtures\/Tools\/Ref.php":"8db064d31c21d4865f1f180c3cca6ed9","src\/DataFixtures\/ScheduledActivityFixture.php":"46f5ed3fdc549d14086dd0ad3e8d9675","src\/DataFixtures\/UserFixture.php":"ec1c8b54f806e07169d5ac4c253fb5dc","src\/DataFixtures\/ActivityFixture.php":"d07f4d45901a80d0d06232acccaacc44","tests\/Controller\/Admin\/VenueCrudControllerTest.php":"fbf520d126f1c62180c94f1addfc7139","tests\/Controller\/Admin\/EventCrudControllerTest.php":"122f7cbc69796ea15d135c7e66e70cc5","tests\/Controller\/Admin\/FloorCrudControllerTest.php":"4f0c51b205fe0b159db40e08ecb62dbe","tests\/Controller\/Admin\/DashboardControllerTest.php":"d8ae7376c1f6020a038356e4d0dc0387","tests\/Controller\/Admin\/BoothCrudControllerTest.php":"f30cace27b4befa7bc0533e91cbc681f","tests\/Entity\/EventTest.php":"dea9d385fee970d5b3682b2b1951142b","tests\/Security\/UserCheckerTest.php":"d5deac2cc2d9d12d17e029810136bd48","config\/reference.php":"c6c937abe63453ff9323b47846b6fa3f","config\/bundles.php":"6d21a0a5a93d390f1150109da890c6af","config\/routes.php":"8eea48238ff725926705aae3e9c97a7d","src\/Repository\/VenueRepository.php":"073da69179ba2f7a1d81d221ce521916","src\/Repository\/FloorRepository.php":"b9d0f82537f9486c9dc67021c04d9b03","src\/Enum\/ScheduleActivityState.php":"c67703e743d0f2f9b0d1a57862817ba2","src\/Controller\/Public\/ResetPasswordController.php":"97a6837682fda295a786fa5d4ef6d9d5","src\/Controller\/Public\/IndexController.php":"2189fdee36a0972968fd190287345cc7","src\/Controller\/Public\/EventController.php":"b3745197b56820fd99d159b02b947f94","src\/Controller\/Public\/RegistrationController.php":"d83241950b603db943be6dbeea868c8f","src\/Controller\/Public\/SubmitActivityToSlotController.php":"d5a0a901059092984a57786b812ac142","src\/Controller\/Public\/ActivityAttendeeRegisterController.php":"180f2bfdef5f71305ade6364d3890eac","src\/Controller\/Public\/AuthController.php":"f516aaef0853f8c6f6f3edcf012402b8","tests\/Controller\/Public\/SubmitActivityToSlotControllerTest.php":"2c957803cf0cf65871ee08a8dda76f08","tests\/Controller\/Public\/IndexControllerTest.php":"3068dc7ee1b90cc4c0b33f3a84695826","tests\/Controller\/Public\/AuthControllerTest.php":"983df6126bcb7c9e31dd37b659ee24d4","tests\/Controller\/Admin\/ActivityCrudControllerTest.php":"b33a593dda3b433ca840e5b0f1cc4dc6","tests\/Controller\/Admin\/ScheduledActivityCrudControllerTest.php":"0a5c1a0040370f61d5c08f350fcbd506","tests\/Controller\/Admin\/RoomCrudControllerTest.php":"3bc2ae69ff8bb3c73f7ffe877170ce63","tests\/Controller\/Admin\/CalendarControllerTest.php":"6f62d14d09973ffd41583fe42a12d241","tests\/Controller\/Admin\/Utils\/TestAdminNew.php":"6eef7e220e8d18d5979f9b0729d25afd","tests\/Controller\/Admin\/Utils\/TestAdminEdit.php":"d6a2031f6be4e08e60dedf2e321b6fd1","tests\/Controller\/Admin\/Utils\/TestAdminIndex.php":"98983e8e5bb5907983df5ff60372bd9d","tests\/SmokeTest.php":"887058351021ae408ebe1bb75a1e6c62","tests\/Twig\/ActivityExtensionTest.php":"f9cf3ce57c13793fb0f054e7f521a6a8","tests\/Twig\/TypesExtensionTest.php":"99a57f214f855d60624a094bfdf5864c","tests\/Mailer\/RegistrationEmailVerifierTest.php":"b388a5441f79464012d2f06e9b7d2505","tests\/bootstrap.php":"d96f1da1e2fa0b32a808fed4b9abc96f","tests\/Enum\/ScheduleActivityStateTest.php":"b97076f251d842bf977becb8f57b5704","tests\/Controller\/Public\/EventControllerTest.php":"82f046f73a4a51a449b5f21fdb9f28a5","tests\/Controller\/Public\/RegistrationControllerTest.php":"eca5fc71328856466c3d695e74850b10","tests\/Controller\/Public\/ResetPasswordControllerTest.php":"301209d5c1f4ffedf0aec8c3144aa762","tests\/Controller\/Public\/ActivityAttendeeRegisterControllerTest.php":"dfe9fca0e323944741f7f4d6f32b94b9","src\/Controller\/Admin\/DashboardController.php":"90dcd0d615e388b48ab485e7c6a0d3eb","src\/Controller\/Admin\/NestedControllers\/NestedFloorCrudController.php":"f01badadefee42fcf36f8062c959fa3c","src\/Controller\/Admin\/NestedControllers\/NestedRoomCrudController.php":"4a3ee95fab80737dabb645eb3fa9722d","src\/Controller\/Admin\/NestedControllers\/NestedBoothCrudController.php":"824ea08a47b376b54641cd55083c953e","src\/Controller\/Admin\/VenueCrudController.php":"d940d7538b432b0b67833dc0347b434d","src\/Controller\/Admin\/FloorCrudController.php":"4d19ae0549b35b47d11bce6c44277580","src\/Controller\/Admin\/Traits\/DisableAllActions.php":"8c72b3bc34aac4d1dfb310c612210feb","src\/Entity\/Booth.php":"340e8242ee2680107612c62bdc2619fe","src\/Entity\/TimeSlot.php":"56787a452434833e2f99054cb29f1001","src\/Entity\/Venue.php":"9029df8bbed1f6ba68050fca1ca23fc0","src\/Entity\/Behaviors\/CloneVar.php":"caac4568bcc2301b9aaeff055df7b4ec","src\/Entity\/ResetPasswordRequest.php":"1dbc9f67d85b08a9a07475675cf69f43","src\/Entity\/User.php":"c56e999c916d5011500721dc3d9d9afd","src\/Entity\/Room.php":"14c1dcaae60f29d3c27b3b1ae1f7cd69","src\/Entity\/HasCreators.php":"9dad48627fed10216fe8182f7c72f6ac","src\/Entity\/HasMapImage.php":"6a6d08578cae43d183f5366887f6f489","src\/Entity\/Floor.php":"1dc28428d1a8cf2e3a5e750cf9947ab3","src\/Entity\/Event.php":"b5709d11f4c966171a60079f8d321d60","src\/Entity\/Field\/GenericContact.php":"6c7a6a00ff1557ba922651fcc9e89c57","src\/Entity\/Field\/Address.php":"fa7e1eab22a6189c418f6650e09237fb","src\/Controller\/Admin\/AttendeeCrudController.php":"8e42a3d6a93bf69b0969c23a89aa2d96","src\/Controller\/Admin\/BoothCrudController.php":"6305bf09962eb60a139a23834e6dde6d","src\/Controller\/Admin\/GenericCrudMethods.php":"6c8ff0563d269d56ff02a58a05377d1e","src\/Controller\/Admin\/ScheduledActivityCrudController.php":"38d6dcd7aed0a67cfd87f9817cb9c75b","src\/Controller\/Admin\/UsersCrudController.php":"4876c5f501664c045eee5beb081bc97b","src\/Controller\/Admin\/TimeSlotCrudController.php":"ce81164b1e904d61670eff6f3a2acce3","src\/Controller\/Admin\/EventCrudController.php":"50d7fda8ef3abcd304d46a1e11be4a4d","src\/Controller\/Admin\/RoomCrudController.php":"9217c724b54f4843562fdaa1d2d991fb","src\/Controller\/Admin\/ActivityCrudController.php":"b3cafb6d76f31cd52ec3f1dfa2d0cbc7","src\/Controller\/Admin\/CalendarController.php":"01a1f2474738cca63ee349aad409b5e9","migrations\/Version20260421134401.php":"f210e1add7eb8309723785327ec0f4a0","migrations\/Version20250319080855.php":"a6bfbf8524c1100635ffcc3d222e83a3","migrations\/Version20260421135255.php":"f71c9b869316febcd79289a99fcbff6d"}} \ No newline at end of file +{"php":"8.3.30","version":"3.95.1","indent":" ","lineEnding":"\n","rules":{"align_multiline_comment":true,"backtick_to_shell_exec":true,"binary_operator_spaces":true,"blank_line_before_statement":{"statements":["return"]},"braces_position":{"allow_single_line_anonymous_functions":true,"allow_single_line_empty_anonymous_classes":true},"class_attributes_separation":{"elements":{"method":"one"}},"class_definition":{"single_line":true},"class_reference_name_casing":true,"clean_namespace":true,"concat_space":true,"declare_parentheses":true,"echo_tag_syntax":true,"empty_loop_body":{"style":"braces"},"empty_loop_condition":true,"fully_qualified_strict_types":true,"function_declaration":{"closure_fn_spacing":"one"},"general_phpdoc_tag_rename":{"replacements":{"inheritDocs":"inheritDoc"}},"global_namespace_import":{"import_classes":false,"import_constants":false,"import_functions":false},"include":true,"increment_style":true,"integer_literal_case":true,"lambda_not_used_import":true,"linebreak_after_opening_tag":true,"magic_constant_casing":true,"magic_method_casing":true,"method_argument_space":{"after_heredoc":true,"on_multiline":"ignore"},"native_function_casing":true,"native_type_declaration_casing":true,"no_alias_language_construct_call":true,"no_alternative_syntax":true,"no_binary_string":true,"no_blank_lines_after_phpdoc":true,"no_empty_comment":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":{"tokens":["attribute","case","continue","curly_brace_block","default","extra","parenthesis_brace_block","square_brace_block","switch","throw","use"]},"no_leading_namespace_whitespace":true,"no_mixed_echo_print":true,"no_multiline_whitespace_around_double_arrow":true,"no_null_property_initialization":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_spaces_around_offset":true,"no_superfluous_phpdoc_tags":{"allow_hidden_params":true,"remove_inheritdoc":true},"no_trailing_comma_in_singleline":true,"no_unneeded_braces":{"namespaces":true},"no_unneeded_control_parentheses":{"statements":["break","clone","continue","echo_print","negative_instanceof","others","return","switch_case","yield","yield_from"]},"no_unneeded_import_alias":true,"no_unset_cast":true,"no_unused_imports":true,"no_useless_concat_operator":true,"no_useless_else":true,"no_useless_nullsafe_operator":true,"no_useless_return":true,"no_whitespace_before_comma_in_array":{"after_heredoc":true},"normalize_index_brace":true,"nullable_type_declaration_for_default_null_value":true,"object_operator_without_whitespace":true,"operator_linebreak":{"only_booleans":true},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"alpha"},"php_unit_fqcn_annotation":true,"php_unit_method_casing":true,"phpdoc_align":true,"phpdoc_annotation_without_dot":true,"phpdoc_indent":true,"phpdoc_inline_tag_normalizer":true,"phpdoc_no_access":true,"phpdoc_no_alias_tag":{"replacements":{"const":"var","link":"see","property-read":"property","property-write":"property","type":"var"}},"phpdoc_no_package":true,"phpdoc_no_useless_inheritdoc":true,"phpdoc_order":{"order":["param","return","throws"]},"phpdoc_return_self_reference":true,"phpdoc_scalar":{"types":["boolean","callback","double","integer","never-return","never-returns","no-return","real","str"]},"phpdoc_separation":{"groups":[["Annotation","NamedArgumentConstructor","Target"],["author","copyright","license"],["category","package","subpackage"],["property","property-read","property-write"],["deprecated","link","see","since"]],"skip_unlisted_annotations":false},"phpdoc_single_line_var_spacing":true,"phpdoc_summary":true,"phpdoc_tag_type":{"tags":{"inheritDoc":"inline"}},"phpdoc_to_comment":{"allow_before_return_statement":false},"phpdoc_trim":true,"phpdoc_trim_consecutive_blank_line_separation":true,"phpdoc_types":true,"phpdoc_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"phpdoc_var_annotation_correct_order":true,"phpdoc_var_without_name":true,"protected_to_private":true,"semicolon_after_instruction":true,"simple_to_complex_string_variable":true,"single_import_per_statement":true,"single_line_comment_spacing":true,"single_line_comment_style":{"comment_types":["hash"]},"single_line_throw":true,"single_quote":true,"single_space_around_construct":true,"space_after_semicolon":{"remove_in_empty_for_expressions":true},"standardize_increment":true,"standardize_not_equals":true,"statement_indentation":{"stick_comment_to_next_continuous_control_statement":true},"switch_continue_to_break":true,"trailing_comma_in_multiline":{"after_heredoc":true,"elements":["array_destructuring","arrays","match","parameters"]},"trim_array_spaces":true,"type_declaration_spaces":{"elements":["function","property"]},"unary_operator_spaces":true,"whitespace_after_comma_in_array":true,"nullable_type_declaration":true,"ordered_types":{"null_adjustment":"always_last","sort_algorithm":"none"},"single_class_element_per_statement":true,"types_spaces":true,"array_indentation":true,"array_syntax":true,"attribute_block_no_spaces":true,"cast_spaces":true,"new_with_parentheses":{"anonymous_class":false},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"modifier_keywords":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"return_type_declaration":true,"short_scalar_cast":true,"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_line_after_imports":true,"spaces_inside_parentheses":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true,"final_class":true,"final_internal_class":true},"ruleCustomisationPolicyVersion":"null-policy","hashes":{"config\/preload.php":"43f0d906da7ba45a9a6ce95a6bfc28b4","migrations\/Version20260420144514.php":"6f3e8fe0545d71fca7061f12d944a2f9","migrations\/Version20260421112931.php":"f6e0ee2b85e6dd8a9c98fe3f64ce79e2","src\/Validator\/NoOverlappingTimeSlotValidator.php":"8263fe5a66de746581c482b18a4c9d98","src\/Validator\/NoOverlappingTimeSlot.php":"b24bf1e5ae6270af877269c55028873b","src\/Validator\/NoOverlappingSchedules.php":"8d0aeafc26f77ee86c83f4dd01887b6d","src\/Locales.php":"afc46b113bc4690defcad9beb7559ec7","src\/Kernel.php":"d0740a74a2e533ba3605644e975e5f99","src\/Twig\/Extension\/TypesExtension.php":"62d9dc635bc22ca13225ba44e0c70282","src\/Twig\/Extension\/ActivityExtension.php":"abb054b0a5d66e01ae669d77c4fe26ab","src\/EventListener\/MapImagePersistListener.php":"090a9bdc287462d8b63d04d395dc5647","src\/EventListener\/LocaleListener.php":"3639209cf784cae566804c5369d289dd","src\/Mailer\/PasswordResetMailer.php":"9947a71b50f2fb9f5c0f58efa786c1cd","src\/DataFixtures\/BoothFixture.php":"dfd5c8ff50acf546151ce89c84f62b7d","src\/Admin\/Field\/AssociationField.php":"a04589c5f881d0327aec09807630f5a6","src\/Admin\/Field\/EquipmentField.php":"9f8d877014ea20d384ce91613a83583f","src\/Admin\/Field\/AssociationCollectionField.php":"06d9f78b4de9057517394687dca5d3c8","src\/Admin\/Field\/MapImageField.php":"23863a0e3ddd30081d5d481a0938a76e","tests\/TestUtils\/CreateUser.php":"8fef4ac4eb088af6a7272378f9bf8ef0","tests\/TestUtils\/Assertions\/SessionHasFlashMessage.php":"257a06b8f5f6f8e4343139697fe76a89","tests\/TestUtils\/Assertions\/FlashMessageAssertions.php":"ee410e8269d28e0d22fbd9feb50f55b0","tests\/TestUtils\/GetUser.php":"c75254a59e5a41c2f557922208ed593b","tests\/TestUtils\/ProvidesLocales.php":"4254a325e294e9a9890816b0891db420","src\/Mailer\/RegistrationEmailVerifier.php":"dcbf8020e37ea0f0658b48b5e7e29445","src\/Repository\/UserRepository.php":"42aadbab49c439dbc9368347dd8240bf","src\/Repository\/TimeSlotRepository.php":"19ac3676e11a3731a07a02014da854f2","src\/Repository\/AttendeeRepository.php":"267fb9aeb9a3acb135541c971d8e4319","src\/Repository\/BoothRepository.php":"70721d5f1d5c73d0d989d9e216eea299","src\/Repository\/RoomRepository.php":"38e8adeb689861f87befb636364aede9","src\/Repository\/EventRepository.php":"78303f5ad0ec2ca53d2a367340fe9156","src\/Repository\/ActivityRepository.php":"b3bc29c754663ccb6816166ce52087d7","src\/Repository\/ResetPasswordRequestRepository.php":"429534dec9abc4f68682413cd1da3064","src\/Repository\/ScheduledActivityRepository.php":"689f6e8166da7e0fd4c69d4089185966","src\/Entity\/HasNestedRelations.php":"1a39e824e07e36657e83f786d7b557b5","src\/Entity\/Attendee.php":"2d04bd534c416d831e7ef8851db29445","src\/Security\/Voter\/TimeSlotVoter.php":"17b97fbd7b11979a832690c6c6f3a0f8","src\/Security\/Voter\/ActivityVoter.php":"9993ed80ff44c61aa25bd1b10cd25920","src\/Security\/Voter\/EventVoter.php":"00c2b7b6eceab26305c5749a7d29dfc8","src\/Security\/Voter\/ScheduledActivityVoter.php":"bd8852422890fe84f4a18ce4112ea58e","src\/Security\/Voter\/VenueVoter.php":"53c46ce3d7041f48b3d2f11933c194f3","src\/Security\/AppFormAuthenticator.php":"ce7d7fe59ba97c223acacaf8fe8df896","src\/Security\/UserChecker.php":"9e70ec05bb87f20d9a853ee613f1ab11","src\/DataFixtures\/AttendeeFixture.php":"9127335b39dbbe320fad7778ef53b996","src\/Entity\/Field\/Published.php":"26745bd481c9d5ad71948d4f40410643","src\/Entity\/Field\/Id.php":"4083dee5aea1ce2e4ea7ac99326322b0","src\/Entity\/Field\/MapImage.php":"111aa6bbf95624aa9ef57603a0297b64","src\/Entity\/Field\/Description.php":"42802ab0a39b10b8e0a786e42ffb0cf0","src\/Entity\/Field\/StartEndDates.php":"494097044252e1ed986db3b26f84883f","src\/Entity\/Field\/Creators.php":"3c2ac5101338640410c8db5ff1374130","src\/Entity\/Field\/Name.php":"2c21f7d7d304a186e7d3fc81975d1522","src\/Entity\/Field\/Timestampable.php":"86681ec1753e01b3c4814ee5fd294398","src\/Entity\/Activity.php":"967ad453227f6237d555d263afba35f4","src\/Entity\/ScheduledActivity.php":"2243060430b1c0cfc122ca7073c2567e","src\/Form\/Type\/AssociativeArrayItemType.php":"beba4dc1d8623f4c6c17edfffd8b9226","src\/Form\/Type\/RegisterAsActivityAttendeeType.php":"89ada8c026995986bf53bf2e4e754e64","src\/Form\/Type\/SubmitActivityToSlotType.php":"f1d92af288949eef625ac188ff85f138","src\/Form\/Type\/RegistrationFormType.php":"d02e8b1557c2995518ab7e6c1271310a","src\/Form\/Type\/ResetPasswordRequestFormType.php":"59c7e721a4c03c94ed456dd80dc55f1c","src\/Form\/Type\/AssociativeArrayType.php":"74e5920574557e06a260a41cd43e1706","src\/Form\/Type\/ChangePasswordFormType.php":"9641985ef94a5ee31d53fe0e130cc1f8","src\/Form\/Type\/RoleType.php":"513e1d62f4e01ee1dff90558e5a8420c","src\/Form\/Type\/ActivityType.php":"96372aa5d99b5bfd977a451b6ae8e40d","src\/Validator\/NoOverlappingSchedulesValidator.php":"3dbf0c61aa45549f1bed1b0fc2214987","src\/DataFixtures\/RoomFixture.php":"d38360aed6328b7250709a64b2448a68","src\/DataFixtures\/EventFixture.php":"0d87cd14053ad0ec422827c8b8bbe3e8","src\/DataFixtures\/VenueFixture.php":"9c31784255b095d7058b3637c059359e","src\/DataFixtures\/FloorFixture.php":"f2eca9bfdaebb5248cef5abc73843167","src\/DataFixtures\/TimeSlotFixture.php":"4e29e4dfd730bb066ded7b0ec0f8aa8b","src\/DataFixtures\/Tools\/GetObjectsFromData.php":"9fc61d6df1e082c54370500324966335","src\/DataFixtures\/Tools\/Ref.php":"8db064d31c21d4865f1f180c3cca6ed9","src\/DataFixtures\/ScheduledActivityFixture.php":"46f5ed3fdc549d14086dd0ad3e8d9675","src\/DataFixtures\/UserFixture.php":"ec1c8b54f806e07169d5ac4c253fb5dc","src\/DataFixtures\/ActivityFixture.php":"d07f4d45901a80d0d06232acccaacc44","tests\/Controller\/Admin\/VenueCrudControllerTest.php":"fbf520d126f1c62180c94f1addfc7139","tests\/Controller\/Admin\/EventCrudControllerTest.php":"122f7cbc69796ea15d135c7e66e70cc5","tests\/Controller\/Admin\/FloorCrudControllerTest.php":"4f0c51b205fe0b159db40e08ecb62dbe","tests\/Controller\/Admin\/DashboardControllerTest.php":"d8ae7376c1f6020a038356e4d0dc0387","tests\/Controller\/Admin\/BoothCrudControllerTest.php":"f30cace27b4befa7bc0533e91cbc681f","tests\/Entity\/EventTest.php":"dea9d385fee970d5b3682b2b1951142b","tests\/Security\/UserCheckerTest.php":"d5deac2cc2d9d12d17e029810136bd48","config\/reference.php":"c6c937abe63453ff9323b47846b6fa3f","config\/bundles.php":"6d21a0a5a93d390f1150109da890c6af","config\/routes.php":"8eea48238ff725926705aae3e9c97a7d","src\/Repository\/VenueRepository.php":"073da69179ba2f7a1d81d221ce521916","src\/Repository\/FloorRepository.php":"b9d0f82537f9486c9dc67021c04d9b03","src\/Enum\/ScheduleActivityState.php":"c67703e743d0f2f9b0d1a57862817ba2","src\/Controller\/Public\/ResetPasswordController.php":"97a6837682fda295a786fa5d4ef6d9d5","src\/Controller\/Public\/IndexController.php":"2189fdee36a0972968fd190287345cc7","src\/Controller\/Public\/EventController.php":"b3745197b56820fd99d159b02b947f94","src\/Controller\/Public\/RegistrationController.php":"d83241950b603db943be6dbeea868c8f","src\/Controller\/Public\/SubmitActivityToSlotController.php":"d5a0a901059092984a57786b812ac142","src\/Controller\/Public\/ActivityAttendeeRegisterController.php":"180f2bfdef5f71305ade6364d3890eac","src\/Controller\/Public\/AuthController.php":"f516aaef0853f8c6f6f3edcf012402b8","tests\/Controller\/Public\/SubmitActivityToSlotControllerTest.php":"2c957803cf0cf65871ee08a8dda76f08","tests\/Controller\/Public\/IndexControllerTest.php":"3068dc7ee1b90cc4c0b33f3a84695826","tests\/Controller\/Public\/AuthControllerTest.php":"983df6126bcb7c9e31dd37b659ee24d4","tests\/Controller\/Admin\/ActivityCrudControllerTest.php":"b33a593dda3b433ca840e5b0f1cc4dc6","tests\/Controller\/Admin\/ScheduledActivityCrudControllerTest.php":"0a5c1a0040370f61d5c08f350fcbd506","tests\/Controller\/Admin\/RoomCrudControllerTest.php":"3bc2ae69ff8bb3c73f7ffe877170ce63","tests\/Controller\/Admin\/CalendarControllerTest.php":"6f62d14d09973ffd41583fe42a12d241","tests\/Controller\/Admin\/Utils\/TestAdminNew.php":"6eef7e220e8d18d5979f9b0729d25afd","tests\/Controller\/Admin\/Utils\/TestAdminEdit.php":"d6a2031f6be4e08e60dedf2e321b6fd1","tests\/Controller\/Admin\/Utils\/TestAdminIndex.php":"98983e8e5bb5907983df5ff60372bd9d","tests\/SmokeTest.php":"887058351021ae408ebe1bb75a1e6c62","tests\/Twig\/ActivityExtensionTest.php":"f9cf3ce57c13793fb0f054e7f521a6a8","tests\/Twig\/TypesExtensionTest.php":"99a57f214f855d60624a094bfdf5864c","tests\/Mailer\/RegistrationEmailVerifierTest.php":"b388a5441f79464012d2f06e9b7d2505","tests\/bootstrap.php":"d96f1da1e2fa0b32a808fed4b9abc96f","tests\/Enum\/ScheduleActivityStateTest.php":"b97076f251d842bf977becb8f57b5704","tests\/Controller\/Public\/EventControllerTest.php":"82f046f73a4a51a449b5f21fdb9f28a5","tests\/Controller\/Public\/RegistrationControllerTest.php":"eca5fc71328856466c3d695e74850b10","tests\/Controller\/Public\/ResetPasswordControllerTest.php":"301209d5c1f4ffedf0aec8c3144aa762","tests\/Controller\/Public\/ActivityAttendeeRegisterControllerTest.php":"dfe9fca0e323944741f7f4d6f32b94b9","src\/Controller\/Admin\/DashboardController.php":"90dcd0d615e388b48ab485e7c6a0d3eb","src\/Controller\/Admin\/NestedControllers\/NestedFloorCrudController.php":"f01badadefee42fcf36f8062c959fa3c","src\/Controller\/Admin\/NestedControllers\/NestedRoomCrudController.php":"4a3ee95fab80737dabb645eb3fa9722d","src\/Controller\/Admin\/NestedControllers\/NestedBoothCrudController.php":"824ea08a47b376b54641cd55083c953e","src\/Controller\/Admin\/VenueCrudController.php":"d940d7538b432b0b67833dc0347b434d","src\/Controller\/Admin\/FloorCrudController.php":"4d19ae0549b35b47d11bce6c44277580","src\/Controller\/Admin\/Traits\/DisableAllActions.php":"8c72b3bc34aac4d1dfb310c612210feb","src\/Entity\/Booth.php":"340e8242ee2680107612c62bdc2619fe","src\/Entity\/TimeSlot.php":"56787a452434833e2f99054cb29f1001","src\/Entity\/Venue.php":"9029df8bbed1f6ba68050fca1ca23fc0","src\/Entity\/Behaviors\/CloneVar.php":"caac4568bcc2301b9aaeff055df7b4ec","src\/Entity\/ResetPasswordRequest.php":"1dbc9f67d85b08a9a07475675cf69f43","src\/Entity\/User.php":"c56e999c916d5011500721dc3d9d9afd","src\/Entity\/Room.php":"14c1dcaae60f29d3c27b3b1ae1f7cd69","src\/Entity\/HasCreators.php":"9dad48627fed10216fe8182f7c72f6ac","src\/Entity\/HasMapImage.php":"6a6d08578cae43d183f5366887f6f489","src\/Entity\/Floor.php":"1dc28428d1a8cf2e3a5e750cf9947ab3","src\/Entity\/Event.php":"b5709d11f4c966171a60079f8d321d60","src\/Entity\/Field\/GenericContact.php":"6c7a6a00ff1557ba922651fcc9e89c57","src\/Entity\/Field\/Address.php":"fa7e1eab22a6189c418f6650e09237fb","src\/Controller\/Admin\/AttendeeCrudController.php":"8e42a3d6a93bf69b0969c23a89aa2d96","src\/Controller\/Admin\/BoothCrudController.php":"6305bf09962eb60a139a23834e6dde6d","src\/Controller\/Admin\/GenericCrudMethods.php":"6c8ff0563d269d56ff02a58a05377d1e","src\/Controller\/Admin\/ScheduledActivityCrudController.php":"38d6dcd7aed0a67cfd87f9817cb9c75b","src\/Controller\/Admin\/UsersCrudController.php":"4876c5f501664c045eee5beb081bc97b","src\/Controller\/Admin\/TimeSlotCrudController.php":"2fb2f4cf998bc3aa1490e0e9600849ac","src\/Controller\/Admin\/EventCrudController.php":"50d7fda8ef3abcd304d46a1e11be4a4d","src\/Controller\/Admin\/RoomCrudController.php":"9217c724b54f4843562fdaa1d2d991fb","src\/Controller\/Admin\/ActivityCrudController.php":"b3cafb6d76f31cd52ec3f1dfa2d0cbc7","src\/Controller\/Admin\/CalendarController.php":"01a1f2474738cca63ee349aad409b5e9","migrations\/Version20260421134401.php":"f210e1add7eb8309723785327ec0f4a0","migrations\/Version20250319080855.php":"a6bfbf8524c1100635ffcc3d222e83a3","migrations\/Version20260421135255.php":"f71c9b869316febcd79289a99fcbff6d"}} \ No newline at end of file diff --git a/migrations/Version20260420144514.php b/migrations/Version20260420144514.php index 5cb5056..36484ba 100644 --- a/migrations/Version20260420144514.php +++ b/migrations/Version20260420144514.php @@ -20,7 +20,9 @@ public function getDescription(): string public function up(Schema $schema): void { // this up() migration is auto-generated, please modify it to your needs - $this->addSql('ALTER TABLE time_slot ADD room_id VARCHAR(36) NOT NULL'); + $this->addSql('ALTER TABLE time_slot ADD room_id VARCHAR(36)'); + $this->addSql('UPDATE time_slot JOIN booth ON time_slot.booth_id = booth.id SET time_slot.room_id = booth.room_id'); + $this->addSql('ALTER TABLE time_slot MODIFY room_id VARCHAR(36) NOT NULL'); $this->addSql('ALTER TABLE time_slot ADD CONSTRAINT FK_1B3294A54177093 FOREIGN KEY (room_id) REFERENCES room (id)'); $this->addSql('CREATE INDEX IDX_1B3294A54177093 ON time_slot (room_id)'); } diff --git a/src/DataFixtures/TimeSlotFixture.php b/src/DataFixtures/TimeSlotFixture.php index 250fbfe..11d2a0f 100644 --- a/src/DataFixtures/TimeSlotFixture.php +++ b/src/DataFixtures/TimeSlotFixture.php @@ -43,7 +43,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+100 days'))->setTime(1, 0), 'endsAt' => (new \DateTimeImmutable('+100 days'))->setTime(2, 0), 'booth' => new Ref(Booth::class, 'booth-Table face pôle JdR 1'), - 'room' => new Ref(Room::class, 'room-Hall principal'), +// 'room' => new Ref(Room::class, 'room-Hall principal'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -51,7 +51,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+100 days'))->setTime(2, 0), 'endsAt' => (new \DateTimeImmutable('+100 days'))->setTime(3, 0), 'booth' => new Ref(Booth::class, 'booth-Table face pôle JdR 1'), - 'room' => new Ref(Room::class, 'room-Hall principal'), +// 'room' => new Ref(Room::class, 'room-Hall principal'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -59,7 +59,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+100 days'))->setTime(3, 0), 'endsAt' => (new \DateTimeImmutable('+100 days'))->setTime(4, 0), 'booth' => new Ref(Booth::class, 'booth-Table face pôle JdR 1'), - 'room' => new Ref(Room::class, 'room-Hall principal'), +// 'room' => new Ref(Room::class, 'room-Hall principal'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -67,7 +67,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+100 days'))->setTime(4, 0), 'endsAt' => (new \DateTimeImmutable('+100 days'))->setTime(5, 0), 'booth' => new Ref(Booth::class, 'booth-Table face pôle JdR 1'), - 'room' => new Ref(Room::class, 'room-Hall principal'), +// 'room' => new Ref(Room::class, 'room-Hall principal'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -75,7 +75,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+100 days'))->setTime(6, 0), 'endsAt' => (new \DateTimeImmutable('+100 days'))->setTime(7, 30), 'booth' => new Ref(Booth::class, 'booth-Hall jeux 01'), - 'room' => new Ref(Room::class, 'room-Hall jeux'), +// 'room' => new Ref(Room::class, 'room-Hall jeux'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -83,7 +83,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(3, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(7, 0), 'booth' => new Ref(Booth::class, 'booth-Public'), - 'room' => new Ref(Room::class, 'room-Scène'), +// 'room' => new Ref(Room::class, 'room-Scène'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -91,7 +91,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(3, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(7, 0), 'booth' => new Ref(Booth::class, 'booth-Public'), - 'room' => new Ref(Room::class, 'room-Scène'), +// 'room' => new Ref(Room::class, 'room-Scène'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -99,7 +99,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(7, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(8, 0), 'booth' => new Ref(Booth::class, 'booth-Table proto 1'), - 'room' => new Ref(Room::class, 'room-Salle entresol'), +// 'room' => new Ref(Room::class, 'room-Salle entresol'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -107,7 +107,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(7, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(9, 0), 'booth' => new Ref(Booth::class, 'booth-Hall jeux 01'), - 'room' => new Ref(Room::class, 'room-Hall jeux'), +// 'room' => new Ref(Room::class, 'room-Hall jeux'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => false, ], @@ -115,7 +115,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(10, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(11, 0), 'booth' => new Ref(Booth::class, 'booth-Hall jeux 01'), - 'room' => new Ref(Room::class, 'room-Hall jeux'), +// 'room' => new Ref(Room::class, 'room-Hall jeux'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => false, ], @@ -123,7 +123,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(11, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(12, 0), 'booth' => new Ref(Booth::class, 'booth-Stand désactivé'), - 'room' => new Ref(Room::class, 'room-Hall jeux'), +// 'room' => new Ref(Room::class, 'room-Hall jeux'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => false, ], diff --git a/src/Entity/TimeSlot.php b/src/Entity/TimeSlot.php index 191634b..4c1125a 100644 --- a/src/Entity/TimeSlot.php +++ b/src/Entity/TimeSlot.php @@ -24,9 +24,9 @@ class TimeSlot implements HasCreators #[ORM\JoinColumn(name: 'event_id', nullable: false)] private Event $event; - #[ORM\ManyToOne(targetEntity: Room::class)] - #[ORM\JoinColumn(nullable: false)] - private Room $room; +// #[ORM\ManyToOne(targetEntity: Room::class)] +// #[ORM\JoinColumn(nullable: false)] +// private Room $room; #[ORM\ManyToOne(targetEntity: Booth::class)] #[ORM\JoinColumn(nullable: true)] diff --git a/test.bash b/test.bash new file mode 100755 index 0000000..e821fb2 --- /dev/null +++ b/test.bash @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +set -eux + +# Recrée une BDD +symfony console doctrine:database:drop --force --no-interaction +symfony console doctrine:database:create --no-interaction + +# Place la BDD dans l'état "avant l'ajout de $room dans TimeSlot" +symfony console doctrine:migration:migrate --no-interaction DoctrineMigrations\\Version20250319080855 + +# Désactive l'ajout de "$room" +sed -i "/targetEntity: Room/s/^[^\/]/\/\//" src/Entity/TimeSlot.php +sed -i "/targetEntity: Room/{n;s/^[^\/]/\/\//}" src/Entity/TimeSlot.php +sed -i "/private Room \$room/s/^[^\/]/\/\//" src/Entity/TimeSlot.php + +# Désactive le champ "room" dans les fixtures +sed -i "s/^[^\/] *'room.*$/\/\/\0/" src/DataFixtures/TimeSlotFixture.php + +# Insère les fixtures +symfony console doctrine:fixtures:load --no-interaction + +# Exécute les autres migrations +symfony console doctrine:migration:migrate --no-interaction From a7442f9233a12d5ce12c8b1ee9dd892ff928e9fa Mon Sep 17 00:00:00 2001 From: JulienSauguesEyraud Date: Wed, 29 Apr 2026 15:53:32 +0200 Subject: [PATCH 4/4] =?UTF-8?q?corrections=20demand=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DataFixtures/TimeSlotFixture.php | 22 +++++++++++----------- src/Entity/TimeSlot.php | 6 +++--- test.bash | 24 ------------------------ 3 files changed, 14 insertions(+), 38 deletions(-) delete mode 100755 test.bash diff --git a/src/DataFixtures/TimeSlotFixture.php b/src/DataFixtures/TimeSlotFixture.php index 11d2a0f..250fbfe 100644 --- a/src/DataFixtures/TimeSlotFixture.php +++ b/src/DataFixtures/TimeSlotFixture.php @@ -43,7 +43,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+100 days'))->setTime(1, 0), 'endsAt' => (new \DateTimeImmutable('+100 days'))->setTime(2, 0), 'booth' => new Ref(Booth::class, 'booth-Table face pôle JdR 1'), -// 'room' => new Ref(Room::class, 'room-Hall principal'), + 'room' => new Ref(Room::class, 'room-Hall principal'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -51,7 +51,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+100 days'))->setTime(2, 0), 'endsAt' => (new \DateTimeImmutable('+100 days'))->setTime(3, 0), 'booth' => new Ref(Booth::class, 'booth-Table face pôle JdR 1'), -// 'room' => new Ref(Room::class, 'room-Hall principal'), + 'room' => new Ref(Room::class, 'room-Hall principal'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -59,7 +59,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+100 days'))->setTime(3, 0), 'endsAt' => (new \DateTimeImmutable('+100 days'))->setTime(4, 0), 'booth' => new Ref(Booth::class, 'booth-Table face pôle JdR 1'), -// 'room' => new Ref(Room::class, 'room-Hall principal'), + 'room' => new Ref(Room::class, 'room-Hall principal'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -67,7 +67,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+100 days'))->setTime(4, 0), 'endsAt' => (new \DateTimeImmutable('+100 days'))->setTime(5, 0), 'booth' => new Ref(Booth::class, 'booth-Table face pôle JdR 1'), -// 'room' => new Ref(Room::class, 'room-Hall principal'), + 'room' => new Ref(Room::class, 'room-Hall principal'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -75,7 +75,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+100 days'))->setTime(6, 0), 'endsAt' => (new \DateTimeImmutable('+100 days'))->setTime(7, 30), 'booth' => new Ref(Booth::class, 'booth-Hall jeux 01'), -// 'room' => new Ref(Room::class, 'room-Hall jeux'), + 'room' => new Ref(Room::class, 'room-Hall jeux'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -83,7 +83,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(3, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(7, 0), 'booth' => new Ref(Booth::class, 'booth-Public'), -// 'room' => new Ref(Room::class, 'room-Scène'), + 'room' => new Ref(Room::class, 'room-Scène'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -91,7 +91,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(3, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(7, 0), 'booth' => new Ref(Booth::class, 'booth-Public'), -// 'room' => new Ref(Room::class, 'room-Scène'), + 'room' => new Ref(Room::class, 'room-Scène'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -99,7 +99,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(7, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(8, 0), 'booth' => new Ref(Booth::class, 'booth-Table proto 1'), -// 'room' => new Ref(Room::class, 'room-Salle entresol'), + 'room' => new Ref(Room::class, 'room-Salle entresol'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => true, ], @@ -107,7 +107,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(7, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(9, 0), 'booth' => new Ref(Booth::class, 'booth-Hall jeux 01'), -// 'room' => new Ref(Room::class, 'room-Hall jeux'), + 'room' => new Ref(Room::class, 'room-Hall jeux'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => false, ], @@ -115,7 +115,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(10, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(11, 0), 'booth' => new Ref(Booth::class, 'booth-Hall jeux 01'), -// 'room' => new Ref(Room::class, 'room-Hall jeux'), + 'room' => new Ref(Room::class, 'room-Hall jeux'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => false, ], @@ -123,7 +123,7 @@ public static function getStaticData(): array 'startsAt' => (new \DateTimeImmutable('+101 days'))->setTime(11, 0), 'endsAt' => (new \DateTimeImmutable('+101 days'))->setTime(12, 0), 'booth' => new Ref(Booth::class, 'booth-Stand désactivé'), -// 'room' => new Ref(Room::class, 'room-Hall jeux'), + 'room' => new Ref(Room::class, 'room-Hall jeux'), 'event' => new Ref(Event::class, 'event-TDC 2025'), 'open' => false, ], diff --git a/src/Entity/TimeSlot.php b/src/Entity/TimeSlot.php index 4c1125a..ddb63a2 100644 --- a/src/Entity/TimeSlot.php +++ b/src/Entity/TimeSlot.php @@ -24,9 +24,9 @@ class TimeSlot implements HasCreators #[ORM\JoinColumn(name: 'event_id', nullable: false)] private Event $event; -// #[ORM\ManyToOne(targetEntity: Room::class)] -// #[ORM\JoinColumn(nullable: false)] -// private Room $room; + #[ORM\ManyToOne(targetEntity: Room::class)] + #[ORM\JoinColumn(nullable: false)] + private Room $room; #[ORM\ManyToOne(targetEntity: Booth::class)] #[ORM\JoinColumn(nullable: true)] diff --git a/test.bash b/test.bash deleted file mode 100755 index e821fb2..0000000 --- a/test.bash +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -set -eux - -# Recrée une BDD -symfony console doctrine:database:drop --force --no-interaction -symfony console doctrine:database:create --no-interaction - -# Place la BDD dans l'état "avant l'ajout de $room dans TimeSlot" -symfony console doctrine:migration:migrate --no-interaction DoctrineMigrations\\Version20250319080855 - -# Désactive l'ajout de "$room" -sed -i "/targetEntity: Room/s/^[^\/]/\/\//" src/Entity/TimeSlot.php -sed -i "/targetEntity: Room/{n;s/^[^\/]/\/\//}" src/Entity/TimeSlot.php -sed -i "/private Room \$room/s/^[^\/]/\/\//" src/Entity/TimeSlot.php - -# Désactive le champ "room" dans les fixtures -sed -i "s/^[^\/] *'room.*$/\/\/\0/" src/DataFixtures/TimeSlotFixture.php - -# Insère les fixtures -symfony console doctrine:fixtures:load --no-interaction - -# Exécute les autres migrations -symfony console doctrine:migration:migrate --no-interaction