Commit Graph

185 Commits

Author SHA1 Message Date
Laurent Destailleur
d823f3281d Update README.md 2024-11-28 11:36:13 +01:00
Laurent Destailleur
10bc40dbb6 Update README.md 2024-11-27 21:00:49 +01:00
Laurent Destailleur
cf02607742 Update README.md 2024-11-27 17:09:33 +01:00
Laurent Destailleur
6d9ac0c14f Update README.md 2024-11-27 17:09:17 +01:00
Laurent Destailleur
850f1ef143 Update README.md 2024-10-27 23:02:45 +01:00
Laurent Destailleur
a255e9b5c8 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-10-13 20:58:40 +02:00
MDW
523d472962 ci: Automatically determine version for upgrade sequence (#31344)
* 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
2024-10-13 17:29:56 +02:00
MDW
97a9e2b3b0 Fix: deprecations in repair.php & Qual: Improve ... phpunit/setup_conf.sh (#30825)
* Qual: Add force_install_createuser to setup script

* Qual: Improve dev/setup/phpunit/setup_conf.sh

# Qual: Improve dev/setup/phpunit/setup_conf.sh

- Use variables for credentials instead of repeating hardcoded values;
- Add variables to configuration parameters;
- Add prefix to tables;
- Execute repair.php.

* Fix deprecated calls to explode(<string>, null)

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-05 15:51:15 +02:00
MDW
00e2ed5529 Qual: 🛟 Fix CI Issues ($db to $this->db / LDAP typing / Win-ci cache md5sum) (#30774)
* 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
2024-08-29 09:24:33 +02:00
MDW
e6630cd7d1 Qual: Improve dol_syslog (#30782)
* 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.
2024-08-29 08:49:27 +02:00
Laurent Destailleur
ed73dc6471 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-08-13 11:59:53 +02:00
Laurent Destailleur
ddaadfdd43 Update doc 2024-07-21 00:38:45 +02:00
Laurent Destailleur
b113a386b5 Add migration to 21 in win ci 2024-06-26 16:50:07 +02:00
Laurent Destailleur
d62bd87f06 Clean. Too many files that are not uptodate. Better to update doc to
explain how to regenerate them.
2024-05-24 15:07:31 +02:00
Laurent Destailleur
22987e35f3 Add API setup for Bruno 2024-04-30 22:52:26 +02:00
MDW
bbde552979 Qual: Enable Phan Rules and update baseline (#29255)
* 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.
2024-04-07 11:55:39 +02:00
MDW
a094ad38fc Fix spelling (using beta codespell)
# Fix spelling (using beta codespell

New spelling fixes - ignoring thirdparty which should be either third-party
or third party.
2024-03-20 00:35:01 +01:00
MDW
c181144c49 Qual: setup.sh - allow PHP envvar and force error reporting 2024-03-19 03:43:36 +01:00
MDW
0b19aa415c Fix: Initialise array before assigning values (#28728)
* Qual: Enable PhanUndeclaredVariableDim

# Qual: Enable PhanUndeclaredVariableDim

The notifications are fixed in the code so the detection no longer
needs to be suppressed in the default flow

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Fix: initialise array before adding fields

* Qual: Add type hint to array to avoid phan notification

* Qual: Add type hint to array to avoid phan notification

* Qual: Enable PhanParamSpecial1 (all resolved)

* Qual: Ignore false PhanTypeArraySuspiciousNullable

* Qual: Improve typing to fix PhanTypeArraySuspicious

* Qual: Fix PhanTypeArraySuspicious by replacing null assignment with empty array

* Qual: Fix PhanTypeArraySuspicious by testing as instancof DebugBar

* Qual: Fix PhanTypeComparisonToArray with enhanced typing

* Qual: Fix PhanTypeComparisonToArray with enhanced typing

* Qual: Enable phan messages that no longer appear

* Qual: Exclude phan stubs from codesniffer ruleset
2024-03-09 16:32:02 +01:00
Laurent Destailleur
61e69b352b Doc 2024-03-07 18:44:55 +01:00
Frédéric FRANCE
016de3ef66 fix codespell (#28536)
* fix codespell

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-03-01 12:39:23 +01:00
MDW
cec3a6c8e8 Qual: Add AbstractRestApiTest class, refactor RestApiUserTest, add RestApiMosTest (#28484)
* New: AbstractRestAPITest class

* Qual: Create RestAPIMosTest
2024-02-28 17:03:53 +01:00
Laurent Destailleur
78622c24a0 Doc 2024-02-24 19:28:14 +01:00
MDW
b343181789 Update phpunit.bat sample script and setup_conf.sh (#28307)
# 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
2024-02-20 23:02:59 +01:00
Laurent Destailleur
9b288e349e Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-18 17:20:16 +01:00
Laurent Destailleur
e38e9618ac Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-02-18 17:14:03 +01:00
Laurent Destailleur
ebe68c9075 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-02-18 17:06:36 +01:00
Laurent Destailleur
d707a1d668 Fix errors 2024-02-18 14:36:45 +01:00
Laurent Destailleur
a59fa7eca0 Test 2024-02-18 14:27:15 +01:00
Laurent Destailleur
ead53cf4f5 Avoid beautysh error 2024-02-18 14:09:02 +01:00
Laurent Destailleur
fb54306a1e Update precommit 2024-02-18 13:39:25 +01:00
MDW
acf09b805f Fix: Make all 'relative paths' absolute (#28196)
# 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.
2024-02-16 12:59:04 +01:00
MDW
e5423d5c59 Qual: Add exceptions for codespell (#28186)
* 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).
2024-02-15 14:49:09 +01:00
Laurent Destailleur
248119fc8c Move setup files 2024-02-15 11:50:38 +01:00
Laurent Destailleur
ff2d609814 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0
Conflicts:
	htdocs/core/class/commonobject.class.php
	htdocs/mrp/mo_production.php
2024-02-12 03:35:39 +01:00
Laurent Destailleur
65533360a2 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0
Conflicts:
	htdocs/main.inc.php
2024-02-12 03:32:58 +01:00
MDW
60f15baef2 Qual: Backport: pre-commit php-cs with cache (#28123)
* 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)
2024-02-12 03:30:19 +01:00
MDW
7a389299c3 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)
2024-02-10 01:22:07 +01:00
MDW
f6fc93249d 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.
2024-02-09 11:38:37 +01:00
MDW
ef95c56ecd Qual: Fix spelling.
# Qual: Fix some spelling
2024-01-21 13:37:53 +01:00
MDW
0fe6b8122a NEW: Dev documentation about setting up pre-commit locally
# NEW: Dev documentation about setting up pre-commit locally

A quick start guide about setting up pre-commit.
2024-01-18 15:54:08 +01:00
Laurent Destailleur
1600c985da Fix phpcs 2024-01-14 20:34:25 +01:00
MDW
c885c6917e Qual: Ignore most shellcheck annotations, fix some (#27452)
# 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.
2024-01-12 21:03:08 +01:00
MDW
42a0d05b63 Qual: Spelling outside htdocs (#27448)
* 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>
2024-01-12 17:14:13 +01:00
MDW
5d69728703 Qual: Apply beautysh (#27395)
# Qual: Apply beautysh

Beautysh the shell scripts.
Also fixed some spelling.
2024-01-10 19:47:29 +01:00
MDW
2e31005afb Fix: Make some scripts with shebang executable in git. (#27393)
# 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.
2024-01-10 17:33:52 +01:00
Laurent Destailleur
329473c3cb Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop 2023-08-21 14:14:44 +02:00
Laurent Destailleur
50bf5281c8 FIX encrypt sensitive data not be done for const MAIN_AGENDA_ACTIONAUTO 2023-08-20 22:20:15 +02:00
Laurent Destailleur
759ba40780 Test for sonarqube 2023-08-02 03:03:26 +02:00
Laurent Destailleur
9249ae6176 Doc 2023-08-02 00:27:53 +02:00