Commit Graph

8576 Commits

Author SHA1 Message Date
MDW
f89245b354 Qual: Fix some CommonIncoterm/DocGenerator/People typings (#30940)
* Fix extraparams property typing

* Fix argument typing

* Fix 'status' argument type in calls to dolGetButtonTitle

* Fix argument2 for price to 1 (was 2)

* Fix deliveryreceipt argument

* Fix PHPDoc dol_sort_array

* Fix range for int argument

* Fix arg type for str_pad and add some PHPDoc

* Fix natsort value for dol_sort_array

* Fix arguments on calls to dol_sort_array

* Reduce phpstan exceptions

* Qual: Add type hints for Stripe objects

# Qual: Add type hints for Stripe objects

Suggest the more specific implementation of the StripObject.

* Typing, initialisation

* Qual: Fix undeclared variables

* Update phan baseline

* Update baseline

* Qual: Add type hints for Stripe objects

# Qual: Add type hints for Stripe objects

Suggest the more specific implementation of the StripObject.

* Add PHPDoc for host class properties

* Ignore false positive (phan) for deprecated property

* Improve typing

* Update baseline
2024-09-13 03:09:23 +02:00
Laurent Destailleur
bf697f83eb Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-09-12 21:50:31 +02:00
MDW
76eaf8bd8d Qual: Fix phan notices in classes related to class using getNextValue. (#30925)
* FIX 🛟 phan

* getToolTip() can take null for $coc

* Fix uninitialized vars & arg types

* PHPDoc typing, argument fixes

* PHPDoc typing, argument fixes for AdherentType

* PHPDoc typing, argument fixes for AdherentStats

* Update baseline to enable adherent notices

* Fix PHPDoc typing in api_members

* Minor bug fixes, typing

* PHPDoc api_subscriptions

* PHPDoc Societe

* Ignore empty foreach notice

* Add initialiser

* Categorie is string, old int mode is deprecated

* Fix missing initialisations

* Fix missing initialisations adherents/note

* Fix typing (cast), initialisation of var

* Fix initialisations

* Fix argument types

* Improve array PHPDoc type

* PHPDoc array type

* PHPDoc: Improve typing

* Correct argument type to getNomUrl

* Improve typing for timespent

* Fix typing for getNextValue args

* Improve typing

* Fix typing hints contrat/card

* Update baseline

* Fix typing

* Fix extraparams property typing

* Fix argument typing

* Qual: Correct covariant type

* Impove typing for timespent

* Remove exclusion no longer matched (level 6)

---------

Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com>
2024-09-12 21:16:42 +02:00
John BOTELLA
aaa65ddf6b Fix v20 php8 patch001 (#30932)
* Fix PHP 8 notices, warninngs, fatal

* precommit
2024-09-12 21:10:01 +02:00
Laurent Destailleur
2b6af8ddfb Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-09-10 02:02:37 +02:00
Laurent Destailleur
613c25b5ff Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-09-10 02:02:16 +02:00
Laurent Destailleur
def1cfe27e Debug clone tasks 2024-09-10 01:57:46 +02:00
Laurent Destailleur
870a5248ec Trans 2024-09-10 01:33:23 +02:00
Frédéric FRANCE
fba71ab043 fix phpstan (#30893)
* fix phpstan

* fix phpstan

* fix phpstan
2024-09-10 01:02:56 +02:00
Laurent Destailleur
53684c0825 Debug v20 - export service if module product not enabled 2024-09-09 12:00:40 +02:00
Laurent Destailleur
94eac45115 Debug v20 - export service if module product not enabled 2024-09-09 12:00:18 +02:00
Laurent Destailleur
8bb3f38890 Fix permission 2024-09-09 11:51:35 +02:00
MDW
32732d37d2 Qual: Improve typing in Export class (#30859)
* Update baseline

* Qual: Improve typing in Export class

* Add 'abstract' methods to help with typing

* Add some typing

* Improve typing in export modules

* Improve typing for AccountancyExport

* Qual: PHPDoc executeCLI (nullable arguments, range)

* PHPDoc for export function

* Fix $permissiontoClose -> $permissiontoclose

* PHPDoc - Improve AccountingJournal typing

* Improve export_journal tpl typing

* Improve html.formsetup typing

* Impove commonfieldsexport typing

* Improve extrafieldsinexport typing

* Fix typing, initialisation

* Fix typing intracommreport

* Ensure string in $error for CronJob
2024-09-09 03:15:26 +02:00
Frédéric FRANCE
797bfb27e0 fix phpstan (#30881)
* fix phpstan

* fix phpstan
2024-09-09 02:28:35 +02:00
Laurent Destailleur
11e965b6d4 The experimental and deprecated module WebserviceClient is completely
removed (SOAP technology is deprecated). May be replaced with the stable
module Webhook.
2024-09-07 01:50:41 +02:00
Frédéric FRANCE
eb04c5c427 fix phpstan (#30860)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-09-06 13:44:29 +02:00
Frédéric FRANCE
80d1f47d4d fix ignored phpstan (most of expects string, int given) (#30649)
* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

fix ignored phpstan

fix ignored phpstan

fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

fix ignored phpstan

fix ignored phpstan

fix ignored phpstan

fix ignored phpstan

fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* fix ignored phpstan

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* more ignore

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-09-05 16:05:37 +02:00
Laurent Destailleur
227e13fe31 Fix phan 2024-09-04 22:27:18 +02:00
Laurent Destailleur
001dc9378f Fix phan 2024-09-04 22:10:33 +02:00
Laurent Destailleur
310d858978 Fix phan warnings 2024-09-04 21:55:59 +02:00
Laurent Destailleur
93fa554583 Fix phan 2024-09-04 20:17:31 +02:00
Laurent Destailleur
37922f464f Fix phan 2024-09-04 19:44:01 +02:00
Laurent Destailleur
c98273fed1 Fix phan error; Currently getExample has different signature defined
into parents
2024-09-03 17:59:06 +02:00
Laurent Destailleur
8ac8451314 Typo type 2024-09-03 17:01:12 +02:00
Laurent Destailleur
c6ab1583d9 Hide warning when using a profile with not available fields 2024-09-03 16:54:07 +02:00
Laurent Destailleur
adfefb010f Fix PHP Fatal error: Can't inherit abstract function
CommonNumRefGenerator::getExample() (previously declared abstract in
ModeleProductCode)
2024-09-03 09:55:28 +02:00
Laurent Destailleur
16bb994698 Debug v21 2024-09-02 13:55:08 +02:00
Laurent Destailleur
14d5b4bcc3 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-09-02 12:14:51 +02:00
Laurent Destailleur
aa096719b2 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2024-09-02 11:18:06 +02:00
boudet jean pascal
10924547ea FIX : attached file on first page load (#30694)
* fix attached file on first page load

* PRE-COMMIT

* set mode init

* Update 18.0.0-19.0.0.sql

Signed-off-by: Laurent Destailleur <eldy@destailleur.fr>

---------

Signed-off-by: Laurent Destailleur <eldy@destailleur.fr>
Co-authored-by: jpb <jean-pascal.boudet@atm-consulting>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-01 15:13:53 +02:00
Laurent Destailleur
20270b56af Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-08-31 19:44:45 +02:00
Alexandre SPANGARO
e3384305b8 NEW Add export for thirdparty bank accounts (#30807) 2024-08-31 19:36:08 +02:00
Laurent Destailleur
815352e8f9 Fix permission on delete token 2024-08-31 19:26:46 +02:00
Laurent Destailleur
650ecc23bd Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-08-31 12:14:06 +02:00
Laurent Destailleur
264534afba Debug v20 2024-08-31 12:12:59 +02:00
Laurent Destailleur
c8e2b537c6 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-08-30 16:44:24 +02:00
Laurent Destailleur
f758ef89f9 Debug v20 2024-08-30 15:42:36 +02:00
Alexandre SPANGARO
7b0efa03e3 NEW Invoice line import - fk_product can be a ref (#30795) 2024-08-29 17:30:54 +02:00
MDW
c496e84916 Qual: Fix phan issues related to getNextValue() notices (#30747)
* Qual: 🛟 Fix reference to $db with $this->db

# Qual: reference to $db with $this->db

$db was undeclared, use $this->db.

* Fix suspected issue with environment max size and md5sum working on limited files

* Qual: Fix LDAP typing

* Qual: Fix some phan typing related to getNextValue()

# Qual: Fix some phan typing related to getNextValue()

This fixes a few typings in relation to getNextValue().

* Update phan baseline

* PHPDoc: set arguments as nullable (+update array types)

* Improve PHPDoc

* Force toselect type to int[]

* Enable all phan notices on actions_massactions.inc.php

* Test was wrong, can not count when it's not an array

* Update baseline

* Remove ignore for notice that no longer exists

* Update baseline

* Fix format argument

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-29 15:01:42 +02:00
MDW
a8367a6cd8 Qual: Fix getNextValue related phan notices (part2) (#30752)
* Qual: 🛟 Fix reference to $db with $this->db

# Qual: reference to $db with $this->db

$db was undeclared, use $this->db.

* Fix suspected issue with environment max size and md5sum working on limited files

* Qual: Fix LDAP typing

* Qual: Fix getNextValue related phan notices (part2)

* Update baseline

* Qual: Fix phan notice
2024-08-29 13:34:24 +02:00
Laurent Destailleur
8ab740a95f Export inventory 2024-08-29 10:46:10 +02:00
MDW
e6630cd7d1 Qual: Improve dol_syslog (#30782)
* Qual: 🛟 Fix reference to $db with $this->db

# Qual: reference to $db with $this->db

$db was undeclared, use $this->db.

* Fix suspected issue with environment max size and md5sum working on limited files

* Qual: Fix LDAP typing

* Qual: Improve dol_syslog

# Qual: Improve dol_syslog

The changes:
- Keep the log file open for less time (better for concurrency);
- Open the log file only to append data (no internal preparation for writing);
- Avoids re-assigning a constant array;
- Add PHPDoc information about the array parameters and return values;
- May reduce the computation of global settings;
- Result in a slight performance improvement.
2024-08-29 08:49:27 +02:00
Laurent Destailleur
ba16a13a89 export inventory 2024-08-28 22:01:07 +02:00
MDW
f5c7ca1769 Qual: Fix PhanPluginUnknownObjectMethodCall in classes with high occurence (#30754)
* Qual: Fix PhanPluginUnknownObjectMethodCall in import.php

* Qual: PHPDoc for import/export array types

* Qual: Add PHPDoc types to import.class.php

* Fix PhanPluginUnknownObjectMethodCall in stats.class.php

* Add methods expected on ModeleImport child classes

* Force imapemail type for phan

* Qual: Update phan baseline

* Qual: Fix Undefined/Undeclared phan notices in module_help

* Update baseline
2024-08-27 04:51:41 +02:00
Lucas Marcouiller
6d1d41bb9d Fix inventory export profile (#30721)
* Fix inventory export profile

* fix CI

---------

Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
2024-08-23 15:24:40 +02:00
noec764
18bf0c940e FIX: Dolibarrize DolibarrModules::insert_cronjobs() method (#24747)
* FIX: Dolibarrize DolibarrModules::insert_cronjobs() method

* Fixing style errors.

* Update DolibarrModules.class.php

---------

Co-authored-by: stickler-ci <support@stickler-ci.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-22 13:23:42 +02:00
Laurent Destailleur
ecc5f90574 Fix init cron when priority is not set. 2024-08-22 04:05:25 +02:00
MDW
d71cd352d5 Qual: Fix PhanUndeclaredMethod (#30661)
* Qual: Fix PhanUndeclaredMethod cases

* Fix PhanUndeclaredMethod cases

* Qual: Remove PhanUndeclaredMethod exceptions

* Fix spelling "disacard"

* Improve phpdoc, add abstract method to trait for typing

* Improve phpdoc typing for PHanUndeclaredMethod

* Suppress phan notices for guarded AliasNbPages calls

* Fix return value for printFile stub

* Fix getting message from Exception

* Define dummy getAllByProducts(), typing for it.

* Fix typo in comment

* Qual: Better typing for apiService (phan)

* Test that the Generic OAuth Service is provided

* Qual: Fix getSqlArrayForStats typing

* Force modTcpdfbarcode

* Correct typing hint

* Set ModelePDFAsset typehint

* Fix ModelePDFUserGroup typing hint

* Fix phan typing hints htdocs/core/modules/printing/printgcp.modules.php

* Fix write_file in ModelePDFStock*

* Update printsheet.php

* Adjust typing hint for barcode generator

* Update printsheet.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-19 02:05:27 +02:00
MDW
b0087aaf61 Qual: Enable phan on modulebuilder (#30652)
* Allow null for buyer, and force '' for  in printObjectLine(s)

* Allow null for Contact in show_actions_done

* Qual: Enable phan on modulebuilder

# Qual: Enable phan on modulebuilder

Most files of the modulebuilder template can be checked as regular files.
It will help improve the template

* Update baseline (enable modulebuilder notices)

* Add properties that are expected to exist on modules_boxes

* Qual: Ignore false positive (phan)

* Set phpdoc type to include null on formAddObjectLine

* Qual: Fixes for modulebuilder (phan, phpstan, bugs, format)

* Fix phpcs for intracom

* Make ModeleBoxes:showBox() signature match child class's

* Fix *box::showBox() phpdoc types

* Update index.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-18 18:16:08 +02:00
Laurent Destailleur
4f93bc7d09 Try to fix fatal PHP error 2024-08-17 22:47:59 +02:00