* NEW contact type on auto add contributor
* ADD second option
* RESTORE ticket module for external and fix constant
* GetDolGlobalInt
* Update ticket.class.php
---------
Co-authored-by: Benjamin Falière <benjamin.faliere@altairis.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Fix: Allow new & old names to check if module is loaded.
# Fix: Allow new & old names to check if module is loaded.
The method 'isModEnabled()' was already checking some modules for
their new name, but after transitioning Conf this was not working
for 'member'. Now testing for both names as 'Conf' can handle
both and deprecation will be reported.
Several issues were discovered after removing deprecated values.
* Update functions.lib.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Use address, town, zip & email from CommonPeople
* Use element & table_element from CommonObject
* Updated PHPDoc
* Deleted unused properties
* Revert "Use element & table_element from CommonObject"
This reverts commit 88a06164d1.
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Fix: Workaround for false security issue in tests
# Fix: Workaround for false security issue in tests
This is a quick workaround for the false security issues in tests
by setting the ['SELF'] variable to something that is
considered harmless
* Update windows-ci workflow
# Update windows-ci workflow
- Setup_conf.sh - Added caching feature;
- phpunit.bat - Example updated based on experience with php web server
- Provide dolibarr.log and phpunit output as artefacts.
- Convert PHPUNIT log to Github Annotations
- Setup php web server for API tests
- Enable caching sql initialisation
* Qual: Re-enable open_basedir restriction in tests
# Qual: Re-enable open_basedir restriction in tests
Using open_basedir restriction is closer to the production reality
and seemed to generate some issues on a windows development machine.
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
# Update phpunit.bat sample script and setup_conf.sh
- setup_conf.sh - Added caching feature;
- phpunit.bat - Example updated based on experience with php web server
# Qual: Optimisation in load criteria (dol_dir_list)
By moving the "$sortcriteria" conditions into the load conditions, the
comparison between strings is less frequent.
The original test can probably even be removed as it is part of load_*.
The only side-effect that I can see is with the hook, but I think
in theory there should not be a negative side-effect, only a positive
one as this tells the hook to load the data we need without relying
on the hook to make the proper interpretation of the searchcriteria.
* qual: phpstan for htdocs/salaries/class/paymentsalary.class.php
htdocs/salaries/class/paymentsalary.class.php 205 Property PaymentSalary::$amount (float) does not accept string.
htdocs/salaries/class/paymentsalary.class.php 292 Property PaymentSalary::$amount (float) does not accept string.
htdocs/salaries/class/paymentsalary.class.php 389 Property PaymentSalary::$amount (float) does not accept string.
htdocs/salaries/class/paymentsalary.class.php 565 Property PaymentSalary::$datec (int) does not accept string.
* Update paymentsalary.class.php - apply price2num() on $totalamount before testing if $totalamount==0
* typo
# Fix: Do not use exit in Testcase environment
Let tests continue in test case environment and allow identifying
the cause for what would be an exit in a production setup.
* Fix: Deprecation message for backupGlobalsBlackList
# Fix: Deprecation message for backupGlobalsBlackList
Fix the deprecation messages during the tests:
1) AdminLibTest::testVersionCompare
PHPUnit\Framework\TestCase::$backupGlobalsBlacklist is deprecated and will be removed in PHPUnit 10. Please use PHPUnit\Framework\TestCase::$backupGlobalsExcludesList instead.
* Fix: Remove backupGlobalsBlacklist/backupGlobalsExcludesList
# Fix: Remove backupGlobalsBlacklist/backupGlobalsExcludesList
The backupGlobalsBlacklist/backupGlobalsExcludesList does not seem required
and it is not documented why it is required, so remove this to simplify
the code (see https://github.com/Dolibarr/dolibarr/pull/28292#discussion_r1495116364 ).