Commit Graph

786 Commits

Author SHA1 Message Date
Laurent Destailleur
b7d7f6be3d Label 2025-12-18 14:37:34 +01:00
Laurent Destailleur
fcefef410c Compatibility with the GHSA VDP 2025-12-18 10:35:06 +01:00
Laurent Destailleur
7902e31177 Fix RSS 2025-12-16 00:24:48 +01:00
MDW
7456c119e5 Qual: Update Phan baseline and fix type mismatch in conferenceorbooth_list.php
# Qual: Update Phan baseline and fix type mismatch in conferenceorbooth_list.php

- Updated the Phan baseline to reflect the reduced number of PhanUndeclaredMethod occurrences
- Fixed a type mismatch in conferenceorbooth_list.php by changing the values from integers to strings in the editfieldkey and editfieldval functions
2025-12-13 13:46:45 +01:00
MDW
32ab4f1217 Qual: Update phan baseline 2025-12-09 13:46:55 +01:00
Laurent Destailleur
c635f5f9c5 Fix detection of security commit 2025-12-04 12:51:49 +01:00
MDW
0333daa8a8 Qual: Update PHP-CS-Fixer configuration and DolibarrModules class
- Update PHP-CS-Fixer configuration to replace deprecated 'visibility_required' rule with 'modifier_keywords'
- Update DolibarrModules class to use const instead of public const for PHP 7.0 compatibility (revert recent change)
2025-11-27 01:08:46 +01:00
Laurent Destailleur
c295be762e Fix CI 2025-11-26 21:49:07 +01:00
Laurent Destailleur
5f437d983a Debug v23 2025-11-26 19:24:25 +01:00
MDW
63a78d8c00 Qual: Add perltidy & perlcritic + updates to fix notices. (#36370)
* Qual: Add pre-commit hooks for Perl code formatting and linting

- Added perltidy hook to format Perl code
- Added perlcritic hook to lint Perl code

* Qual: Update file opening syntax in build scripts (perltidy)

The changes update the syntax for opening files in several build scripts to use the three-argument form of the `open` function, which is more secure and recommended in modern Perl practices.

* Qual: Improve file handling and add strict/warnings pragmas (perlcritic)

The changes include:
- Adding 'use strict' and 'use warnings' pragmas to enforce better coding practices
- Improving file handling by using lexical filehandles (my $IN, my $SPECFROM, etc.)
- Fixing file opening and closing operations to use proper error handling
- Updating various file operations to use the new lexical filehandles
- Fixing indentation and formatting issues in the code

* Qual: Add strict and warnings pragmas to Perl scripts (perlcritic)

The changes add 'use strict;' and 'use warnings;' pragmas
- dev/build/doxygen/dolibarr-doxygen-build.pl
- dev/build/doxygen/dolibarr-doxygen-filter.pl
- dev/build/doxygen/dolibarr-doxygen-getversion.pl
- dev/build/gource/getavatars.pl
- dev/tools/dolibarr-mysql2pgsql.pl

* Qual: Add Perl no critic pragmas (perlcritic)

- Ignore some perlcritic notices

* Qual: Improve code formatting and readability

Perltidy:

- Indentation and spacing
- Improved variable naming and alignment
- Better code organization and structure
- Enhanced readability of conditional statements and loops

These changes do not alter the functionality of the script but make it more maintainable and easier to understand.

* qual: Exclude virtualmin from perltidy and perlcritic hooks

Exclude the virtualmin directory from both perltidy and perlcritic hooks due to specific reasons mentioned in the comment. This change ensures that these hooks do not process files in the virtualmin directory.

* Qual: Add installation of perltidy and perlcritic for pre-commit workflow

This commit adds the installation of perltidy and perlcritic as part of the pre-commit hooks workflow.

* Fix: Update version detection in dolibarr-doxygen-build.pl

- Add support for detecting version from DOL_MAJOR_VERSION and DOL_MINOR_VERSION constants
- Fix undefined variable issue in version detection

* Fix: Update getavatars.pl to use HTTPS and reverse git log

- Changed the URL from HTTP to HTTPS for Gravatar
- Added `--reverse` flag to git log command to process commits in chronological order (faster)
- Updated error message to indicate .git repository instead of .git directory (+ correct test)

* fix: Correct spelling in error messages and prompts

- Fixed typo in error message for missing environment variables
- Corrected spelling in prompt for module name input
- Improved clarity in comment for target checking
2025-11-23 01:52:07 +01:00
MDW
b57495f745 Qual: Update phan baseline (#36362)
* Qual: Update Phan baseline

# Qual: Update Phan baseline

- Updated Phan baseline to reflect reduced occurrences of PhanTypeMismatchProperty and PhanUndeclaredMethod
- Fixed syntax error in card.php by adding missing closing parenthesis

* Qual: Fix PhanPluginRedundantReturnComment

# Qual: Fix PhanPluginRedundantReturnComment

- Add return type description for the getmsg method.
2025-11-22 19:49:22 +01:00
Regis Houssin
f1bad6fa69 QUAL update mysql workbench (#35955)
* QUAL update mysql workbench

* NEW add link to mac api rest client for test

* FIX add apple

* FIX Mister D

* FIX Brian is in the kitchen

* FIX modeste

* Revert "FIX modeste"

This reverts commit a268f6265f.

* FIX youhou
2025-11-20 12:01:41 +01:00
MDW
96e35c7a33 Fix: PhanTypeMismatchProperty error in invoice creation (#36323)
* 🐛 Fix PhanTypeMismatchProperty error in invoice creation

The error occurred due to incorrect type handling in the invoice creation process. The changes fix this by properly handling the subtype field as an integer. This ensures type consistency and prevents potential runtime errors.

* FIX: Correct assignment to linkedObjectsIds  in card.php

# FIX: Correct assignment to linkedObjectsIds  in card.php

Modified the structure of linkedObjectsIds to include the rowid as a key to match the property type.

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-19 14:16:00 +01:00
MDW
45184e9741 Qual: Update phan baseline (#36318)
# Qual: Update phan baseline

Remove fixed notices from exceptions.
2025-11-19 10:58:00 +01:00
MDW
1072419141 Qual: Update pre-commit hooks (#36262)
* Qual: Update pre-commit hooks

# Qual: Update pre-commit hook

Updated several pre-commit hooks as long as the new ones are not alpha or beta versions

* Qual: Fix/ignore some shellcheck issues
2025-11-17 21:50:29 +01:00
MDW
0831c65913 Qual: Update Phan baseline.txt (#36190)
#Qual: Update Phan baseline.txt

Update the Phan baseline.txt file to reflect changes in the number of occurrences of specific issues.
2025-11-09 17:58:08 +01:00
Laurent Destailleur
f355bff45a Fix scc 2025-11-04 12:50:17 +01:00
MDW
c4712cbca7 Qual: Fix PhanTypeComparisonFromArray in pertype.php and peruser.php (#36068)
# Qual: Fix PhanTypeComparisonFromArray in pertype.php and peruser.php

- Update pertype.php and peruser.php to resolve PhanTypeComparisonFromArray notices.
When an array value is set, it's already an array so comparing to '' is
useless and invalid.
- Update baseline.txt to reflect reduced occurrences of phan issues.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-02 16:56:31 +01:00
MDW
be588ee1be Qual: Update TVA intra field reference in quadri_detail.php (#36064)
- Changed reference from 'tva_intra' to 'company_tva_intra' in multiple locations
- Updated baseline.txt to reflect reduced occurrences of PhanTypeArraySuspiciousNull and PhanPluginUndeclaredVariableIsset
2025-11-02 13:06:34 +01:00
MDW
2de1724786 Qual: Fix donation notices (#36058)
* Qual: Fix missing abstract isEnabled for ModeleDon

# Qual: Fix missing abstract isEnabled for ModeleDon

* Qual: Fix donation list fields

# Qual: Fix donation list fields

Fixes PhanTypeMismatchProperty issues in don/list.php by typecasting and
adding d.ref field to query & using it.

* Fix: Fix call to ModeleDon::write_file

- Refactored write_file method in don.class.php to extraneous parameters
- Removed PhanParamTooMany warning from baseline.txt

* Qual: Remove duplicate assignment in list.php

Removed redundant assignment of projectstatic.id.

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-02 12:58:12 +01:00
MDW
6c5cd1c7b0 Fix: Uniform assign_values method signatures (#36063)
# Fix: Uniform `assign_values` method signatures

`Canvas` is calling `assign_values` with three arguments, so all methods
must have three arguments.

- Modified `actions_adherentcard_common.class.php` and `actions_contactcard_common.class.php` to add object reference parameter
- Updated `actions_adherentcard_default.class.php` and `actions_contactcard_default.class.php` to pass reference parameter to parent class
- Updated Phan baseline to reflect changes in canvas classes
2025-11-02 12:49:33 +01:00
MDW
7655c259f8 FIX: Define keyCodeForEnter before first use (takepos) (#36060)
# FIX: Define keyCodeForEnter before first use (takepos)

Move the code to get the keyCodeForEnter from the bottom of the file closer to the top.
This ensure that the variable is defined before first use.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 22:43:24 +01:00
MDW
073426d97e Qual: Fix multiple phan notices, update baseline (#36022)
* Qual: Fix phan notice with copy of attribute

* Qual: Fix phan notices with cast and updated param definition

* Qual: Fix phan notice with cast

* Qual: Update parameter type hint in utf8_check function

The parameter type hint for the $str parameter in the utf8_check function has been updated to include nullable types (string or int).

* Qual: Update User parameter type to nullable in call_trigger methods

The User parameter in call_trigger methods has been updated to be nullable to accommodate cases where the user object might not be available. This change ensures better flexibility and robustness in the codebase.

* Qual: Update phan baseline

* Qual: phpstan compatible type

* Qual: Add missing type hints for phan

- Add missing type hints for phan
- Fix indentation issues
- Improved consistency in code structure

* Qual: Update field configuration for backward compatibility

Enhanced the field configuration for backward compatibility by adding expected properties to the 'ref' field array.

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-01 17:47:28 +01:00
Frédéric FRANCE
e67651f5bc Update github_commits_byversion.sh (#35939) 2025-10-25 23:02:55 +02:00
MDW
8a84fad171 Qual: Fix misuse of Mo->error (#35841)
# Qual: Fix misuse of Mo->error

Phan identified that ++ was performed on Mo->error which is a string.
This fixes that by using a local $error variable (as in another
function).
2025-10-19 03:35:04 +02:00
MDW
66683105f1 Qual: Fix phan notices (#35827)
# Qual: Fix phan notices

Some type hints updates + correction to get week from date (action/pertype.php)
+ check that value is not null (pdf_* classes).
2025-10-18 19:10:43 +02:00
MDW
fa266e7fd7 Qual: Update phan baseline, set return value for anonymous functions (#35775)
* Qual: Update baseline regarding fixed phan notices

# Qual: Update baseline regarding fixed phan notices

* Qual: Fix phan notice (return type of anonymous function

# Qual: Fix phan notice (return type of anonymous function
2025-10-17 01:57:37 +02:00
Frédéric FRANCE
82010e7a60 fix CI payment_salary.php (#35767)
* fix CI payment_salary.php

* Update baseline.txt

* Update phpstan-baseline.neon
2025-10-15 18:56:13 +02:00
MDW
72f6422804 Qual: Update baseline, fix new notice. (#35689)
# Qual: Update baseline, fix new notice.

Fix small new notice and update baseline with regards to other fixes.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-10-09 18:18:49 +02:00
ldestailleur
38180ab43c Use the semi-detached COCOMO model 2025-10-06 13:11:38 +02:00
MDW
234fa7690f Qual: Update phan baseline & minor fix (#35638)
# Qual: Update phan baseline & minor fix

Fix new phan notice using cast of potential null value.
Remove unneeded exceptions from baseline.
2025-10-04 20:03:38 +02:00
MDW
a161c5fb67 Qual: Fix phan notices, update baseline (#35528)
# Qual: Fix phan notices, update baseline

Fix some new phan notices and update baseline
2025-09-28 13:55:39 +02:00
Frédéric FRANCE
c08c7170d2 clean code (#35427)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-22 22:25:00 +02:00
ldestailleur
6ddc9eb796 Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-09-22 11:56:18 +02:00
Frédéric FRANCE
0dde113a71 fix CI v22 (#35430) 2025-09-22 11:55:36 +02:00
MDW
decd14c735 Qual: Update phan baseline (#35405) 2025-09-20 00:45:43 +02:00
ldestailleur
4a363478ae Clean code with rector 2025-09-18 16:26:38 +02:00
ldestailleur
02ec4cf421 Test 2025-09-18 15:41:47 +02:00
ldestailleur
b30aa97ba9 Clean code 2025-09-18 15:00:47 +02:00
ldestailleur
f665a0301e Clean code 2025-09-18 14:52:39 +02:00
ldestailleur
8bd82c0b67 Clean code 2025-09-18 13:54:23 +02:00
ldestailleur
8456749135 Clean code. Removed octicons directory. 2025-09-15 14:40:34 +02:00
MDW
caf6363995 Qual: Update phan baseline (#35261)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-09-10 10:54:26 +02:00
ldestailleur
05937c43ca Update doc 2025-09-09 03:04:49 +02:00
ldestailleur
bdef24de08 Avoid false positive 2025-09-09 03:03:08 +02:00
Laurent Destailleur
68fa305655 Better detection of duplicates 2025-09-08 00:51:42 +02:00
ldestailleur
73eea16744 Better detection of duplicate 2025-09-07 19:33:22 +02:00
ldestailleur
e460fffcf9 Better detection of duplicate 2025-09-07 19:32:24 +02:00
ldestailleur
870906daac Better detection of duplicate 2025-09-07 19:28:32 +02:00
ldestailleur
e8fed29ed0 Better detection of duplicate 2025-09-07 19:20:03 +02:00