diff --git a/webapp/config/packages/doctrine.yaml b/webapp/config/packages/doctrine.yaml index 5b95b7a30b..d04de47c52 100644 --- a/webapp/config/packages/doctrine.yaml +++ b/webapp/config/packages/doctrine.yaml @@ -24,11 +24,12 @@ doctrine: #server_version: '15' orm: auto_generate_proxy_classes: true - enable_lazy_ghost_objects: false report_fields_where_declared: true validate_xml_mapping: true naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware auto_mapping: true + controller_resolver: + auto_mapping: false mappings: App: type: attribute diff --git a/webapp/src/Controller/Jury/AnalysisController.php b/webapp/src/Controller/Jury/AnalysisController.php index 56506ba77f..891bfe7453 100644 --- a/webapp/src/Controller/Jury/AnalysisController.php +++ b/webapp/src/Controller/Jury/AnalysisController.php @@ -10,6 +10,7 @@ use App\Service\StatisticsService; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Query\Expr; +use Symfony\Bridge\Doctrine\Attribute\MapEntity; use Symfony\Component\HttpKernel\Attribute\MapQueryParameter; use Symfony\Component\Security\Http\Attribute\IsGranted; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; @@ -99,6 +100,7 @@ public function teamAction(Team $team): Response #[Route(path: '/problem/{probid}', name: 'analysis_problem')] public function problemAction( + #[MapEntity(id: 'probid')] Problem $problem, #[MapQueryParameter] ?string $view = null diff --git a/webapp/src/Serializer/Shadowing/EventDataDenormalizer.php b/webapp/src/Serializer/Shadowing/EventDataDenormalizer.php index 191db01583..c95ac90a1d 100644 --- a/webapp/src/Serializer/Shadowing/EventDataDenormalizer.php +++ b/webapp/src/Serializer/Shadowing/EventDataDenormalizer.php @@ -28,7 +28,7 @@ public function denormalize( string $type, ?string $format = null, array $context = [] - ) { + ): mixed { if (!$this->supportsDenormalization($data, $type, $format, $context)) { throw new InvalidArgumentException('Unsupported data.'); } diff --git a/webapp/src/Utils/Utils.php b/webapp/src/Utils/Utils.php index 0c7033f1af..c1ec4acb9a 100644 --- a/webapp/src/Utils/Utils.php +++ b/webapp/src/Utils/Utils.php @@ -441,7 +441,7 @@ public static function printsize(int $size, int $decimals = 1): string $exact = true; for ($i = 0; $i < count($units) && $display >= $factor; $i++) { - if (($display % $factor)!=0) { + if (((int)$display % $factor)!=0) { $exact = false; } $display /= $factor;