From 8ef2eab069eb9daa0a2f25c179d321f422332d8d Mon Sep 17 00:00:00 2001 From: polo Date: Mon, 18 Aug 2025 01:04:47 +0200 Subject: bug router php < 8.4, nom et description dans le composer.json --- src/controller/ViewController.php | 2 +- src/installation.php | 4 ++-- src/router.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/controller/ViewController.php b/src/controller/ViewController.php index 69955c6..0830a5b 100644 --- a/src/controller/ViewController.php +++ b/src/controller/ViewController.php @@ -16,7 +16,7 @@ class ViewController extends AbstractBuilder public function __construct(){} - public function buildView(Request $request, EntityManager $entityManager): Response + public function buildView(EntityManager $entityManager, Request $request): Response { // accès au modèle $director = new Director($entityManager, true); diff --git a/src/installation.php b/src/installation.php index eaf2181..5adb697 100644 --- a/src/installation.php +++ b/src/installation.php @@ -107,9 +107,9 @@ function makeStartPage(EntityManager $entityManager){ $main = new Node('main', NULL, [], 3, NULL, NULL, NULL); $footer = new Node('footer', NULL, [], 4, NULL, NULL, NULL); $breadcrumb = new Node('breadcrumb', NULL, [], 2, $header, NULL, NULL); - $head_login = new Node('head', NULL, ["stop" => true, 'css_array' => ['body', 'head', 'nav'], 'js_array' => ['main']], 1, NULL, $connection, NULL); + $head_login = new Node('head', NULL, ["stop" => true, 'css_array' => ['body'], 'js_array' => ['main']], 1, NULL, $connection, NULL); $login = new Node('login', NULL, [], 1, $main, $connection, NULL); - $head_my_account = new Node('head', NULL, ["stop" => true, 'css_array' => ['body', 'head', 'nav'], 'js_array' => ['main']], 1, NULL, $my_account, NULL); + $head_my_account = new Node('head', NULL, ["stop" => true, 'css_array' => ['body'], 'js_array' => ['main']], 1, NULL, $my_account, NULL); $user_edit = new Node('user_edit', NULL, [], 1, $main, $my_account, NULL); $head_edit_menu = new Node('head', NULL, ['css_array' => ['body', 'head', 'nav', 'menu', 'foot'], 'js_array' => ['main', 'menu']], 1, NULL, $menu_paths, NULL); $bloc_edit_menu = new Node('menu', NULL, [], 1, $main, $menu_paths, NULL); diff --git a/src/router.php b/src/router.php index 238cac9..eddd199 100644 --- a/src/router.php +++ b/src/router.php @@ -40,7 +40,7 @@ if($_SERVER['REQUEST_METHOD'] === 'GET'){ } // construction d'une page - $response = new ViewController()->buildView($request, $entityManager); + $response = (new ViewController)->buildView($entityManager, $request); } -- cgit v1.2.3