* ci: Automatically determine version for upgrade sequence
This automatically determines the version for the upgrade process
to help avoid editing the scripot on version upgrades.
* Include filefunc.inc.php to md5sum, remove old som computation
* Qual: 🛟 Fix reference to $db with $this->db
# Qual: reference to $db with $this->db
$db was undeclared, use $this->db.
* Qual: Fix LDAP typing
* Fix suspected issue with environment max size and md5sum working on limited files
* Correct typing hint for email_date
* Qual: 🛟 Fix reference to $db with $this->db
# Qual: reference to $db with $this->db
$db was undeclared, use $this->db.
* Fix suspected issue with environment max size and md5sum working on limited files
* Qual: Fix LDAP typing
* Qual: Improve dol_syslog
# Qual: Improve dol_syslog
The changes:
- Keep the log file open for less time (better for concurrency);
- Open the log file only to append data (no internal preparation for writing);
- Avoids re-assigning a constant array;
- Add PHPDoc information about the array parameters and return values;
- May reduce the computation of global settings;
- Result in a slight performance improvement.
* Fix script generating trailing whitespace
* Add nusoap as a stub for better analysis
* Qual: Return type for fetch_name_optionals_label to fix phan message
* Qual: Enable Phan Rules and update baseline
# Qual: Enable Phan Rules and update baseline
This enables all of the rules that are currently also
enabled for cti, but sets the baseline to ignore the
exceptions already present.
This will help detect exceptions added by code modifications
if the rule is not ignored for the given file.
# 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
# Fix: Make all 'relative paths' absolute
The phpcs ruleset xml file's relative exclude patterns are relative to
the filename(s) provided on the command line.
Hence with partial verifications, the path exclusion does not function
as we would like.
Removing the relative-path attribute from the patterns the exclusion
works.
At the same time, the patterns were optimized and a comment was added.
* Dev: Add setup scripts for phpunit/database
# Dev: Add setup scripts for phpunit/database
Some scripts that helped to setup some unit testing.
* NEW Add Windows ci workflow
# NEW Add Windows ci workflow
This adds a workflow to execute ci on a windows platform
* Disable open_basedir for now, to test effect
* Qual: Exclude documents directory from codespell
# Qual: Exclude documents directory from codespell
Documents directory may be present during development (unit tests).
Do not check spelling there
* Qual: Add codespell exceptions
# Qual: Add codespell exceptions
Add new exceptions to codespell (var identified as misspelling).
* Qual: Lower severity on php-cs messages that should not block (#28072)
# Qual: Lower severity on php-cs messages that should not block
Some warning messages result in php-cs having an exit code of 2 and others
only have an exit ocde of 1. When the exit code is 2, the warnings are fixable
by php-cbf.
In order to be able to filter on the warnings in the github ci flow, but still
show them in the travis flow, I lower the level of the warnings that should not
be blocking to 4.
At the same time, the php-cs configuration in pre-commit now requires that the
severity is minimum 5 to show the message (level 5 is the default for all warnings
and errors).
So this will limit the warning messages to the ones that should result in a failing
ci action. If any new cases are discovered, they should also be lowered in the
php-cs configuration file.
* Qual: ci: Run pre-commit/php-cs with cache (#28079)
This adds a hook to .pre-commit-config.yaml and updates the workflow
to run php-cs with cache when it is run for all files.
When running on changed files only, the cache is not useful.
The php-codesniffer ruleset.xml was cleaned up (duplicates removal/formatted)
This adds a hook to .pre-commit-config.yaml and updates the workflow
to run php-cs with cache when it is run for all files.
When running on changed files only, the cache is not useful.
The php-codesniffer ruleset.xml was cleaned up (duplicates removal/formatted)
# Qual: Lower severity on php-cs messages that should not block
Some warning messages result in php-cs having an exit code of 2 and others
only have an exit ocde of 1. When the exit code is 2, the warnings are fixable
by php-cbf.
In order to be able to filter on the warnings in the github ci flow, but still
show them in the travis flow, I lower the level of the warnings that should not
be blocking to 4.
At the same time, the php-cs configuration in pre-commit now requires that the
severity is minimum 5 to show the message (level 5 is the default for all warnings
and errors).
So this will limit the warning messages to the ones that should result in a failing
ci action. If any new cases are discovered, they should also be lowered in the
php-cs configuration file.
# Qual: Ignore most shellcheck annotations, fix some
Most shellcheck annotations are ignored - this is to make sure that ci
can work for existing scripts.
Some fixes were applied.
pre-commit script was beautyfied by temporarily suppressing the IFS= expression on 2 lines.
* Qual: Spelling outside htdocs
# Qual: Fix spelling of files not in the htdocs subdirectory.
Highlight:
- Change in email test from unvalid to invalid that should give the same test result.
* Update Dolibarr-soapui-project.xml
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
# Fix: Make some scripts with shebang executable in git.
Make some scripts executable according to git.
This can help running them after checkout.
It also helps with future automatic checks.