2
0
forked from Wavyzz/dolibarr
Commit Graph

429 Commits

Author SHA1 Message Date
Laurent Destailleur
d6480594af Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2024-07-02 02:09:25 +02:00
Laurent Destailleur
6259d02042 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-07-02 02:08:10 +02:00
Pichi1966
e79f18a636 FIX ASSET: annual depreciation starting year (Again ;-)) #26084 (#30040)
* FIX ASSET: annual depreciation starting year (Again ;-)) #26084

FIX Update asset.class.php
This is an old issue that has been already fixed by 
https://github.com/Dolibarr/dolibarr/pull/26084

I tested it several times and it works.

* Update asset.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-07-02 02:06:54 +02:00
Laurent Destailleur
66f4562300 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-05-23 14:50:17 +02:00
Laurent Destailleur
a854e58905 FIX Missing $param in hook call for list 2024-05-23 14:41:56 +02:00
Laurent Destailleur
458ffdb23e css 2024-05-09 18:15:57 +02:00
Frédéric FRANCE
d0830b3159 fix phpstan (#29602)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix travis

* fix phpstan

* fix phpstan

* fix phan

* 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 travis

* fix phpstan

* fix phpstan

* fix phpstan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-05-05 00:34:19 +02:00
Frédéric FRANCE
b0695abca9 fix phan (#29591)
* fix phan

* fix typos and translations

* fix phan remove code doing nothing

* fix phan remove code doing nothing

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-05-03 18:01:17 +02:00
Laurent Destailleur
0b9bd5408b Debug v20: Encapsulate the feature using leaflet/geophp into a constant
MAIN_USE_GEOPHP. Fix webportal module.
2024-05-03 02:39:35 +02:00
Frédéric FRANCE
82d63247d7 fix phpstan pgsql.class.php (#29511)
* fix phpstan pgsql.class.php

* Update Database.interface.php

* fix phan

fix phan

fix phan

* fix phan

* fix phan

* fix phan

* fix phan

fix phan

fix phan

fix phan

fix phan

* fix phan

* fix phan

* fix phan

* fix phan
2024-04-27 22:01:34 +02:00
Laurent Destailleur
fd9475be03 Use same doc comment eveywhere. 2024-04-07 12:26:27 +02:00
Frédéric FRANCE
7cf6a0821f fix phpdoc for ismultientitymanaged (#29245)
* fix phpdoc

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-04-06 17:38:39 +02:00
Laurent Destailleur
38fb00489d PHPDoc 2024-04-05 13:44:59 +02:00
MDW
04c3e80fc5 Fix typing 2024-03-29 18:26:48 +01:00
Laurent Destailleur
13e903aca4 Clean use of $_POST 2024-03-28 20:44:51 +01:00
MDW
1b66890b30 Force typing (phan) for typing checks 2024-03-27 10:18:02 +01:00
Laurent Destailleur
7b0177a84d Move to getDolGlobalString 2024-03-22 00:37:56 +01:00
MDW
b6ac5dcf76 Fix $mybool |=... which is binary op, not boolean op
# Fix $mybool |=... which is binary op, not boolean op

This fixes PhanTypeInvalidLeftOperandOfBitwiseOp.
Replace $var |= ... with $var = ... || $var .
Add cast before ... when needed (@include does not always return bool).
|= always evaluates expression, there for || $var, not $var ||
2024-03-21 13:44:57 +01:00
MDW
81d9e8aa01 Fix $mybool |=... which is binary op, not boolean op
# Fix $mybool |=... which is binary op, not boolean op

This fixes PhanTypeInvalidLeftOperandOfBitwiseOp.
Replace $var |= ... with $var = $var || ... .
Add cast before ... when needed (@include does not always return bool).
2024-03-21 13:44:56 +01:00
MDW
fd9d48faac Fix phpstan CommonObject->fields - notnull is optional field 2024-03-19 00:32:00 +01:00
Laurent Destailleur
de58435ef1 FIX: if we stop for security purpose, we must exit a non zero value. 2024-03-16 23:08:15 +01:00
Laurent Destailleur
310b74960e Fight against ucfirst to get a className. 2024-03-16 22:26:24 +01:00
Laurent Destailleur
e8596c61c3 Fix phan 2024-03-16 22:18:58 +01:00
Laurent Destailleur
90172fba83 Code simpler 2024-03-16 22:00:55 +01:00
Laurent Destailleur
87388d7dab Debug v20 2024-03-16 21:33:55 +01:00
Laurent Destailleur
eececbe72b More secured parameter for $tmpobjectkey 2024-03-16 17:34:58 +01:00
Laurent Destailleur
e994d6650f Fix regression in GETPOST limit 2024-03-16 11:41:00 +01:00
Laurent Destailleur
57d826e261 Merge pull request #28889 from mdeweerd/fix/PhanTypeMismatchArgumentInternalReal
Fix & enable PhanTypeMismatchArgumentInternalReal
2024-03-16 11:05:20 +01:00
MDW
7c9e6d09c3 Fix tmpobjectkey test 2024-03-15 23:58:19 +01:00
Laurent Destailleur
79aa9fb1f1 Code simpler 2024-03-15 20:29:21 +01:00
Laurent Destailleur
28269b1a0a Clean code for #28785 2024-03-15 20:26:22 +01:00
MDW
23785393a3 Add csslist to json keys 2024-03-15 03:55:52 +01:00
MDW
dfd1dfff9c Fix PhanTypeMismatchPropertyDefault 2024-03-15 01:23:08 +01:00
MDW
74c846e114 Fix PhanTypeMismatchPropertyDefault 2024-03-15 01:23:07 +01:00
MDW
8e664aa0e1 Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify) 2024-03-14 19:47:14 +01:00
MDW
ac23e322e2 Fix PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y" (Simplify) 2024-03-14 19:47:13 +01:00
MDW
b79e5638a9 Qual: Fix PhanTypeExpectedObjectOrClassName by testing on classname
# Qual: Fix PhanTypeExpectedObjectOrClassName by testing on classname

PhanTypeExpectedObjectOrClassName should be fixed by testing that the classname is not
empty.
2024-03-12 18:40:00 +01:00
Laurent Destailleur
74b8162d22 Merge pull request #28700 from mdeweerd/urlencode/fixuptype
Fix: Ensure the argument type for urlencode is string
2024-03-12 14:43:41 +01:00
MDW
88d59896ec Qual: 'enabled' in fields can be string ('isModEnabled(...)')
# Qual: 'enabled' in fields can be string ('isModEnabled(...)')

Update PHPdoc to allow that enabled is a string
2024-03-12 13:38:08 +01:00
MDW
622a32b2bb Fix: Repeat fields typing in CommonClass children
# Fix: Repeat fields typing in CommonClass children

phpstan needs typing to be 'co-variant' and therefore typing must be repeated as
the method is not to initialise the property in the constructor, but to override
the proparty by a 'local' definition in the child class
2024-03-11 17:38:44 +01:00
MDW
4740562141 Fix: Repeat fields typing in CommonClass children
# Fix: Repeat fields typing in CommonClass children

phpstan needs typing to be 'co-variant' and therefore typing must be repeated as
the method is not to initialise the property in the constructor, but to override
the proparty by a 'local' definition in the child class
2024-03-11 17:38:42 +01:00
MDW
67d01e2a9b Fix: Repeat fields typing in CommonClass children
# Fix: Repeat fields typing in CommonClass children

phpstan needs typing to be 'co-variant' and therefore typing must be repeated as
the method is not to initialise the property in the constructor, but to override
the proparty by a 'local' definition in the child class
2024-03-11 17:38:40 +01:00
MDW
66b7f3b0e3 Fix: Ensure string type for urlencode() 2024-03-09 16:52:59 +01:00
MDW
12fe3dd647 Fix: Ensure string type for urlencode() 2024-03-09 16:52:58 +01:00
MDW
d116934301 Fix: Initialise array variables before assigning fields (#28725)
* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields

* Fix: Initialise array variables before assigning fields
2024-03-09 02:43:57 +01:00
MDW
3d0a85608b Qual: Fix and enable alias deprecation detection (#28716)
* Qual: Ignore some false positives for deprecated functions

# Qual: Ignore some false positives for deprecated functions

The Phan Deprecation Plugin for internal functions has mixed up some
mail functions and lists them as deprecated, this ignores that

* Qual: Enable detection and fixing of internal deprecations

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Update codespell lines ignore list after format

# Qual: Update codespell lines ignore list after forma

Done using latest library, so also adds some exceptions that are needed
in the future;

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-08 21:34:18 +01:00
Laurent Destailleur
7866ee472b QUAL Clean code around dol_eval use 2024-03-06 17:07:24 +01:00
Laurent Destailleur
beba98be64 Fix phan 2024-03-05 16:28:59 +01:00
Laurent Destailleur
ce010a54c7 Clean code and prepare a more powerfull phpunit check for sql forging. 2024-03-05 00:22:12 +01:00
Frédéric FRANCE
fba15178eb all initAsSpecimen return int (#28577)
* all initAsSpecimen return int

* all initAsSpecimen return int

* all initAsSpecimen return int
2024-03-02 16:38:35 +01:00