Skip to content

Commit e52ff47

Browse files
authored
Merge branch 'Dolibarr:develop' into chkavwh
2 parents a6eb192 + 546bc6f commit e52ff47

File tree

669 files changed

+84614
-24039
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

669 files changed

+84614
-24039
lines changed

.codeclimate.yml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ languages:
66
engines:
77
phpcodesniffer: true
88
exclude_paths:
9-
- 'build/*'
109
- 'dev/*'
1110
- 'doc/*'
1211
- 'test/*'

.github/workflows/doxygen-gh-pages.yml.disabled

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- develop
99
permissions:
1010
contents: write
11-
11+
1212
jobs:
1313
build:
1414
runs-on: ubuntu-latest
@@ -18,16 +18,16 @@ jobs:
1818
with:
1919
github_token: ${{ secrets.GITHUB_TOKEN }}
2020
branch: gh-pages
21-
folder: build/html
22-
config_file: build/doxygen/dolibarr-doxygen.doxyfile
21+
folder: dev/build/html
22+
config_file: dev/build/doxygen/dolibarr-doxygen.doxyfile
2323

2424
# - name: Deploy
2525
# uses: JamesIves/github-pages-deploy-action@v4
2626
# with:
2727
# branch: gh-pages
28-
# folder: build/html # The folder the action should deploy.
28+
# folder: dev/build/html # The folder the action should deploy.
2929
# target-folder: docs/html2
30-
30+
3131
#jobs:
3232
# doxygen:
3333
# runs-on: ubuntu-latest

.github/workflows/exakat.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ jobs:
2222
uses: docker://exakat/exakat-ga
2323
with:
2424
ignore_rules: 'Classes/UseInstanceof,Constants/ConstantStrangeNames,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/NestedTernary,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
25-
ignore_dirs: '/htdocs/includes/,/htdocs/install/doctemplates/,/build/,/dev/,/doc/,/scripts/,/test/'
25+
ignore_dirs: '/htdocs/includes/,/htdocs/install/doctemplates/,/dev/,/doc/,/scripts/,/test/'
2626
file_extensions: php
2727
project_reports: Perfile

.github/workflows/github_ci_php71_pgsql.yml.disabled

+24-25
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ jobs:
3535
--health-timeout 5s
3636
--health-retries 5
3737
ports:
38-
- 5432:5432
38+
- 5432:5432
3939

4040
steps:
4141
# git clone dolibarr into GITHUB_WORKSPACE = /home/runner/work/dolibarr/dolibarr
4242
- uses: actions/checkout@v3
4343
with:
4444
fetch-depth: 1
45-
45+
4646
- name: Version PHP
4747
run: |
4848
php -i | head -
@@ -59,7 +59,7 @@ jobs:
5959
sudo apt install apache2 php7.1 php7.1-cli php7.1-curl php7.1-mysql php7.1-pgsql php7.1-gd php7.1-imap php7.1-intl php7.1-ldap php7.1-xml php7.1-mbstring php7.1-xml php7.1-zip libapache2-mod-php7.1
6060
sudo update-alternatives --set php /usr/bin/php7.1
6161
php -i | head -
62-
62+
6363
cd $GITHUB_WORKSPACE
6464
ls $GITHUB_WORKSPACE
6565
composer -n require --ignore-platform-reqs phpunit/phpunit ^7.5 \
@@ -76,7 +76,7 @@ jobs:
7676
sudo rm -fr htdocs/includes/phpunit/php-code-coverage/src/Report/Html
7777

7878
- name: Adding path of binaries tools installed by composer to the PATH
79-
run: |
79+
run: |
8080
export PATH="$GITHUB_WORKSPACE/htdocs/includes/bin:$PATH"
8181
echo $PATH
8282
# We must have a directory bin created by the previous composer call
@@ -107,32 +107,32 @@ jobs:
107107
psql --version
108108
echo "Check pgloader version"
109109
pgloader --version
110-
110+
111111
- name: Create database
112112
run: |
113113
pwd
114-
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE
114+
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE
115115
sudo apt-get install -y mysql-client
116116
mysql --version | head -
117117
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SELECT VERSION();" | head -
118118
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SHOW DATABASES"
119-
119+
120120
echo "Drop and create database"
121121
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'DROP DATABASE IF EXISTS travis;'
122122
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';"
123123
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password';"
124124
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO [email protected];'
125125
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'FLUSH PRIVILEGES;'
126-
127-
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
128-
129-
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';"
130126

131-
echo "Init postgresql database"
127+
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
128+
129+
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';"
130+
131+
echo "Init postgresql database"
132132
ps fauxww | grep postgres
133133
ls /etc/postgresql/14/main/
134134
sudo chmod -R a+rwx /etc/postgresql/14/main/pg_hba.conf
135-
135+
136136
sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/14/main/pg_hba.conf
137137
sudo cat /etc/postgresql/14/main/pg_hba.conf
138138

@@ -144,7 +144,7 @@ jobs:
144144

145145
sudo mkdir -p /tmp/pgloader
146146
sudo chmod -R a+rwx /tmp/pgloader/
147-
147+
148148
echo sudo pgloader mysql://root:[email protected]:32574/travis postgresql://postgres:[email protected]:5432/travis
149149
sudo pgloader mysql://root:[email protected]:32574/travis postgresql://postgres:[email protected]:5432/travis
150150
echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql postgresql://postgres:[email protected]:5432/travis
@@ -190,7 +190,7 @@ jobs:
190190
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
191191
echo '$'force_install_main_data_root=\'/var/www/html\'';' >> $INSTALL_FORCED_FILE
192192
cat $INSTALL_FORCED_FILE
193-
193+
194194
- name: Create document directory
195195
run: |
196196
echo "Create documents directory and set permissions"
@@ -199,9 +199,9 @@ jobs:
199199
sudo chmod -R a+rwx /var/www/html/documents
200200
sudo echo "***** First line of dolibarr.log" > /var/www/html/documents/dolibarr.log
201201
sudo chmod a+rwx /var/www/html/documents/dolibarr.log
202-
202+
203203
- name: Copy app into /var/www
204-
run: |
204+
run: |
205205
sudo cp -r $GITHUB_WORKSPACE/htdocs/. /var/www/html
206206
sudo mv /var/www/html/index.html /var/www/html/index.disabled.html
207207
sudo ln -fs /var/www/html /var/www/htdocs
@@ -217,7 +217,7 @@ jobs:
217217
a2query -s
218218
a2query -m
219219
ls /etc/apache2/sites-available
220-
#sudo cp -f $GITHUB_WORKSPACE/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf
220+
#sudo cp -f $GITHUB_WORKSPACE/dev/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf
221221
#sudo sed -e "s?%GITHUB_WORKSPACE%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
222222
a2ensite 000-default
223223
a2enmod php7.1
@@ -245,7 +245,7 @@ jobs:
245245
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer">
246246
wget -O - --debug http://127.0.0.1 > $GITHUB_WORKSPACE/test.html 2>&1
247247
head -n 200 $GITHUB_WORKSPACE/test.html
248-
248+
249249
echo Logs are...
250250
#sudo cat /tmp/install.log
251251
sudo cat /var/log/apache2/access.log
@@ -287,7 +287,7 @@ jobs:
287287
php upgrade.php 6.0.0 7.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade600700.log
288288
php upgrade2.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-2.log
289289
php step5.php 6.0.0 7.0.0 > $GITHUB_WORKSPACE/upgrade600700-3.log
290-
290+
291291
echo "\dt llx_c_paiement" | psql 'postgresql://postgres:[email protected]:5432/travis'
292292
echo "\dt llx_c_payment_term" | psql 'postgresql://postgres:[email protected]:5432/travis'
293293

@@ -324,17 +324,17 @@ jobs:
324324
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade17001800.log
325325
php upgrade2.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-2.log
326326
php step5.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-3.log
327-
327+
328328
- name: Result of migration scripts
329329
if: always()
330330
run: |
331331
ls -alrt $GITHUB_WORKSPACE/
332-
332+
333333
echo Show content of last file
334334
cat "$(ls -rt $GITHUB_WORKSPACE/ | tail -n1)"
335335

336336
- name: Enabling new modules
337-
run: |
337+
run: |
338338
# Enable modules not enabled into original dump
339339
set -e
340340
cd /var/www/html/install
@@ -361,5 +361,4 @@ jobs:
361361
includes/bin/phpunit -d memory_limit=-1 -c /var/www/test/phpunit/phpunittest.xml /var/www/test/phpunit/AllTests.php
362362
phpunitresult=$?
363363
echo "Phpunit return code = $phpunitresult"
364-
set +e
365-
364+
set +e

.github/workflows/github_ci_php81_mysql.yml.disabled

+20-21
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v3
2929
with:
3030
fetch-depth: 1
31-
31+
3232
- name: Version PHP
3333
run: |
3434
php -i | head -
@@ -38,14 +38,14 @@ jobs:
3838
sudo composer self-update 2.2.18
3939
sudo chmod -R a+rwx /home/runner
4040
composer -n config -g vendor-dir htdocs/includes
41-
41+
4242
sudo add-apt-repository -y ppa:ondrej/php
4343
sudo apt-get update
4444
sudo apt-get install -y pgloader memcached
4545
sudo apt install apache2 php8.1 php8.1-cli php8.1-curl php8.1-mysql php8.1-pgsql php8.1-gd php8.1-imap php8.1-intl php8.1-ldap php8.1-xml php8.1-mbstring php8.1-xml php8.1-zip libapache2-mod-php8.1
4646
sudo update-alternatives --set php /usr/bin/php8.1
4747
php -i | head -
48-
48+
4949
cd $GITHUB_WORKSPACE
5050
ls $GITHUB_WORKSPACE
5151
composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \
@@ -56,7 +56,7 @@ jobs:
5656
sudo rm -fr htdocs/includes/phpunit/php-code-coverage/src/Report/Html
5757

5858
- name: Adding path of binaries tools installed by composer to the PATH
59-
run: |
59+
run: |
6060
export PATH="$GITHUB_WORKSPACE/htdocs/includes/bin:$PATH"
6161
echo $PATH
6262
# We must have a directory bin created by the previous composer call
@@ -87,26 +87,26 @@ jobs:
8787
psql --version
8888
echo "Check pgloader version"
8989
pgloader --version
90-
90+
9191
- name: Create database
9292
run: |
9393
pwd
94-
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE
94+
echo GITHUB_WORKSPACE = $GITHUB_WORKSPACE
9595
sudo apt-get install -y mysql-client
9696
mysql --version | head -
9797
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SELECT VERSION();" | head -
9898
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "SHOW DATABASES"
99-
99+
100100
echo "Drop and create database"
101101
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'DROP DATABASE IF EXISTS travis;'
102102
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8';"
103103
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e "CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password';"
104104
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO [email protected];'
105105
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -e 'FLUSH PRIVILEGES;'
106-
107-
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
108106

109-
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';"
107+
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
108+
109+
mysql --host 127.0.0.1 --port 32574 -uroot -ppassword -D travis -e "UPDATE llx_const set value = '0666' WHERE name = 'MAIN_UMASK';"
110110

111111
- name: Generate Dolibarr conf file
112112
run: |
@@ -145,7 +145,7 @@ jobs:
145145
echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE
146146
echo '$'force_install_main_data_root=\'/var/www/html\'';' >> $INSTALL_FORCED_FILE
147147
cat $INSTALL_FORCED_FILE
148-
148+
149149
- name: Create document directory
150150
run: |
151151
echo "Create documents directory and set permissions"
@@ -154,9 +154,9 @@ jobs:
154154
sudo chmod -R a+rwx /var/www/html/documents
155155
sudo echo "***** First line of dolibarr.log" > /var/www/html/documents/dolibarr.log
156156
sudo chmod a+rwx /var/www/html/documents/dolibarr.log
157-
157+
158158
- name: Copy app into /var/www
159-
run: |
159+
run: |
160160
sudo cp -r $GITHUB_WORKSPACE/htdocs/. /var/www/html
161161
sudo mv /var/www/html/index.html /var/www/html/index.disabled.html
162162
sudo ln -fs /var/www/html /var/www/htdocs
@@ -172,7 +172,7 @@ jobs:
172172
a2query -s
173173
a2query -m
174174
ls /etc/apache2/sites-available
175-
#sudo cp -f $GITHUB_WORKSPACE/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf
175+
#sudo cp -f $GITHUB_WORKSPACE/dev/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf
176176
#sudo sed -e "s?%GITHUB_WORKSPACE%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
177177
a2ensite 000-default
178178
a2enmod php8.1
@@ -200,7 +200,7 @@ jobs:
200200
# The wget should return a page with line '<meta name="generator" content="Dolibarr installer">
201201
wget -O - --debug http://127.0.0.1 > $GITHUB_WORKSPACE/test.html 2>&1
202202
head -n 200 $GITHUB_WORKSPACE/test.html
203-
203+
204204
echo Logs are...
205205
#sudo cat /tmp/install.log
206206
sudo cat /var/log/apache2/access.log
@@ -274,17 +274,17 @@ jobs:
274274
php upgrade.php 17.0.0 18.0.0 ignoredbversion > $GITHUB_WORKSPACE/upgrade17001800.log
275275
php upgrade2.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-2.log
276276
php step5.php 17.0.0 18.0.0 > $GITHUB_WORKSPACE/upgrade17001800-3.log
277-
277+
278278
- name: Result of migration scripts
279279
if: always()
280280
run: |
281281
ls -alrt $GITHUB_WORKSPACE/
282-
282+
283283
echo Show content of last file
284284
cat "$(ls -rt $GITHUB_WORKSPACE/ | tail -n1)"
285285

286286
- name: Enabling new modules
287-
run: |
287+
run: |
288288
# Enable modules not enabled into original dump
289289
set -e
290290
cd /var/www/html/install
@@ -311,7 +311,7 @@ jobs:
311311
includes/bin/phpunit -d memory_limit=-1 -c /var/www/test/phpunit/phpunittest.xml /var/www/test/phpunit/AllTests.php
312312
phpunitresult=$?
313313
echo "Phpunit return code = $phpunitresult"
314-
set +e
314+
set +e
315315

316316
- name: Code quality check - Lint
317317
if: github.event_name == 'push'
@@ -325,10 +325,9 @@ jobs:
325325
- name: Code quality check - phpcs
326326
if: github.event_name == 'push'
327327
run: |
328-
htdocs/includes/bin/phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
328+
htdocs/includes/bin/phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .;
329329

330330
- name: Code quality check - var-dump-check
331331
if: github.event_name == 'push'
332332
run: |
333333
htdocs/includes/bin/var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
334-

.github/workflows/phpstan.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- name: Run PHPStan
6868
id: phpstan
6969
run: |
70-
phpstan -vvv analyse --error-format=checkstyle --memory-limit 7G -a build/phpstan/bootstrap_action.php | tee _stan.xml | cs2pr --graceful-warnings
70+
phpstan -vvv analyse --error-format=checkstyle --memory-limit 7G -a dev/build/phpstan/bootstrap_action.php | tee _stan.xml | cs2pr --graceful-warnings
7171
# continue-on-error: true
7272

7373
# Save cache
@@ -90,4 +90,4 @@ jobs:
9090
# id: phpstan-baseline
9191
# if: ${{ success() }}
9292
# run: |
93-
# phpstan -vv analyse --memory-limit 7G -a build/phpstan/bootstrap_action.php --generate-baseline build/phpstan/phpstan-baseline.neon
93+
# phpstan -vv analyse --memory-limit 7G -a dev/build/phpstan/bootstrap_action.php --generate-baseline dev/build/phpstan/phpstan-baseline.neon

.github/workflows/phpstan_baseline.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ jobs:
6060
github_token: ${{ env.GH_TOKEN }}
6161
phpstan_path: phpstan
6262
configuration_path: phpstan.neon.dist
63-
phpstan_additional_arguments: --memory-limit 7G -a build/phpstan/bootstrap_action.php
64-
baseline_path: build/phpstan/phpstan-baseline.neon
63+
phpstan_additional_arguments: --memory-limit 7G -a dev/build/phpstan/bootstrap_action.php
64+
baseline_path: dev/build/phpstan/phpstan-baseline.neon
6565
commit_name: Dolibot
6666
commit_email: [email protected]
6767
commit_message: PHPStan > Update baseline

.github/workflows/pr-18.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: |
3333
gh pr edit "$url" --add-assignee rycks --add-reviewer rycks
3434
gh pr merge "$url" --merge --auto
35-
35+
continue-on-error: true
3636

3737
- name: Assign reviewer method 2
3838
env:

0 commit comments

Comments
 (0)