From 221b44e3308d73cc2fd2a751b177e29cbe1fe8f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Tue, 12 Nov 2024 23:40:24 +0100 Subject: [PATCH 01/12] add phpdoc --- build/phpstan/phpstan-baseline.neon | 35 ------------------- .../core/modules/mailings/pomme.modules.php | 25 ++++++++++--- .../modules/mailings/thirdparties.modules.php | 23 ++++++++++-- .../thirdparties_services_expired.modules.php | 22 +++++++++++- 4 files changed, 61 insertions(+), 44 deletions(-) diff --git a/build/phpstan/phpstan-baseline.neon b/build/phpstan/phpstan-baseline.neon index 6616e9c1b8743..14d3ca1e634ad 100644 --- a/build/phpstan/phpstan-baseline.neon +++ b/build/phpstan/phpstan-baseline.neon @@ -10385,41 +10385,6 @@ parameters: count: 1 path: ../../htdocs/core/modules/mailings/partnership.modules.php - - - message: "#^Property mailing_pomme\\:\\:\\$require_admin has no type specified\\.$#" - count: 1 - path: ../../htdocs/core/modules/mailings/pomme.modules.php - - - - message: "#^Property mailing_pomme\\:\\:\\$require_module has no type specified\\.$#" - count: 1 - path: ../../htdocs/core/modules/mailings/pomme.modules.php - - - - message: "#^Property mailing_thirdparties\\:\\:\\$require_admin has no type specified\\.$#" - count: 1 - path: ../../htdocs/core/modules/mailings/thirdparties.modules.php - - - - message: "#^Property mailing_thirdparties\\:\\:\\$require_module has no type specified\\.$#" - count: 1 - path: ../../htdocs/core/modules/mailings/thirdparties.modules.php - - - - message: "#^Property mailing_thirdparties_services_expired\\:\\:\\$arrayofproducts has no type specified\\.$#" - count: 1 - path: ../../htdocs/core/modules/mailings/thirdparties_services_expired.modules.php - - - - message: "#^Property mailing_thirdparties_services_expired\\:\\:\\$require_admin has no type specified\\.$#" - count: 1 - path: ../../htdocs/core/modules/mailings/thirdparties_services_expired.modules.php - - - - message: "#^Property mailing_thirdparties_services_expired\\:\\:\\$require_module has no type specified\\.$#" - count: 1 - path: ../../htdocs/core/modules/mailings/thirdparties_services_expired.modules.php - - message: "#^Property mailing_xinputfile\\:\\:\\$require_admin has no type specified\\.$#" count: 1 diff --git a/htdocs/core/modules/mailings/pomme.modules.php b/htdocs/core/modules/mailings/pomme.modules.php index eecf24118870e..7597b2c2ce30a 100644 --- a/htdocs/core/modules/mailings/pomme.modules.php +++ b/htdocs/core/modules/mailings/pomme.modules.php @@ -2,6 +2,7 @@ /* Copyright (C) 2005-2011 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,11 +32,25 @@ */ class mailing_pomme extends MailingTargets { - public $name = 'DolibarrUsers'; // Identifiant du module mailing - // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found - public $desc = 'Dolibarr users with emails'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv�e - public $require_module = array(); // Module mailing actif si modules require_module actifs - public $require_admin = 1; // Module mailing actif pour user admin ou non + /** + * @var string name of mailing module + */ + public $name = 'DolibarrUsers'; + + /** + * @var string This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found + */ + public $desc = 'Dolibarr users with emails'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouvée + + /** + * @var string[] Module mailing actif si modules require_module actifs + */ + public $require_module = array(); + + /** + * @var int Module mailing actif pour user admin ou non + */ + public $require_admin = 1; /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php index 51328c6862001..583d0aec20601 100644 --- a/htdocs/core/modules/mailings/thirdparties.modules.php +++ b/htdocs/core/modules/mailings/thirdparties.modules.php @@ -3,6 +3,7 @@ * Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * This file is an example to follow to add your own email selector inside * the Dolibarr email tool. @@ -25,13 +26,29 @@ */ class mailing_thirdparties extends MailingTargets { + /** + * @var string name of mailing module + */ public $name = 'ThirdPartiesByCategories'; - // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found + + /** + * @var string This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found + */ public $desc = "Third parties (by categories)"; + + /** + * @var int + */ public $require_admin = 0; - public $require_module = array("societe"); // This module allows to select by categories must be also enabled if category module is not activated + /** + * @var string[] This module allows to select by categories must be also enabled if category module is not activated + */ + public $require_module = array("societe"); + /** + * @var string condition to enable module + */ public $enabled = 'isModEnabled("societe")'; /** @@ -47,7 +64,7 @@ class mailing_thirdparties extends MailingTargets */ public function __construct($db) { - global $conf, $langs; + global $langs; $langs->load("companies"); $this->db = $db; diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php index 4a76510e55c1e..32154603dad5d 100644 --- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php +++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * This file is an example to follow to add your own email selector inside * the Dolibarr email tool. @@ -23,13 +24,29 @@ */ class mailing_thirdparties_services_expired extends MailingTargets { + /** + * @var string name of mailing module + */ public $name = 'DolibarrContractsLinesExpired'; - // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found + + /** + * @var string This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found + */ public $desc = 'Third parties with expired contract\'s lines'; + + /** + * @var int + */ public $require_admin = 0; + /** + * @var string[] This module allows to select by categories must be also enabled if category module is not activated + */ public $require_module = array('contrat'); + /** + * @var string condition to enable module + */ public $enabled = 'isModEnabled("societe")'; /** @@ -37,6 +54,9 @@ class mailing_thirdparties_services_expired extends MailingTargets */ public $picto = 'company'; + /** + * @var array + */ public $arrayofproducts = array(); From 3d1eb7e6a5bbb32cba319ffc2988647e92913ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Tue, 12 Nov 2024 23:50:34 +0100 Subject: [PATCH 02/12] add phpdoc --- build/phpstan/phpstan-baseline.neon | 3 ++- .../mailings/advthirdparties.modules.php | 25 ++++++++++++++++--- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/build/phpstan/phpstan-baseline.neon b/build/phpstan/phpstan-baseline.neon index 72bc65639e99f..3194c7cb7fa56 100644 --- a/build/phpstan/phpstan-baseline.neon +++ b/build/phpstan/phpstan-baseline.neon @@ -15535,7 +15535,8 @@ parameters: path: ../../htdocs/core/modules/mailings/partnership.modules.php - - message: "#^Property mailing_xinputfile\\:\\:\\$require_admin has no type specified\\.$#" + message: '#^Property mailing_xinputfile\:\:\$require_admin has no type specified\.$#' + identifier: missingType.property count: 1 path: ../../htdocs/core/modules/mailings/xinputfile.modules.php diff --git a/htdocs/core/modules/mailings/advthirdparties.modules.php b/htdocs/core/modules/mailings/advthirdparties.modules.php index e7903ba6b36f3..8844c96a874f2 100644 --- a/htdocs/core/modules/mailings/advthirdparties.modules.php +++ b/htdocs/core/modules/mailings/advthirdparties.modules.php @@ -1,7 +1,8 @@ - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2024 MDW +/* Copyright (C) 2005-2010 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * This file is an example to follow to add your own email selector inside * the Dolibarr email tool. @@ -26,11 +27,24 @@ */ class mailing_advthirdparties extends MailingTargets { + /** + * @var string name of mailing module + */ public $name = 'ThirdPartyAdvancedTargeting'; - // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found + + /** + * @var string This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found + */ public $desc = "Third parties"; + + /** + * @var int + */ public $require_admin = 0; + /** + * @var string[] + */ public $require_module = array("none"); // This module should not be displayed as Selector in mailing /** @@ -38,6 +52,9 @@ class mailing_advthirdparties extends MailingTargets */ public $picto = 'company'; + /** + * @var string condition to enable module + */ public $enabled = 'isModEnabled("societe")'; From e09905319f4a7004f8ba570981ddd46089310561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Tue, 12 Nov 2024 23:57:05 +0100 Subject: [PATCH 03/12] add phpdoc --- build/phpstan/phpstan-baseline.neon | 12 ----------- .../modules/mailings/partnership.modules.php | 21 +++++++++++++++++-- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/build/phpstan/phpstan-baseline.neon b/build/phpstan/phpstan-baseline.neon index 3194c7cb7fa56..5fe602828d744 100644 --- a/build/phpstan/phpstan-baseline.neon +++ b/build/phpstan/phpstan-baseline.neon @@ -15450,18 +15450,6 @@ parameters: count: 1 path: ../../htdocs/core/modules/import/import_xlsx.modules.php - - - message: '#^Property mailing_advthirdparties\:\:\$require_admin has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../htdocs/core/modules/mailings/advthirdparties.modules.php - - - - message: '#^Property mailing_advthirdparties\:\:\$require_module has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../htdocs/core/modules/mailings/advthirdparties.modules.php - - message: '#^Property mailing_contacts1\:\:\$require_admin has no type specified\.$#' identifier: missingType.property diff --git a/htdocs/core/modules/mailings/partnership.modules.php b/htdocs/core/modules/mailings/partnership.modules.php index 0835fc313bdd5..5ef5f38db0a64 100644 --- a/htdocs/core/modules/mailings/partnership.modules.php +++ b/htdocs/core/modules/mailings/partnership.modules.php @@ -3,6 +3,7 @@ * Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * This file is an example to follow to add your own email selector inside * the Dolibarr email tool. @@ -27,12 +28,25 @@ */ class mailing_partnership extends MailingTargets { - // This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found + /** + * @var string name of mailing module + */ public $name = 'PartnershipThirdpartiesOrMembers'; + + /** + * @var string This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found + */ public $desc = "Thirdparties or members included into a partnership program"; + /** + * @var int + */ public $require_admin = 0; + /** + * @var string[] + * + */ public $require_module = array('partnership'); // This module allows to select by categories must be also enabled if category module is not activated /** @@ -40,6 +54,9 @@ class mailing_partnership extends MailingTargets */ public $picto = 'partnership'; + /** + * @var string condition to enable module + */ public $enabled = 'isModEnabled("partnership")'; @@ -50,7 +67,7 @@ class mailing_partnership extends MailingTargets */ public function __construct($db) { - global $conf, $langs; + global $langs; $langs->load('companies'); $this->db = $db; From 2e123cff09d3646fc7258791c93134c7b193a1a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Tue, 12 Nov 2024 23:57:48 +0100 Subject: [PATCH 04/12] add phpdoc --- build/phpstan/phpstan-baseline.neon | 12 ------------ htdocs/core/modules/mailings/partnership.modules.php | 8 ++++---- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/build/phpstan/phpstan-baseline.neon b/build/phpstan/phpstan-baseline.neon index 5fe602828d744..acee8db2b47bd 100644 --- a/build/phpstan/phpstan-baseline.neon +++ b/build/phpstan/phpstan-baseline.neon @@ -15510,18 +15510,6 @@ parameters: count: 1 path: ../../htdocs/core/modules/mailings/modules_mailings.php - - - message: '#^Property mailing_partnership\:\:\$require_admin has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../htdocs/core/modules/mailings/partnership.modules.php - - - - message: '#^Property mailing_partnership\:\:\$require_module has no type specified\.$#' - identifier: missingType.property - count: 1 - path: ../../htdocs/core/modules/mailings/partnership.modules.php - - message: '#^Property mailing_xinputfile\:\:\$require_admin has no type specified\.$#' identifier: missingType.property diff --git a/htdocs/core/modules/mailings/partnership.modules.php b/htdocs/core/modules/mailings/partnership.modules.php index 5ef5f38db0a64..cbfe9ec60a184 100644 --- a/htdocs/core/modules/mailings/partnership.modules.php +++ b/htdocs/core/modules/mailings/partnership.modules.php @@ -1,8 +1,8 @@ - * Copyright (C) 2005-2010 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2024 MDW +/* Copyright (C) 2018-2018 Andre Schild + * Copyright (C) 2005-2010 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2024 MDW * Copyright (C) 2024 Frédéric France * * This file is an example to follow to add your own email selector inside From a170648b42d60b54e159b1e5793da3e4fd237434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Wed, 13 Nov 2024 00:05:39 +0100 Subject: [PATCH 05/12] add phpdoc --- .github/workflows/phpstan_baseline.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/phpstan_baseline.yml b/.github/workflows/phpstan_baseline.yml index 54791225558d1..352d5cedd409c 100644 --- a/.github/workflows/phpstan_baseline.yml +++ b/.github/workflows/phpstan_baseline.yml @@ -1,9 +1,9 @@ -name: 'PHPStan' +name: 'PHPStan baseline' on: - # Every Monday we want to refresh the baseline + # Every Wednesday we want to refresh the baseline schedule: - - cron: '0 6 * * 1' + - cron: '0 6 * * 3' # We want to be able to manually refresh the baseline too workflow_dispatch: @@ -60,7 +60,8 @@ jobs: commit_email: dolibarr-bot@users.noreply.github.com commit_message: PHPStan > Update baseline target_branch: develop - pr_create: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 1 || 0 }} + # pr_create: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 1 || 0 }} + pr_create: 1 pr_title: PHPStan > Update baseline pr_reviewer: eldy pr_body: | From 1d5a44ff2f2d94408eb057dba84ec46d75a70cee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Wed, 13 Nov 2024 00:08:06 +0100 Subject: [PATCH 06/12] add phpdoc --- htdocs/core/modules/mailings/fraise.modules.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index f8e72582e53f0..5affae4cdf2bf 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2018-2023 Frédéric France + * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -42,6 +42,9 @@ class mailing_fraise extends MailingTargets public $require_module = array('adherent'); + /** + * @var string condition to enable module + */ public $enabled = 'isModEnabled("member")'; /** From f31ab567552b4c251d101c4f8d7f1a8c747e01bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Wed, 13 Nov 2024 00:13:12 +0100 Subject: [PATCH 07/12] add phpdoc --- .../modules/mailings/contacts1.modules.php | 4 ++++ .../mailings/eventorganization.modules.php | 20 ++++++++++++++----- .../core/modules/mailings/fraise.modules.php | 2 +- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index 00229230540c5..e8eca88cf4fec 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -3,6 +3,7 @@ * Copyright (C) 2005-2009 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,6 +40,9 @@ class mailing_contacts1 extends MailingTargets public $require_module = array("societe"); // Module mailing actif si modules require_module actifs public $require_admin = 0; // Module mailing actif pour user admin ou non + /** + * @var string condition to enable module + */ public $enabled = 'isModEnabled("societe")'; /** diff --git a/htdocs/core/modules/mailings/eventorganization.modules.php b/htdocs/core/modules/mailings/eventorganization.modules.php index 444b8e8402b69..528072d76e9de 100644 --- a/htdocs/core/modules/mailings/eventorganization.modules.php +++ b/htdocs/core/modules/mailings/eventorganization.modules.php @@ -1,8 +1,9 @@ - * Copyright (C) 2005-2010 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2024 MDW +/* Copyright (C) 2018-2018 Andre Schild + * Copyright (C) 2005-2010 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * This file is an example to follow to add your own email selector inside * the Dolibarr email tool. @@ -31,15 +32,24 @@ class mailing_eventorganization extends MailingTargets public $name = 'AttendeesOfOrganizedEvent'; public $desc = "Attendees of an organized event"; + /** + * @var int + */ public $require_admin = 0; - public $require_module = array(); // This module allows to select by categories must be also enabled if category module is not activated + /** + * @var string[] This module allows to select by categories must be also enabled if category module is not activated + */ + public $require_module = array(); /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png */ public $picto = 'conferenceorbooth'; + /** + * @var string condition to enable module + */ public $enabled = 'isModEnabled("eventorganization")'; diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index 5affae4cdf2bf..a551cebab4934 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2018-2024 Frédéric France - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From f2aa552b5d82de23960bc4b00f8e07542c27c31d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Wed, 13 Nov 2024 00:19:34 +0100 Subject: [PATCH 08/12] add phpdoc --- .github/workflows/phpstan_baseline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpstan_baseline.yml b/.github/workflows/phpstan_baseline.yml index 352d5cedd409c..3f03887a71c93 100644 --- a/.github/workflows/phpstan_baseline.yml +++ b/.github/workflows/phpstan_baseline.yml @@ -60,8 +60,8 @@ jobs: commit_email: dolibarr-bot@users.noreply.github.com commit_message: PHPStan > Update baseline target_branch: develop - # pr_create: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 1 || 0 }} - pr_create: 1 + pr_create: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 1 || 0 }} + # pr_create: 1 pr_title: PHPStan > Update baseline pr_reviewer: eldy pr_body: | From 943485823e983e7af3299d79531aabeb94961c60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 13 Nov 2024 11:23:48 +0100 Subject: [PATCH 09/12] test --- .github/workflows/phpstan_baseline.yml | 4 ++-- .pre-commit-config.yaml | 4 ++-- htdocs/core/class/commonobject.class.php | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/phpstan_baseline.yml b/.github/workflows/phpstan_baseline.yml index 3f03887a71c93..1ad3a0b49f728 100644 --- a/.github/workflows/phpstan_baseline.yml +++ b/.github/workflows/phpstan_baseline.yml @@ -1,9 +1,9 @@ name: 'PHPStan baseline' on: - # Every Wednesday we want to refresh the baseline + # Every Thursday we want to refresh the baseline schedule: - - cron: '0 6 * * 3' + - cron: '0 6 * * 4' # We want to be able to manually refresh the baseline too workflow_dispatch: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 01430ba721293..c2b29ef90af9d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,7 +43,7 @@ repos: - id: end-of-file-fixer # Check that there are no completely merged file conflicts - id: check-merge-conflict - stages: [commit, pre-rebase, pre-commit, pre-merge-commit] + stages: [pre-commit, pre-rebase, pre-commit, pre-merge-commit] # Check that files with shebangs have the executable bit set (in git) - id: check-executables-have-shebangs # Check that shell files are executables @@ -252,7 +252,7 @@ repos: rev: 3.1.0 hooks: - id: sqlfluff-lint - stages: [commit, manual] # manual needed for ci + stages: [pre-commit, manual] # manual needed for ci exclude: (?x)^ (dev/initdemo/mysqldump_.*\.sql |htdocs/core/menus/init_menu_auguria\.sql diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index cc406277aefae..e8a2c0986ff4c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -571,19 +571,19 @@ abstract class CommonObject public $fk_account; /** - * @var string Public note + * @var ?string Public note * @see update_note() */ public $note_public; /** - * @var string Private note + * @var ?string Private note * @see update_note() */ public $note_private; /** - * @var string + * @var ?string * @deprecated Use $note_private instead. * @see $note_private */ From b184b54bdcd0626a1e902381b9e1669b9456d2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 13 Nov 2024 11:33:58 +0100 Subject: [PATCH 10/12] test --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c2b29ef90af9d..e6953f0457828 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,7 +43,7 @@ repos: - id: end-of-file-fixer # Check that there are no completely merged file conflicts - id: check-merge-conflict - stages: [pre-commit, pre-rebase, pre-commit, pre-merge-commit] + stages: [pre-rebase, pre-commit, pre-merge-commit] # Check that files with shebangs have the executable bit set (in git) - id: check-executables-have-shebangs # Check that shell files are executables From 779eb44633300d65a5f38adbde1049cfadc9310c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 13 Nov 2024 11:44:11 +0100 Subject: [PATCH 11/12] test --- .../modules/project/task/doc/doc_generic_task_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index aeb0576cc6fdf..a20c933500a73 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -208,8 +208,8 @@ public function get_substitutionarray_tasks($task, $outputlangs, $array_key = 't 'task_public' => $task->public, 'task_date_start' => dol_print_date($task->date_start, 'day'), 'task_date_end' => dol_print_date($task->date_end, 'day'), - 'task_note_private' => $task->note_private, - 'task_note_public' => $task->note_public + 'task_note_private' => (string) $task->note_private, + 'task_note_public' => (string) $task->note_public ); // Retrieve extrafields From 5acb2b3030c8e0ce02a432eb1663ccb8b4de09e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 13 Nov 2024 12:12:19 +0100 Subject: [PATCH 12/12] test --- .github/workflows/windows-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 976a5415a4261..2179fcdbeaba4 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -57,7 +57,7 @@ jobs: id: cache uses: actions/cache/restore@v4 env: - HASH: ${{ hashFiles('htdocs/install/**') }} + HASH: ${{ hashFiles('htdocs/install/**', 'htdocs/filefunc.inc.php') }} KEY_ROOT: ${{ matrix.os }}-${{ env.ckey }}-${{ matrix.php_version }} with: # See https://github.com/actions/cache/issues/1275#issuecomment-1925217178