Commit Graph

2357 Commits

Author SHA1 Message Date
MDW
9677a370e9 Qual: Nullable mysoc hint (#31393)
* Qual: Nullable mysoc hint

# Qual: Nullable mysoc hint

$mysoc can be nullable resulting in issues (#31387) so
it is best to detect these cases with static analysis

* Prevent null assignment
2024-10-17 01:44:54 +02:00
Laurent Destailleur
956a039082 Merge branch 'develop' of github.com:Dolibarr/dolibarr into develop 2024-10-16 20:47:12 +02:00
Laurent Destailleur
9ad71b980a NEW Can choose the zip handler to build ODT 2024-10-16 20:46:52 +02:00
Laurent Destailleur
cc3f6a8b80 Debug v21 2024-10-15 11:27:46 +02:00
Laurent Destailleur
4ae96d296d Debug v21 2024-10-15 10:57:35 +02:00
Laurent Destailleur
10c58950bb Look and feel v21 2024-10-15 10:16:48 +02:00
Laurent Destailleur
046166f483 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-10-14 21:38:12 +02:00
Laurent Destailleur
f4a76e5b73 Fix translation file header 2024-10-14 16:44:10 +02:00
Laurent Destailleur
a204862c24 Fix module builder 2024-10-07 22:54:51 +02:00
MDW
f70c945931 Qual: Fix phan/stan notices (#31271)
# Qual: Fix phan/stan notices in relation with UnknownObjectMethodCall

Fix notices in classes with UnknownObjectMethodCall notices or classes
related with these.
2024-10-05 18:55:36 +02:00
Mohamed DAOUD
4a7ad31f85 NEW Stars Field for Module Builder (#31216)
* stars field for modulebuilder

* Update commonobject.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-10-04 18:37:41 +02:00
Mohamed DAOUD
5cb2e23dcf Enhance AJAX Functionality in Module Builder (#31211)
* add ajax page for modulebuilder

* Update myobject.php

* fix phan

* add phan suppress

* Fix phan case sensitive

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-10-03 20:51:08 +02:00
MDW
42bb4fbf3e Qual: Enable & fix or ignore Invalid DimOffset (#31176)
* Qual: Enable & fix or ignore Invalid DimOffset

# Qual: Enable & fix or ignore Invalid DimOffset

The Invalid DimOffset notices occur when array keys are defined and
the index used is not amongst the known array keys.

This PR enables these notices and fixes array definitions when needed,
or ignores the notices locally if it's a false positive, or in the
baseline.txt when it does not seem to be a false positive so that
it can be fixed later

* Nullable object typing in function signature not ok for 7.0/8.4

Can't user '?User' as argument type for PHP7.0 which is required by PHP8.4.
Therefore, removing the typing specification in the function definition

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-29 21:52:31 +02:00
MDW
0da4d51003 Qual: Fix multiple phan notifications (#31151)
* Qual: Fix notifications multiple files

# Qual: Fix notifications multiple files

Fixes to files with UnknownObject notices, fixing other
notices in these files as well

* Improve boxes typing

* Qual: Extend accepted types to reduce notices

* Fix type for GET/POST arguments of GETPOST* calls
2024-09-28 12:09:35 +02:00
Laurent Destailleur
b32225283d Merge branch '20.0' of github.com:Dolibarr/dolibarr into develop 2024-09-25 22:32:36 +02:00
Frédéric FRANCE
a94cff63a7 fix phpstan (#31102)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-09-25 22:21:31 +02:00
Laurent Destailleur
e8c45ace3b Clean code 2024-09-25 19:30:37 +02:00
Laurent Destailleur
6f30d2f187 Missing param 2024-09-25 14:04:24 +02:00
Laurent Destailleur
ae6e35cc84 Look and feel v21 enhancement on smartphone 2024-09-25 02:35:56 +02:00
Laurent Destailleur
fe193baaed FIX Warning visible when it should not 2024-09-24 13:24:29 +02:00
Laurent Destailleur
950d749198 FIX Warning visible when it should not 2024-09-24 13:11:52 +02:00
Laurent Destailleur
8f54f06e12 FIX #31076 Bad position of hooks 2024-09-23 02:26:19 +02:00
Laurent Destailleur
053f799ef2 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-09-23 02:25:10 +02:00
Laurent Destailleur
74ad35dcac FIX #31076 Bad position of hooks 2024-09-23 02:24:43 +02:00
Frédéric FRANCE
000173c7b9 fix phpstan (#31075)
* 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

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-23 01:59:14 +02:00
Laurent Destailleur
f00a07e564 FIX Translation of widget label into combo 2024-09-19 13:29:07 +02:00
Frédéric FRANCE
b0b6dcc6cf FIX 🛟 phan (#30921) 2024-09-12 21:22:24 +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
Laurent Destailleur
8c6b4c9581 Debug v20 2024-09-10 16:15:11 +02:00
Laurent Destailleur
be2aa6feb3 Debug v20 2024-09-10 16:14:33 +02:00
Frédéric FRANCE
fba71ab043 fix phpstan (#30893)
* fix phpstan

* fix phpstan

* fix phpstan
2024-09-10 01:02:56 +02:00
Frédéric FRANCE
797bfb27e0 fix phpstan (#30881)
* fix phpstan

* fix phpstan
2024-09-09 02:28:35 +02:00
Frédéric FRANCE
f29e9e760f fix phpstan (#30861)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-09-06 14:02:53 +02:00
Frédéric FRANCE
80999f9a61 fix phpstan (#30871)
* fix phpstan

* fix phpstan
2024-09-06 13:47:24 +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
Laurent Destailleur
40f0173678 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-09-05 22:44:57 +02:00
Laurent Destailleur
070b17f397 Fix error management. 2024-09-05 18:27:46 +02:00
Laurent Destailleur
07546f4d7e Debug v20 2024-09-05 18:10:24 +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
8cdef1d713 NEW Activate PHPUnit with tests on permission on $action ==... 2024-09-03 16:33:02 +02:00
Laurent Destailleur
c79f72f785 Fix missing tests on permissions 2024-09-03 16:19:18 +02:00
Laurent Destailleur
c8505f9c0a Fix missing test on permissions 2024-09-01 21:04:53 +02:00
Laurent Destailleur
bc21b973ca Debug v20 2024-08-31 11:45:42 +02:00
Laurent Destailleur
a59e933d59 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-08-22 14:47:00 +02:00
Laurent Destailleur
e631ce7475 Fix sanitizing dol_openinpopup 2024-08-22 14:46:10 +02:00
MDW
ca414de526 Qual: Fix $fields related notices with Phan (#30704)
* Qual: Typing hints/ignore directives for phan notices

* Update field typing
2024-08-21 13:23:35 +02:00
HENRY Florian
d551f200f2 new: when initHook() and restrictedArea() exists always execute first initHook() (#30703) 2024-08-20 23:32:43 +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
Laurent Destailleur
9b08c48455 Fix warning 2024-08-18 18:17:04 +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