From 3c7585b3a2c22e367743e88563f835873e004890 Mon Sep 17 00:00:00 2001 From: Stephane Date: Thu, 5 Mar 2026 12:57:13 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20afficher=20les=20infos=20compl=C3=A8tes?= =?UTF-8?q?=20du=20moto=20dans=20les=20notifications=20de=20remise?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remise.php : ajout méthode getFullProductInfoByDemandeId() avec JOIN orders_item/products/brands - RemiseController.php : utilisation des infos complètes (modèle, marque, N° série, N° moteur, châssis, puissance) dans les notifications de validation/refus - OrderController.php : enrichissement du message de notification lors de la création d'une demande de remise - header_menu.php : refonte complète du design des notifications (cartes colorées par type, badge, horloge relative, point non-lu) --- .vscode/sftp.json | 2 +- README.md | 117 ++++++++++ app/Config/Kint.php | 11 + app/Controllers/OrderController.php | 14 +- app/Controllers/RemiseController.php | 19 +- app/Helpers/alerts_helper.php | 2 +- app/Models/Orders.php | 2 +- app/Models/Remise.php | 16 +- app/Views/autres_encaissements/index.php | 4 +- app/Views/demande/index.php | 4 +- app/Views/historique/index.php | 6 +- app/Views/orders/index.php | 20 +- app/Views/recouvrement/recouvrement.php | 2 - app/Views/reports/stockDetail.php | 2 - app/Views/securite/index.php | 2 - app/Views/templates/header.php | 12 +- app/Views/templates/header_menu.php | 280 ++++++++++++++++++----- composer.json | 17 +- public/index.php | 80 +++---- spark | 75 +++--- 20 files changed, 481 insertions(+), 206 deletions(-) create mode 100644 README.md diff --git a/.vscode/sftp.json b/.vscode/sftp.json index 1c5008d3..9f22622a 100644 --- a/.vscode/sftp.json +++ b/.vscode/sftp.json @@ -6,7 +6,7 @@ "username": "motorbike", "remotePath": "/home/motorbike/public_html/", "password": "IVrMDogT3XiBcrY", - "uploadOnSave": false, + "uploadOnSave": true, "useTempFile": false, "openSsh": false } diff --git a/README.md b/README.md new file mode 100644 index 00000000..9b4cf91b --- /dev/null +++ b/README.md @@ -0,0 +1,117 @@ +# MOTORBiKE + +Application web de gestion commerciale pour une entreprise de vente et maintenance de motos, developpee avec CodeIgniter 4. + +## Fonctionnalites + +- **Gestion des ventes / commandes** - creation, modification, suivi et impression de bons de livraison +- **Avances** - gestion des acomptes clients avec conversion automatique en commande et alertes d'echeance +- **Recouvrement** - suivi des paiements et creances +- **Caisse / Sortie caisse** - gestion des encaissements et decaissements avec export Excel/CSV +- **Produits** - catalogue avec attributs, categories, marques, images et import depuis Excel +- **Stocks** - affectation des produits par magasin/point de vente +- **Mecaniciens** - suivi des performances des techniciens +- **Utilisateurs & Groupes** - gestion des acces par roles et groupes de permissions +- **Magasins** - gestion multi-points de vente +- **Statistiques & Rapports** - tableaux de bord, rapports de ventes, de stock et de performances +- **Historique** - traçabilite des actions avec export +- **Notifications** - alertes en temps reel (echeances, etc.) +- **QR Code** - generation de QR codes produits +- **Securite** - validation de securite avec historique + +## Stack technique + +- **Framework** : CodeIgniter 4 (PHP 8.2+) +- **Base de donnees** : MySQL (via MySQLi) +- **Authentification** : JWT (`firebase/php-jwt`) +- **Export** : PhpSpreadsheet (`phpoffice/phpspreadsheet`) +- **Tests** : PHPUnit 9 + +## Prerequis + +- PHP >= 8.2 avec les extensions : `curl`, `intl`, `json`, `mbstring`, `mysqli` +- MySQL >= 5.7 / MariaDB +- Composer + +## Installation + +```bash +# Cloner le depot +git clone motorbike +cd motorbike + +# Installer les dependances +composer install + +# Configurer l'environnement +cp .env.example .env +# Editer .env avec vos parametres de base de donnees et URL + +# Executer les migrations +php spark migrate + +# Lancer le serveur de developpement +php spark serve +``` + +## Configuration (.env) + +```ini +CI_ENVIRONMENT = development + +app.baseURL = 'http://localhost:8080/' + +database.default.hostname = localhost +database.default.database = motorbike +database.default.username = +database.default.password = +database.default.DBDriver = MySQLi +database.default.port = 3306 +``` + +## Structure du projet + +``` +app/ + Config/ - Configuration (routes, filtres, base de donnees...) + Controllers/ - Controleurs de l'application + Database/ - Migrations et seeds + Filters/ - Filtres d'authentification (auth, loggedIn, publicCheck) + Models/ - Modeles de donnees + Views/ - Templates (dashboard, commandes, produits, rapports...) +public/ + assets/ - CSS, JS, images +``` + +## Routes principales + +| Chemin | Description | +|--------|-------------| +| `/` | Tableau de bord | +| `/login` | Authentification | +| `/orders` | Commandes / Ventes | +| `/avances` | Gestion des avances | +| `/products` | Catalogue produits | +| `/stores` | Magasins | +| `/recouvrement` | Recouvrement | +| `/sortieCaisse` | Sortie de caisse | +| `/reports` | Rapports | +| `/statistic` | Statistiques | +| `/users` | Utilisateurs | +| `/groups` | Groupes / Roles | +| `/brands` | Marques | +| `/category` | Categories | +| `/mecanicien` | Mecaniciens | +| `/historique` | Historique | + +## Tests + +```bash +composer test +# ou +php spark test +``` + +## Licence + +MIT diff --git a/app/Config/Kint.php b/app/Config/Kint.php index 7c63938b..77dacf50 100644 --- a/app/Config/Kint.php +++ b/app/Config/Kint.php @@ -20,6 +20,17 @@ use Kint\Renderer\Rich\ValuePluginInterface; */ class Kint extends BaseConfig { + public function __construct() + { + parent::__construct(); + // ini_get('xdebug.file_link_format') returns false when xdebug is not + // installed. Kint's init.php assigns this directly, making str_replace() + // throw a TypeError on PHP 8.2+. Reset to empty string when false. + if (\Kint\Kint::$file_link_format === false) { + \Kint\Kint::$file_link_format = ''; + } + } + /* |-------------------------------------------------------------------------- | Global Settings diff --git a/app/Controllers/OrderController.php b/app/Controllers/OrderController.php index ff25d39f..9d33be04 100644 --- a/app/Controllers/OrderController.php +++ b/app/Controllers/OrderController.php @@ -218,7 +218,7 @@ class OrderController extends AdminController // ======================================== // POUR DIRECTION OU DAF // ======================================== - elseif($users['group_name'] == "Direction" || $users['group_name'] == "DAF" || $users['group_name'] == "SuperAdmin" ){ + elseif(in_array($users['group_name'], ["Direction", "DAF", "SuperAdmin", "Administrator"])){ foreach ($data as $key => $value) { $date_time = date('d-m-Y h:i a', strtotime($value['date_time'])); @@ -594,12 +594,15 @@ class OrderController extends AdminController } $product_lines = []; + $product_info_lines = []; foreach ($product_data_results as $product) { if (isset($product['sku'], $product['price'])) { - $sku = $product['sku']; - $price = $product['price']; - $product_lines[] = "{$sku}:{$price}"; + $product_lines[] = $product['sku'] . ':' . $product['price']; } + $product_info_lines[] = "• " . ($product['name'] ?? '-') . + " | N° Série : " . ($product['sku'] ?? '-') . + " | N° Moteur : " . ($product['numero_de_moteur'] ?? '-') . + " | Châssis : " . ($product['chasis'] ?? '-'); } $product_output = implode("\n", $product_lines); @@ -623,7 +626,8 @@ class OrderController extends AdminController $message = "💰 Nouvelle demande de remise : {$montantFormatted} Ar
" . "Commande : {$bill_no}
" . "Store : " . $this->returnStore($users['store_id']) . "
" . - "Demandeur : {$users['firstname']} {$users['lastname']}"; + "Demandeur : {$users['firstname']} {$users['lastname']}
" . + implode("
", $product_info_lines); if (is_array($allStores) && count($allStores) > 0) { foreach ($allStores as $store) { diff --git a/app/Controllers/RemiseController.php b/app/Controllers/RemiseController.php index 1de8c00c..4b25270a 100644 --- a/app/Controllers/RemiseController.php +++ b/app/Controllers/RemiseController.php @@ -129,15 +129,28 @@ class RemiseController extends AdminController ]; if ($Remise->updateRemise($id_demande, $data)) { - $remise_product = $Remise->getProductByDemandeId($id_demande); $Notification = new NotificationController(); $ordersModel = new Orders(); $order_id = $Remise->getOrderIdByDemandeId($id_demande); - - // ✅ Récupérer les infos de la commande + + // Récupérer les infos de la commande $order_info = $ordersModel->getOrdersData($order_id); $bill_no = $order_info['bill_no'] ?? ''; $store_id = $order_info['store_id'] ?? 0; + + // Récupérer les infos complètes des motos + $products_info = $Remise->getFullProductInfoByDemandeId($id_demande); + $remise_product = ''; + foreach ($products_info as $p) { + $remise_product .= "
• Modèle : " . ($p['name'] ?? '-'); + $remise_product .= " | Marque : " . ($p['marque_name'] ?? '-'); + $remise_product .= " | N° Série : " . ($p['sku'] ?? '-'); + $remise_product .= " | N° Moteur : " . ($p['numero_de_moteur'] ?? '-'); + $remise_product .= " | Châssis : " . ($p['chasis'] ?? '-'); + if (!empty($p['puissance'])) { + $remise_product .= " | Puissance : " . $p['puissance']; + } + } // ✅ RÉCUPÉRER TOUS LES STORES $Stores = new Stores(); diff --git a/app/Helpers/alerts_helper.php b/app/Helpers/alerts_helper.php index 072b3a51..db0ee112 100644 --- a/app/Helpers/alerts_helper.php +++ b/app/Helpers/alerts_helper.php @@ -46,7 +46,7 @@ function checkDeadlineAlerts() log_message('error', "Aucun email DAF trouvé"); $db = \Config\Database::connect(); - $allGroups = $db->query("SELECT DISTINCT group_name FROM groups")->getResult(); + $allGroups = $db->query("SELECT DISTINCT group_name FROM `groups`")->getResult(); log_message('info', "Groupes disponibles: " . json_encode($allGroups)); return; diff --git a/app/Models/Orders.php b/app/Models/Orders.php index 788f9f88..0c838711 100644 --- a/app/Models/Orders.php +++ b/app/Models/Orders.php @@ -131,7 +131,7 @@ class Orders extends Model $groupName = $group['group_name'] ?? ''; // Selon le rôle - if (in_array($groupName, ['Direction', 'SuperAdmin', 'DAF'], true)) { + if (in_array($groupName, ['Direction', 'SuperAdmin', 'DAF', 'Administrator'], true)) { return $builder ->orderBy('orders.id', 'DESC') ->get() diff --git a/app/Models/Remise.php b/app/Models/Remise.php index 37ab296d..0364139a 100644 --- a/app/Models/Remise.php +++ b/app/Models/Remise.php @@ -88,9 +88,23 @@ class Remise extends Model $row = $this->select('product') ->where('id_demande', $id_demande) ->first(); - + return $row['product'] ?? null; } + + public function getFullProductInfoByDemandeId(int $id_demande): array + { + $order_id = $this->getOrderIdByDemandeId($id_demande); + if (!$order_id) return []; + + return $this->db->table('orders_item') + ->select('products.name, products.sku, products.numero_de_moteur, products.chasis, products.puissance, brands.name as marque_name') + ->join('products', 'products.id = orders_item.product_id', 'left') + ->join('brands', 'brands.id = products.marque', 'left') + ->where('orders_item.order_id', $order_id) + ->get() + ->getResultArray(); + } public function updateRemise1(int $id, $data) { diff --git a/app/Views/autres_encaissements/index.php b/app/Views/autres_encaissements/index.php index a488a716..646d4a01 100644 --- a/app/Views/autres_encaissements/index.php +++ b/app/Views/autres_encaissements/index.php @@ -284,14 +284,13 @@
-
- + @@ -303,7 +302,6 @@
ID Type MontantMode Mode Commentaire Créé par Magasin
-
diff --git a/app/Views/demande/index.php b/app/Views/demande/index.php index ee70d9fe..d5108fad 100644 --- a/app/Views/demande/index.php +++ b/app/Views/demande/index.php @@ -38,8 +38,7 @@

Gérer les remises

-
- +
@@ -53,7 +52,6 @@
#
-
diff --git a/app/Views/historique/index.php b/app/Views/historique/index.php index b67eb35d..4f783ab7 100644 --- a/app/Views/historique/index.php +++ b/app/Views/historique/index.php @@ -68,8 +68,7 @@
-
- +
@@ -82,8 +81,7 @@
Date
-
- +
diff --git a/app/Views/reports/stockDetail.php b/app/Views/reports/stockDetail.php index 4ec11551..f644db74 100644 --- a/app/Views/reports/stockDetail.php +++ b/app/Views/reports/stockDetail.php @@ -145,7 +145,6 @@
-
@@ -161,7 +160,6 @@
-
diff --git a/app/Views/securite/index.php b/app/Views/securite/index.php index f7c7c690..55b340eb 100644 --- a/app/Views/securite/index.php +++ b/app/Views/securite/index.php @@ -239,7 +239,6 @@
-
@@ -260,7 +259,6 @@
-
diff --git a/app/Views/templates/header.php b/app/Views/templates/header.php index cb64e80e..78604014 100644 --- a/app/Views/templates/header.php +++ b/app/Views/templates/header.php @@ -33,6 +33,8 @@ href=""> + + @@ -99,8 +101,14 @@ - + + + + + diff --git a/app/Views/templates/header_menu.php b/app/Views/templates/header_menu.php index 1d233fcf..3a6cc5f6 100644 --- a/app/Views/templates/header_menu.php +++ b/app/Views/templates/header_menu.php @@ -18,18 +18,17 @@ @@ -59,43 +58,178 @@ @@ -110,30 +244,73 @@ function fetchNotifications() { let notificationHTML = ''; data.forEach(notif => { - if (notif.is_read == 0) { - notificationCount++; - } + if (notif.is_read == 0) notificationCount++; const href = '/' + notif.link.replace(/^\/+/, ''); - const notifClass = notif.is_read == 0 ? "notification_item unread" : "notification_item"; - const iconHTML = notif.is_read == 0 ? '' : ''; + const isUnread = notif.is_read == 0; + + // Détecter le type à partir du début du message + let accentColor = '#7f8c8d'; + let badgeColor = '#7f8c8d'; + let typeLabel = 'Info'; + let typeIcon = 'fa-bell'; + + const msg = notif.message || ''; + if (msg.includes('💰') || msg.toLowerCase().includes('remise')) { + accentColor = '#f39c12'; badgeColor = '#e67e22'; typeLabel = 'Remise'; typeIcon = 'fa-tag'; + } else if (msg.includes('📦') || msg.toLowerCase().includes('commande')) { + accentColor = '#3498db'; badgeColor = '#2980b9'; typeLabel = 'Commande'; typeIcon = 'fa-shopping-cart'; + } else if (msg.includes('✅') || msg.toLowerCase().includes('acceptée') || msg.toLowerCase().includes('validée')) { + accentColor = '#27ae60'; badgeColor = '#219a52'; typeLabel = 'Accepté'; typeIcon = 'fa-check-circle'; + } else if (msg.includes('❌') || msg.toLowerCase().includes('refusée')) { + accentColor = '#e74c3c'; badgeColor = '#c0392b'; typeLabel = 'Refusé'; typeIcon = 'fa-times-circle'; + } else if (msg.toLowerCase().includes('livraison') || msg.toLowerCase().includes('remis')) { + accentColor = '#9b59b6'; badgeColor = '#8e44ad'; typeLabel = 'Livraison'; typeIcon = 'fa-truck'; + } + + // Formater la date lisiblement + let dateDisplay = notif.created_at || ''; + try { + const d = new Date(notif.created_at); + if (!isNaN(d)) { + const now = new Date(); + const diffMs = now - d; + const diffMn = Math.floor(diffMs / 60000); + const diffH = Math.floor(diffMn / 60); + if (diffMn < 1) dateDisplay = 'À l\'instant'; + else if (diffMn < 60) dateDisplay = diffMn + ' min'; + else if (diffH < 24) dateDisplay = diffH + 'h'; + else dateDisplay = d.toLocaleDateString('fr-FR', {day:'2-digit', month:'2-digit'}); + } + } catch(e) {} notificationHTML += ` - - - ${iconHTML} ${notif.message} - - ${notif.created_at} + +
+
+
+ + ${typeLabel} + + ${dateDisplay} +
+
${msg}
+
+ ${isUnread ? '
' : ''}
- `; }); + if (notificationHTML === '') { + notificationHTML = ''; + } + $('#notificationList').html(notificationHTML); - $('#notificationHeader').text(data.length + ' Notifications'); + + const unreadLabel = notificationCount > 0 + ? ` ${notificationCount} non lue${notificationCount > 1 ? 's' : ''}` + : ` Notifications`; + $('#notificationHeader').html(unreadLabel); if (notificationCount > 0) { $('#notificationCount').text(notificationCount).show(); @@ -143,22 +320,17 @@ function fetchNotifications() { $('#markAllAsReadBtn').hide(); } - const items = document.querySelectorAll('.notification_item'); - items.forEach(item => { + document.querySelectorAll('.notif-card').forEach(item => { item.addEventListener('click', () => { const notifId = item.dataset.id; fetch("/" + notifId, { method: "POST", headers: { "Content-Type": "application/json" } }) - .then(response => response.json()) - .then(data => { - console.log("Notification marked as read:", data); - }) - .catch(error => console.error("Error:", error)); + .then(r => r.json()) + .catch(e => console.error(e)); }); }); - }, error: function(err) { console.error('Error fetching notifications:', err); diff --git a/composer.json b/composer.json index 63d9933f..a7efbd46 100644 --- a/composer.json +++ b/composer.json @@ -1,17 +1,15 @@ { - "name": "codeigniter4/framework", + "name": "app/motorbike", "type": "project", - "description": "The CodeIgniter framework v4", - "homepage": "https://codeigniter.com", + "description": "MOTORBiKE - Application de gestion commerciale", "license": "MIT", "require": { - "php": "^7.4 || ^8.0", + "php": "^8.2", + "codeigniter4/framework": "^4.3", "ext-curl": "*", "ext-intl": "*", "ext-json": "*", "ext-mbstring": "*", - "laminas/laminas-escaper": "^2.9", - "psr/log": "^1.1", "firebase/php-jwt": "^6.11", "kint-php/kint": "5.0", "phpoffice/phpspreadsheet": "^5.0" @@ -46,7 +44,7 @@ }, "autoload": { "psr-4": { - "CodeIgniter\\": "system/" + "App\\": "app/" }, "exclude-from-classmap": [ "**/Database/Migrations/**" @@ -56,6 +54,11 @@ "test": "phpunit" }, + "config": { + "audit": { + "block-insecure": false + } + }, "support": { "forum": "http://forum.codeigniter.com/", "source": "https://github.com/codeigniter4/CodeIgniter4", diff --git a/public/index.php b/public/index.php index e3752d7c..8e834f2c 100644 --- a/public/index.php +++ b/public/index.php @@ -1,17 +1,34 @@ systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstrap.php'; - -// Load environment settings from .env files into $_SERVER and $_ENV -require_once SYSTEMPATH . 'Config/DotEnv.php'; -(new CodeIgniter\Config\DotEnv(ROOTPATH))->load(); - -// Define ENVIRONMENT -if (! defined('ENVIRONMENT')) { - define('ENVIRONMENT', env('CI_ENVIRONMENT', 'development')); -} - -// Load Config Cache -// $factoriesCache = new \CodeIgniter\Cache\FactoriesCache(); -// $factoriesCache->load('config'); -// ^^^ Uncomment these lines if you want to use Config Caching. - -/* - * --------------------------------------------------------------- - * GRAB OUR CODEIGNITER INSTANCE - * --------------------------------------------------------------- - * - * The CodeIgniter class contains the core functionality to make - * the application run, and does all the dirty work to get - * the pieces all working together. - */ - -$app = Config\Services::codeigniter(); -$app->initialize(); -$context = is_cli() ? 'php-cli' : 'web'; -$app->setContext($context); - -/* - *--------------------------------------------------------------- - * LAUNCH THE APPLICATION - *--------------------------------------------------------------- - * Now that everything is set up, it's time to actually fire - * up the engines and make this app do its thang. - */ - -$app->run(); +$paths = new Paths(); -// Save Config Cache -// $factoriesCache->save('config'); -// ^^^ Uncomment this line if you want to use Config Caching. +// LOAD THE FRAMEWORK BOOTSTRAP FILE +require $paths->systemDirectory . '/Boot.php'; -// Exits the application, setting the exit code for CLI-based applications -// that might be watching. -exit(EXIT_SUCCESS); +exit(Boot::bootWeb($paths)); diff --git a/spark b/spark index bf2b20ae..61bc572b 100644 --- a/spark +++ b/spark @@ -4,35 +4,46 @@ /** * This file is part of CodeIgniter 4 framework. * - * (c) CodeIgniter Foundation + * (c) CodeIgniter Foundation * * For the full copyright and license information, please view * the LICENSE file that was distributed with this source code. */ +use CodeIgniter\Boot; +use Config\Paths; + /* * -------------------------------------------------------------------- - * CodeIgniter command-line tools + * CODEIGNITER COMMAND-LINE TOOLS * -------------------------------------------------------------------- * The main entry point into the CLI system and allows you to run * commands and perform maintenance on your application. - * - * Because CodeIgniter can handle CLI requests as just another web request - * this class mainly acts as a passthru to the framework itself. + */ + +/* + *--------------------------------------------------------------- + * CHECK SERVER API + *--------------------------------------------------------------- */ // Refuse to run when called from php-cgi -if (strpos(PHP_SAPI, 'cgi') === 0) { +if (str_starts_with(PHP_SAPI, 'cgi')) { exit("The cli tool is not supported when running php-cgi. It needs php-cli to function!\n\n"); } -// Check PHP version. -$minPhpVersion = '7.4'; // If you update this, don't forget to update `public/index.php`. +/* + *--------------------------------------------------------------- + * CHECK PHP VERSION + *--------------------------------------------------------------- + */ + +$minPhpVersion = '8.2'; // If you update this, don't forget to update `public/index.php`. if (version_compare(PHP_VERSION, $minPhpVersion, '<')) { $message = sprintf( 'Your PHP version must be %s or higher to run CodeIgniter. Current version: %s', $minPhpVersion, - PHP_VERSION + PHP_VERSION, ); exit($message); @@ -42,12 +53,11 @@ if (version_compare(PHP_VERSION, $minPhpVersion, '<')) { error_reporting(E_ALL); ini_set('display_errors', '1'); -/** - * @var bool - * - * @deprecated No longer in use. `CodeIgniter` has `$context` property. +/* + *--------------------------------------------------------------- + * SET THE CURRENT DIRECTORY + *--------------------------------------------------------------- */ -define('SPARKED', true); // Path to the front controller define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR . 'public' . DIRECTORY_SEPARATOR); @@ -64,41 +74,14 @@ chdir(FCPATH); * and fires up an environment-specific bootstrapping. */ -// Load our paths config file +// LOAD OUR PATHS CONFIG FILE // This is the line that might need to be changed, depending on your folder structure. require FCPATH . '../app/Config/Paths.php'; // ^^^ Change this line if you move your application folder -$paths = new Config\Paths(); - -// Location of the framework bootstrap file. -require rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'bootstrap.php'; - -// Load environment settings from .env files into $_SERVER and $_ENV -require_once SYSTEMPATH . 'Config/DotEnv.php'; -(new CodeIgniter\Config\DotEnv(ROOTPATH))->load(); - -// Define ENVIRONMENT -if (! defined('ENVIRONMENT')) { - define('ENVIRONMENT', env('CI_ENVIRONMENT', 'production')); -} - -// Grab our CodeIgniter -$app = Config\Services::codeigniter(); -$app->initialize(); - -// Grab our Console -$console = new CodeIgniter\CLI\Console(); - -// Show basic information before we do anything else. -if (is_int($suppress = array_search('--no-header', $_SERVER['argv'], true))) { - unset($_SERVER['argv'][$suppress]); // @codeCoverageIgnore - $suppress = true; -} - -$console->showHeader($suppress); +$paths = new Paths(); -// fire off the command in the main framework. -$exit = $console->run(); +// LOAD THE FRAMEWORK BOOTSTRAP FILE +require $paths->systemDirectory . '/Boot.php'; -exit(is_int($exit) ? $exit : EXIT_SUCCESS); +exit(Boot::bootSpark($paths)); -- 2.39.5