2
0
forked from Wavyzz/dolibarr
Commit Graph

95 Commits

Author SHA1 Message Date
Frédéric FRANCE
e81d5378cd clean code contract class (#35245)
* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code contract class

* clean code

* clean code

* clean code

* clean code

* clean code

* fix typo

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix
2025-09-10 11:13:18 +02:00
Frédéric FRANCE
a1d7b11324 fix doc (#35196) 2025-09-03 12:54:17 +02:00
ldestailleur
929dbe94e7 Fix CI warnings 2025-08-09 16:53:09 +02:00
ldestailleur
8a89cc3f04 FIX phpunit 2025-03-24 20:52:13 +01:00
kkhelifa-opendsi
8275627d4e Add "Type" on webhook target card for determine if the trigger is blocking or not (and in the futur possibly asynchrone) (#33499) 2025-03-19 15:24:18 +01:00
Lucas Marcouiller
00482b7e3d Merge branch 'develop' into New-status-for-webhook 2025-02-11 14:25:30 +01:00
Laurent Destailleur (aka Eldy)
732f97d73c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-02-05 00:40:06 +01:00
Lucas Marcouiller
1b8a9c2431 Merge branch 'develop' into New-status-for-webhook 2025-01-09 10:48:18 +01:00
Laurent Destailleur (aka Eldy)
de321e8f01 Fix typo 2025-01-09 02:01:49 +01:00
Laurent Destailleur (aka Eldy)
c0250e4c91 FIX CVE-2024-55227 CSRF when MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY is
on (hidden option not on by default)
2025-01-08 17:41:45 +01:00
MDW
ec2a1928ba Qual: Update fields phpdoc to include fields that are defined/used in some cases
# Qual: Update fields phpdoc to include fields that are defined/used in some cases

comment, copytoclipboard, autofocusoncreated are documented and used in some cases for the
$fields definition
2024-12-05 02:36:50 +01:00
Hystepik
3c5b397439 Fix CI 2024-11-17 10:16:05 +01:00
Hystepik
0db9999fa1 phpdoc modifications 2024-11-15 09:33:38 +01:00
Hystepik
0f539e4b09 webhook manual trigger 2024-11-14 21:08:06 +01:00
Hystepik
4d13b2b9a7 fix some unwanted code 2024-11-14 13:27:09 +01:00
Hystepik
e3dbd3b6cf Merge branch 'develop' of github.com:Dolibarr/dolibarr into New-status-for-webhook 2024-10-14 13:06:52 +02:00
MDW
53cfbc35be Qual: Fix several phan & stan notices (#31308)
* Qual: Fix several phan & stan notices

# Qual: Fix several phan & stan notices

Several fixes in files while fixing UnknownClass notices

* Qual: Update prepare_head PHPDoc return types

# Qual: Update prepare_head PHPDoc return types

Provide detailed array return types for prepare_head functions.

* Fix new phan notice

* Better loadLangs typing and fix call to loadLangs

* Fix new issues (stats)

* Other fixes of new issues

* Qual: update phan baseline
2024-10-14 01:59:44 +02:00
Lucas Marcouiller
9bece8c380 New datastructure for webhok_target (#31363)
Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
2024-10-11 15:56:45 +02:00
Hystepik
086bbb862c New add new status to webhook 2024-10-03 15:04:27 +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
Laurent Destailleur
09b1496058 Debug module webhook 2024-09-27 16:43:02 +02:00
Lucas Marcouiller
2662725819 Fix select with text area and generalisation for update (#30794)
* Fix select with text area and generalisation for update

* fix CI

---------

Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
2024-08-29 13:32:06 +02:00
Lucas Marcouiller
94b3566ddc fix textarea with select by adding a button (#30785)
Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
2024-08-29 09:27:42 +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
MDW
54880f92cd Qual: Fix PhanTypeMismatchProperty and some other phan notices (#30542)
* Qual: Fix PhanTypeMismatchProperty and some other phan notices

* Qual: Phan fixes for BOM

* Phan - fix fields

* fixup! Qual: Phan fixes for BOM

* Fix phpstan double array keys for syslog

* Fix $fields phpdoc

* Fix phan typing issues with intermediate var and ??

* Fix phan typing issue with ?? operator

* Ignore htdocs/install/install.forced.php for git

* Qual: Revert to original code, ignore notice

When changing the method to avoid one notice type, another one
appears.  So simply ignoring this error.

* Qual: Revert to original code, ignore notice

When changing the method to avoid one notice type, another one
appears.  So simply ignoring this error.

* Update baseline

* Qual: Phan fixes for BOM

* fixup! Qual: Phan fixes for BOM

* Fix phpstan double array keys for syslog

* Qual: Revert to original code, ignore notice

When changing the method to avoid one notice type, another one
appears.  So simply ignoring this error.

* Ignore PhanTypeSuspiciousNonTraversableForeach to allow integration

* Fix typing hints (phpstan)

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-15 17:05:00 +02:00
MDW
45ed4caeb2 Qual: Enable Phan Simplify rule and fix notices (#30537)
* Qual: Phan - Enable Simplyfy expression

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Update functions2.lib.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-07 03:05:02 +02:00
Laurent Destailleur
efa186431a Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-07-06 17:51:03 +02:00
Laurent Destailleur
73d9c4a12e Debug v20 2024-07-06 16:27:23 +02:00
Frédéric FRANCE
4b275dc148 add phpdoc (#30208)
* add phpdoc

* add phpdoc

* add phpdoc

* add phpdoc

* clean phpdoc
2024-06-30 19:39:01 +02:00
Laurent Destailleur
db5ade973c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-06-25 11:18:31 +02:00
Laurent Destailleur
53ffdec9bd Fix field type url 2024-06-25 01:50:31 +02:00
Lucas Marcouiller
4c3b2a0e99 Fix webhook list of trigger to add picto of trigger codes (#30124)
Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
2024-06-22 15:52:10 +02:00
Laurent Destailleur
a618bf2ae6 Debug v20 2024-06-18 09:54:11 +02:00
Laurent Destailleur
c99075835a Add code with label 2024-05-13 12:24:12 +02:00
Laurent Destailleur
3d8541513b Init list of triggers only when we need it. Avoid Select at each
webhook.
2024-05-13 12:20:56 +02:00
Lucas Marcouiller
eac3e875ab New webhook target class multiselect trigger_codes (#29658)
* New webhook target class multiselect trigger_codes

* fix precommit

* fix CI

* try fix CI

---------

Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
2024-05-13 11:18:44 +02:00
Laurent Destailleur
94020a22c0 Doc 2024-05-13 11:06:35 +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
Laurent Destailleur
beda30c493 Debug v20 2024-04-11 10:55:42 +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
MDW
474c85825f 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:45:51 +01:00
MDW
fd9d48faac Fix phpstan CommonObject->fields - notnull is optional field 2024-03-19 00:32:00 +01:00
MDW
23785393a3 Add csslist to json keys 2024-03-15 03:55:52 +01:00
MDW
40b6210e0b Fix PhanTypeMismatchPropertyDefault 2024-03-15 03:55:43 +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
b1148cf262 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:40:35 +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
c544efec7f QUAL: Remove use of customurl filter. Must use the USF syntax. 2024-03-05 03:51:36 +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