Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into fix_cti_20240603
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 committed Oct 12, 2024
2 parents ffaf083 + 235d23a commit 654bd0f
Show file tree
Hide file tree
Showing 693 changed files with 8,582 additions and 3,965 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/cache-clean-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH=refs/pull/${{ github.event.pull_request.number }}/merge
REPO="${{ github.repository }}"
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
cacheKeysForPR=$(gh actions-cache list -R "$REPO" -B "$BRANCH" | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
gh actions-cache delete "$cacheKey" -R "$REPO" -B "$BRANCH" --confirm
done
echo "Done"
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ jobs:


# Note (not tested, from https://github.com/orgs/community/discussions/38361)
# To cancel jobs if one failes, the following action may help
# To cancel jobs if one fails, the following action may help
# - if: "failure()"
# uses: "andymckay/[email protected]"
5 changes: 2 additions & 3 deletions .github/workflows/exakat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ name: "Exakat analysis"
on:
# execute once a month, the 1st
schedule:
- cron: "0 20 1 * *"
- cron: "0 20 1 * *"
workflow_dispatch:
branches:
- develop

permissions:
contents: read
Expand All @@ -19,6 +17,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 1
ref: develop
- name: Exakat
uses: docker://exakat/exakat-ga
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/phan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ concurrency:
cancel-in-progress: true
env:
gh_event: ${{ inputs.gh_event || github.event_name }}
PHAN_CONFIG: >
${{ 'dev/tools/phan/config.php' }}
PHAN_CONFIG: dev/tools/phan/config.php
PHAN_BASELINE: dev/tools/phan/baseline.txt
PHAN_MIN_PHP: 7.0
PHAN_QUICK: ${{ github.event.schedule && '' || '--quick' }}
Expand All @@ -43,7 +42,8 @@ jobs:
tools: cs2pr,phan
- name: Run Phan analysis
run: |
phan $PHAN_QUICK -k $PHAN_CONFIG -B $PHAN_BASELINE --analyze-twice --minimum-target-php-version $PHAN_MIN_PHP --output-mode=checkstyle -o _phan.xml
# shellcheck disable=2086
phan $PHAN_QUICK -k "$PHAN_CONFIG" -B "$PHAN_BASELINE" --analyze-twice --minimum-target-php-version "$PHAN_MIN_PHP" --output-mode=checkstyle -o _phan.xml
- name: Add results to PR
if: ${{ always() }}
run: |
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
run: |
set -o pipefail
pre-commit gc
pre-commit run --show-diff-on-failure --color=always --all-files | tee ${RAW_LOG}
pre-commit run --show-diff-on-failure --color=always --all-files | tee "${RAW_LOG}"
# The next uses git, which is slow for a bit repo.
# - name: Get all changed php files (if PR)
Expand Down Expand Up @@ -105,7 +105,8 @@ jobs:
ALL_CHANGED_FILES: ${{ steps.changed-php.outputs.all_changed_files }}
run: |
set -o pipefail
pre-commit run php-cs --files ${ALL_CHANGED_FILES} | tee -a ${RAW_LOG}
# shellcheck disable=2086
pre-commit run php-cs --files ${ALL_CHANGED_FILES} | tee -a "${RAW_LOG}"
- name: Run some pre-commit hooks on all files on push to "main" branches
if: |
Expand All @@ -117,8 +118,8 @@ jobs:
run: |
set -o pipefail
ln -sf ~/.cache .cache # Absolute path in .pre-commit-config.yaml
pre-commit run --hook-stage manual -a php-cs-with-cache | tee -a ${RAW_LOG}
pre-commit run --hook-stage manual -a sqlfluff-lint | tee -a ${RAW_LOG}
pre-commit run --hook-stage manual -a php-cs-with-cache | tee -a "${RAW_LOG}"
pre-commit run --hook-stage manual -a sqlfluff-lint | tee -a "${RAW_LOG}"
ls -l ~/.cache/pre-commit/
- name: Convert Raw Log to Annotations
Expand Down
28 changes: 17 additions & 11 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup MariaDB
uses: ankane/setup-mariadb@v1
with:
# mariadb-version: ${{ matrix.mariadb-version }}
database: travis # Specify your database name
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -66,10 +61,11 @@ jobs:
KEY_ROOT: ${{ matrix.os }}-${{ env.ckey }}-${{ matrix.php_version }}
with:
# See https://github.com/actions/cache/issues/1275#issuecomment-1925217178
enableCrossOsArchive: true
enableCrossOsArchive: true
path: |
./db_init.sql
./db_init.sql.md5
./.cache/mariadb
key: ${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ env.CACHE_KEY_PART }}-${{ github.run_id }}
restore-keys: |
${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ env.CACHE_KEY_PART }}-
Expand All @@ -78,6 +74,12 @@ jobs:
${{ env.KEY_ROOT }}-${{ env.HASH }}-
${{ env.KEY_ROOT }}-
- name: Setup MariaDB
uses: frederic34/setup-mariadb@v1
with:
# mariadb-version: ${{ matrix.mariadb-version }}
database: travis # Specify your database name

- name: Create local php.ini with open_basedir restrictions
shell: cmd
# Objective: separate step, and before database initialisation to verify open_basedir restrictions
Expand Down Expand Up @@ -114,6 +116,7 @@ jobs:
# Note this is bash (MSYS) on Windows
shell: bash
run: |
# shellcheck disable=SC2129
ECHO "#[group]Directory contents to verify cache files, ..."
ls -l
ECHO "#[endgroup]"
Expand All @@ -128,10 +131,12 @@ jobs:
ls -l
ECHO "#[endgroup]"
# Export some tool paths to reuse the from CMD shell.
echo "TAIL=$(cygpath -w "$(which tail)")" >> "$GITHUB_ENV"
echo "GREP=$(cygpath -w "$(which grep)")" >> "$GITHUB_ENV"
echo "TEE=$(cygpath -w "$(which tee)")" >> "$GITHUB_ENV"
echo "BASEDIR=$(realpath .)" >> "$GITHUB_ENV"
{
echo "TAIL=$(cygpath -w "$(which tail)")"
echo "GREP=$(cygpath -w "$(which grep)")"
echo "TEE=$(cygpath -w "$(which tee)")"
echo "BASEDIR=$(realpath .)"
} >> "$GITHUB_ENV"
- name: Run PHPUnit tests
# continue-on-error: true
Expand Down Expand Up @@ -184,8 +189,9 @@ jobs:
if: ${{ ! cancelled() }}
with:
# See https://github.com/actions/cache/issues/1275#issuecomment-1925217178
enableCrossOsArchive: true
enableCrossOsArchive: true
key: ${{ steps.cache.outputs.cache-primary-key }}
path: |
./db_init.sql
./db_init.sql.md5
./.cache/mariadb
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
exclude: (?x)^( htdocs/includes/ckeditor/.*|(\.[^/]*/.*))$
exclude: (?x)^( htdocs/includes/ckeditor/.*|(\.(?!github/workflows)[^/]*/.*))$
repos:
# Several miscellaneous checks and fix (on yaml files, end of files fix)
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down Expand Up @@ -64,6 +64,12 @@ repos:
hooks:
- id: gitleaks

# Check github actions
- repo: https://github.com/rhysd/actionlint
rev: v1.7.3
hooks:
- id: actionlint

# Beautify shell scripts
- repo: https://github.com/lovesegfault/beautysh.git
rev: v6.2.1
Expand Down
55 changes: 53 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,56 @@
English Dolibarr ChangeLog
--------------------------------------------------------------

***** ChangeLog for 20.0.1 compared to 20.0.0 *****

FIX: #30960 show and search extrafields (#31026)
FIX: #31076 Bad position of hooks
FIX: #31152
FIX: #31237 (#31239)
FIX: #31241 (#31245)
FIX: accounting transfer when nb of lines is not zero but amount is zero
FIX: Add same security test when nuploading files from API than from GUI (#31114)
FIX: allow "class" into search string in website module
FIX: autoselect the fiscal period by default
FIX: avoid odt errors (#31126)
FIX: Backport fix fatal error on price with some truncating setup
FIX: better compatibility with some old extrafield syntax filter
FIX: box_actions.php still uses fk_user_done which no longer exists (#31190)
FIX: Browser Notification ko with firefox
FIX: custom CSS for WebPortal (#31022)
FIX: Debug calculation of the delay of purchase order
FIX: Debug option WORKFLOW_TICKET_LINK_CONTRACT. Bad id stored. Bad
FIX: dolFICalculatePaymentReference for Finland in functions_fi.lib.php (#31281)
FIX: Duplicate trigger printFieldPreListTitle
FIX: edit contract of intervention broken by CSRF protection
FIX: error return missing in mo creation when qty to consume is <= 0 (#31134)
FIX: Extrafields does not appear on form
FIX: FATAL ERROR abusively triggered due to incomplete regex (#31052)
FIX: if you call fetchLines several times, your $object->lines contains duplicates (#31167)
FIX: late order search option (v18+) (#30692)
FIX: late propal search option (v18+) (#30687)
FIX: Maxi debug edit/delete accounting transaction
FIX: member must be found to search the linked partnership (WebPortal) (#30977)
FIX: Missing picto on user link
FIX: mysql error during dump for enable sandbox M999999 (#31116)
FIX: OAuth generation of token for Microsoft, Stripe and Generic
FIX: param id in website account list from third-party card (#30975)
FIX: Position of box for shipping address in PDF
FIX: Protection to avoid an extrafield to be mandatory if computed
FIX: removed unreachable code (#31141)
FIX: Remove wrong button
FIX: retrieving user specific constant
FIX: Revert storing of ticket files into event dir, too many troubles.
FIX: Selection of country - state in resource
FIX: State dropdown is not working on User card #31198 (#31205)
FIX: Tool to convert into utf8 or utf8mb4
FIX: use price() to display qty on a product's stats tab to avoid showing too many decimals when rounding errors are possible (#31165)
FIX: Warning visible when it should not
FIX: webhook must send POST in body. Add WEBHOOK_POST_SEND_DATA_IN_BODY
FIX: when qty is not an integer, apply price() (#31138)
FIX: Wrong price for BOM with workstation (#31142)
FIX: determine multi-currency price on object line create tpl (#28021)


***** ChangeLog for 21.0.0 compared to 20.0 *****

Expand All @@ -25,6 +75,7 @@ The following changes may create regressions for some external modules, but were
* The experimental and deprecated module WebserviceClient is completely removed (SOAP technology is deprecated). May be replaced with the stable module Webhook.
* The dynamic properties ->no_button_delete, ->no_button_edit, ->no_button_copy for $object Product that could be set by an external module must no more
be set (not allowed by PHP 8.2). A module can already return an array with key 'no_button_delete', 'no_button_edit', 'no_button_copy' for same purpose.
* The old function dol_bc($var, $moreclass = '') has been removed. If you called it, just stop to call it.


***** ChangeLog for 20.0.0 compared to 19.0 *****
Expand Down Expand Up @@ -164,7 +215,7 @@ NEW: Module Website: Can link/unlink translation between web pages
NEW: Move dir of cache for widgets
NEW: multiselect with checkbox in categories/tags search for thirdparty list (#28335)
NEW: new consts to redirect from massaction createbills (#29436)
NEW: new global string to preselect yes for one bill per thirparty in orderlist massaction (#29359)
NEW: new global string to preselect yes for one bill per third party in orderlist massaction (#29359)
NEW: notification action triggers for cancelling orders and invoices
NEW: now button when editing an event
NEW: online signature of shipments (#29559)
Expand Down Expand Up @@ -3302,7 +3353,7 @@ FIX: fix checkbox displayed according to module project setup parameters - work
FIX: inconsistency in margin recording with option "Force to sale price"
FIX: invoice PDF generation after payment
FIX: mask selector fournisseur if module not activate
FIX: merge thirparty also work for bank URL entry
FIX: merge third party also works for bank URL entry
FIX: Missing extrafields into export of agenda record
FIX: missing parameter in select for POP
FIX: missing return edit if update error
Expand Down
25 changes: 23 additions & 2 deletions dev/tools/codespell/codespell-dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ aplhanothtml->alphanohtml
aploha->alpha
aplohanothtml->alphanohtml
aplphanothtml->alphanohtml
centpecent->centpercent
choosed->chosen
cumuled->cumulative
dokument->document
Expand All @@ -18,12 +19,32 @@ dollibarr->dolibarr
extrafeild->extrafield
thoose->those
# fiche->card
nempty->an empty, empty, not empty,
maringbottomonly->marginbottomonly
maxwidthonsmartpone->maxwidthonsmartphone
maxwidthonspartphone->maxwidthonsmartphone
minwith100->minwidth100
minwith200->minwidth200
mot de passe->password
multicurreny->multicurrency
nempty->an empty, empty, not empty,
nocellnopadding->nocellnopadd
nodrap->nodrag, nodrop,
not de passe->password
nothtml->nohtml
notoptoleftroright->notoptoleftnoright
nowraponalls->nowraponall
oddevene->oddeven
oddseven->oddeven
opacitymediuem->opacitymedium
pictofiwedwidth->pictofixedwidth
pictofixedwith->pictofixedwidth
shippin->shipping
tableau de bord->state board
tagret->target
thridparty->thirdparty
tdoverflowmax100aaa->tdoverflowmax100
tdoverlowmax200->tdoverflowmax200
thirparty->thirdparty, third party,
thridparty->thirdparty, third party,
with100->width100
with75->width75
wysiwig->wysiwyg
4 changes: 4 additions & 0 deletions dev/tools/codespell/codespell-ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ espace
methode
datee

# Translation keys
addin
amountin

# other
blacklists
confirmactionxxx
Loading

0 comments on commit 654bd0f

Please sign in to comment.