From 6d7c1ed66b3b33f1cf4aeaf64136a9b6b29a5176 Mon Sep 17 00:00:00 2001 From: Alexandre Delaunay Date: Fri, 5 Dec 2025 09:43:38 +0100 Subject: [PATCH 1/5] add shared instruction for copilot usage --- .github/copilot-instructions.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/copilot-instructions.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 00000000000..e96d62da927 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,15 @@ +Follow GLPI’s latest coding standards and best practices: naming, indentation, comments, and PSR-12 compliance. +Use the GLPI framework whenever possible. +Do not use deprecated code. +Do not use PHP features older than version 7.4. +Do not use GLPI code or APIs older than version 10.0. +Never create .md or .txt files to explain changes. +Never explain what you did. +Do not add unnecessary comments or TODO notes. +Follow the MVC pattern, routing, and controllers wherever possible. +Do not create /front/ files — always use controllers and routes. +Never output raw HTML with echo; always use Twig templates. +Never execute raw SQL — always use GLPI’s ORM and database abstraction layer. +Do not ask clarification questions, except when a real choice between two technical solutions must be made. +Do not generate tests unless requested. +When generating code, always ensure it is secure and free from vulnerabilities. \ No newline at end of file From 94d528394d0757451865b7dee1c284f24bea9ce1 Mon Sep 17 00:00:00 2001 From: Alexandre Delaunay Date: Fri, 5 Dec 2025 10:02:37 +0100 Subject: [PATCH 2/5] Update .github/copilot-instructions.md Co-authored-by: Johan Cwiklinski --- .github/copilot-instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index e96d62da927..322feb5991c 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,7 +1,7 @@ Follow GLPI’s latest coding standards and best practices: naming, indentation, comments, and PSR-12 compliance. Use the GLPI framework whenever possible. Do not use deprecated code. -Do not use PHP features older than version 7.4. +Do not use PHP features older than version 8.2. Do not use GLPI code or APIs older than version 10.0. Never create .md or .txt files to explain changes. Never explain what you did. From a3911c4deea4394bff4d76f13be58049626f632a Mon Sep 17 00:00:00 2001 From: Alexandre Delaunay Date: Fri, 5 Dec 2025 10:22:29 +0100 Subject: [PATCH 3/5] front files and libraries --- .github/copilot-instructions.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 322feb5991c..5ba8d8ef0cc 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -7,9 +7,10 @@ Never create .md or .txt files to explain changes. Never explain what you did. Do not add unnecessary comments or TODO notes. Follow the MVC pattern, routing, and controllers wherever possible. -Do not create /front/ files — always use controllers and routes. +Do not create /front/ files — always use controllers and routes if possible. Never output raw HTML with echo; always use Twig templates. Never execute raw SQL — always use GLPI’s ORM and database abstraction layer. Do not ask clarification questions, except when a real choice between two technical solutions must be made. Do not generate tests unless requested. -When generating code, always ensure it is secure and free from vulnerabilities. \ No newline at end of file +When generating code, always ensure it is secure and free from vulnerabilities. +When importing libraries or packages, prefer already imported ones; if using new ones, they must be compatible with GLPI GPLv3+ License. From 91b46bfd02fe52cc9051c84724cc29a3574980b5 Mon Sep 17 00:00:00 2001 From: Alexandre Delaunay Date: Fri, 5 Dec 2025 10:42:24 +0100 Subject: [PATCH 4/5] Update .github/copilot-instructions.md Co-authored-by: Adrien Clairembault <42734840+AdrienClairembault@users.noreply.github.com> --- .github/copilot-instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 5ba8d8ef0cc..b88fe95c549 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,4 +1,4 @@ -Follow GLPI’s latest coding standards and best practices: naming, indentation, comments, and PSR-12 compliance. +Follow GLPI’s latest coding standards and best practices: naming, indentation, comments, and PER Coding Style 3.0 compliance. Use the GLPI framework whenever possible. Do not use deprecated code. Do not use PHP features older than version 8.2. From 2e3d7be595b600736004282881a8ac6718d57430 Mon Sep 17 00:00:00 2001 From: Alexandre Delaunay Date: Tue, 9 Dec 2025 15:10:05 +0100 Subject: [PATCH 5/5] Update .github/copilot-instructions.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cédric Anne --- .github/copilot-instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index b88fe95c549..4a43eddbe91 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -2,7 +2,7 @@ Follow GLPI’s latest coding standards and best practices: naming, indentation, Use the GLPI framework whenever possible. Do not use deprecated code. Do not use PHP features older than version 8.2. -Do not use GLPI code or APIs older than version 10.0. +Do not use GLPI code or APIs older than version 11.0. Never create .md or .txt files to explain changes. Never explain what you did. Do not add unnecessary comments or TODO notes.