* 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 88a06164d1c96994b259729885f267ee66434b79.
---------
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 ).
* Qual: Refactor for distinction between encodings
# Qual: Refactor for distinction between encodings
Renamed path/file variable to equivalents with prefix os_ and utf8.
Also added $utf8_fullpath to optimize.
* Fix: Fix mixed os_path/utf8_path
# Fix: Fix mixed os_path/utf8_path
This fixes the mixing of a os_path encoding en utf8_path encoding
by reorganising the statement order.
Also avoid a os_encode call by reusing data already available.