Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:Dolibarr/dolibarr into NEW/payme…
Browse files Browse the repository at this point in the history
…nt_on_several_expense_report_code
  • Loading branch information
Razmogang committed Mar 21, 2024
2 parents 51ce6d7 + fd1322c commit 137961f
Show file tree
Hide file tree
Showing 5,954 changed files with 347,790 additions and 260,490 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ languages:
JavaScript: true
PHP: true
engines:
phpcodesniffer: true
phpcodesniffer: true
exclude_paths:
- 'build/*'
- 'dev/*'
- 'doc/*'
- 'test/*'
- 'htdocs/includes/*'
- 'htdocs/includes/*'
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ indent_style = tab
indent_style = tab
[*.md]
trim_trailing_whitespace = false
[*.sql]
indent_style = tab
trim_trailing_whitespace = true
indent_size = 4
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* text=auto


# Explicitly declare text files we want to always be normalized and converted
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.php text eol=lf
*.pl text eol=lf
Expand All @@ -21,6 +21,7 @@
*.yml text eol=lf
*.yaml text eol=lf
*.conf text eol=lf
*.neon text eol=lf

.bash_aliases text eol=lf

Expand Down
37 changes: 20 additions & 17 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ Bug reports and feature requests
<a name="not-a-support-forum"></a>*Note*: **GitHub Issues is not a support forum.** If you have questions about Dolibarr / need help using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages.

Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
Default **language here is english**. So please prepare your contributions in english.
Default **language here is English**. So please prepare your contributions in English.

1. Please [use the search engine](https://help.github.com/articles/searching-issues) to check if nobody's already reported your problem.
2. [Create an issue](https://help.github.com/articles/creating-an-issue). Choose an appropriate title. Prepend appropriately with Bug or Feature Request.
3. Tell us the version you are using! (look at /htdocs/admin/system/dolibarr.php? and check if you are using the latest version)
4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging informations whenever possible).
4. Write a report with as much detail as possible (Use [screenshots](https://help.github.com/articles/issue-attachments) or even screencasts and provide logging and debugging information whenever possible).
5. Delete unnecessary submissions.
6. **Check your Message at Preview before sending.**



<a name="code"></a>Code
<a name="code"></a>Submit code
---------------------

### Basic workflow
Expand All @@ -35,20 +35,22 @@ Default **language here is english**. So please prepare your contributions in en

Unless you're fixing a bug, all pull requests should be made against the *develop* branch.

If you're fixing a bug, it is preferred that you cook your fix and pull request it
against the oldest version affected that's still supported.
If you're fixing a bug, it is preferred that you cook your fix and pull request it against an oldest version affected.

We officially support versions N, N − 1 and N − 2 for N the latest version available.
We recommend to push it into N - 2 for N the latest version available, if not possible into version N - 1, and finally into develop.
This is just a recommendation, currently, if you push a bug fix on a very old version, it is still merged and propagated into
higher versions.

Choose your base branch accordingly.
The rule N - 2 is just a tip if you don't know which version to choose to get the best the best compromise between ease of correction
and number of potential beneficiaries of the correction.

### General rules
Please don't edit the ChangeLog file. File will be generated from all commit messages during release process by the project manager.
Please don't edit the ChangeLog file. This file is generated from all commit messages during release process by the project manager.

### <a name="commits"></a>Commits
Use clear commit messages with the following structure:

```
```plaintext
[KEYWORD] [ISSUENUM] DESC
LONGDESC
Expand All @@ -66,13 +68,13 @@ where
#### Keyword
In uppercase if you want to have the log comment appears into the generated ChangeLog file.

The keyword can be ommitted if your commit does not fit in any of the following categories:
The keyword can be omitted if your commit does not fit in any of the following categories:

- Fix/FIX: for a bug fix
- Close/CLOSE: for closing a referenced feature request
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is prefered)
- Perf/PERF: for performance enhancement
- Qual/QUAL: for quality code enhancement or re-engeneering
- New/NEW: for an unreferenced new feature (Opening a feature request and using close is preferred)
- Perf/PERF: for a performance enhancement
- Qual/QUAL: for quality code enhancement or re-engineering

#### Issuenum
If your commit fixes a referenced bug or feature request.
Expand All @@ -93,7 +95,7 @@ Feel free to express technical details, use cases or anything relevant to the cu

This section can span multiple lines.

Try to keep lines under 120 characters.
If your PR is a change on interface, you must also paste a screenshot showing the new screen.

#### Examples
<pre>
Expand All @@ -105,7 +107,7 @@ NEW|New|QUAL|Qual|PERF|Perf Short description (In upper case to appear into Chan
or
Short description (when the commit is not introducing feature nor closing a bug)

Long description (Can span accross multiple lines).
Long description (Can span across multiple lines).
</pre>

### Pull Requests
Expand Down Expand Up @@ -133,7 +135,8 @@ If your PR has errors reported by the Continuous Integration Platform, it means
If the PR is valid, and is kept open for a long time, a tag will also be added on the PR to describe the status of your PR and why the PR is kept open. By putting your mouse on the tag, you will get a full explanation of the tag/status that explain why your PR has not been integrated yet.
In most cases, it gives you information of things you have to do to have the PR taken into consideration (for example a change is requested, a conflict is expected to be solved, some questions were asked). If you have a yellow, red flag of purple flag, don't expect to have your PR validated. You must first provide the answer the tag ask you. The majority of open PR are waiting an action of the author of the PR.

Statistics on Dolibarr project shows that 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source projects (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%. A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.
Statistics on Dolibarr project shows that 95% of submitted PR are reviewed and tagged. Average answer delay is also one of the best among Open source projects (just few days before having the Answer Tag set). This is one of the most important ratio of answered PR in Open Source world for a major project. Don't expect the core team to reach the 100%.
A so high ratio is very rare on a so popular project and with the increasing popularity of Dolibarr, this ratio will probably decrease in future to a more common level.


### Resources
Expand All @@ -147,7 +150,7 @@ All other translations are managed online at [Transifex](https://www.transifex.c

Translations done on transifex are available in the next major release.

Note: Sometimes, the source text (english) is modified. In such a case, the translation is reset. Transifex assume that if the original source
Note: Sometimes, the source text (English) is modified. In such a case, the translation is reset. Transifex assume that if the original source
has changed, the translation is surely no more correct so must be done again. But old translation is not lost and you can use the tab "History"
to retrieve all old translation of a source text, and restore the translation in one click with no need to retranslate it if there is no need to.

Expand Down
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

open_collective: dolibarr
custom: https://wiki.dolibarr.org/index.php/Subscribe
github: [eldy]
github: [eldy]
37 changes: 7 additions & 30 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
attributes:
value: |
This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.
- type: textarea
id: bug
attributes:
Expand All @@ -19,53 +19,30 @@ body:
- type: input
id: environment-version
attributes:
label: Environment Version
label: Dolibarr Version
description: Affected Dolibarr version(s)
placeholder: 19.0, develop, ...

- type: input
id: environment-os
attributes:
label: Environment OS
description: Server OS type and version

- type: input
id: environment-webserver
attributes:
label: Environment Web server
description: Webserver type and version

- type: input
id: environment-php
attributes:
label: Environment PHP
description: PHP version

- type: input
id: environment-database
attributes:
label: Environment Database
description: Database type and version

- type: input
id: environment-urls
attributes:
label: Environment URL(s)
description: Affected URL(s)

- type: textarea
id: expected-behaviour
attributes:
label: Expected and actual behavior
description: Verbose description

- type: textarea
id: reproduce
attributes:
label: Steps to reproduce the behavior
label: Steps to reproduce the behavior and expected behavior
description: Verbose description

- type: textarea
id: files
attributes:
label: Attached files
description: Screenshots, screencasts, dolibarr.log, debugging informations
description: Screenshots, screencasts, dolibarr.log, debugging information
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ body:
attributes:
label: Use case
description: Verbose description

- type: textarea
id: suggested-implementation
attributes:
Expand Down
File renamed without changes.
36 changes: 36 additions & 0 deletions .github/workflows/cache-clean-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Cleanup caches of a closed branch
# See https://github.com/actions/cache/blob/main/tips-and-workarounds.md#force-deletion-of-caches-overriding-default-cache-eviction-policy
on:
pull_request:
types: [closed]
workflow_dispatch:
jobs:
cleanup:
runs-on: ubuntu-latest
permissions:
# `actions:write` permission is required to delete caches
# See also: https://docs.github.com/en/rest/actions/cache?apiVersion=2022-11-28#delete-a-github-actions-cache-for-a-repository-using-a-cache-id
actions: write
contents: read
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
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 )
## 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
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/exakat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Exakat
uses: docker://exakat/exakat-ga
with:
ignore_rules: 'Classes/UseInstanceof,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'
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'
ignore_dirs: '/htdocs/includes/,/htdocs/install/doctemplates/,/build/,/dev/,/doc/,/scripts/,/test/'
file_extensions: php
project_reports: Perfile
file_extensions: php
project_reports: Perfile
2 changes: 1 addition & 1 deletion .github/workflows/github_ci_php71_pgsql.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ jobs:
sudo cat /etc/apache2/sites-enabled/000-default.conf
sudo service apache2 restart
curl -I localhost
- name: Chech Apache availability
- name: Check Apache availability
run: |
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
# Ensure we stop on error with set -e
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github_ci_php81_mysql.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ jobs:
sudo cat /etc/apache2/sites-enabled/000-default.conf
sudo service apache2 restart
curl -I localhost
- name: Chech Apache availability
- name: Check Apache availability
run: |
echo "Checking webserver availability by a wget -O - --debug http://127.0.0.1"
# Ensure we stop on error with set -e
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/phan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
on:
pull_request:
push:
schedule:
# execute once a day, the 1st
- cron: 10 9 * * *
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# Do pull analysis on schedule or manual dispatch
PHAN_CONFIG: >
${{
( github.event.schedule || github.event_name == 'workflow_dispatch' )
&& 'dev/tools/phan/config_extended.php'
|| 'dev/tools/phan/config.php'
}}
PHAN_BASELINE: dev/tools/phan/baseline.txt
PHAN_MIN_PHP: 7.0
PHAN_QUICK: ${{ github.event.schedule && '' || '--quick' }}
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
name: phan
jobs:
phan:
name: Run phan
runs-on: ubuntu-latest
# Do not run schedule on forks
if: |
github.repository == 'Dolibarr/dolibarr'
|| github.event.schedule == false
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none # disable xdebug, pcov
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
- name: Add results to PR
if: ${{ always() }}
run: |
cs2pr --prepend-filename --prepend-source --notices-as-warnings _phan.xml
- name: Provide phan log as artifact
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: phan-srcrt
# path: ${{ github.workspace }}/phan.log
path: ${{ github.workspace }}/_phan.xml
retention-days: 2
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "PHPCS"

on:
push:
pull_request:
paths:
- "**.php"
Expand All @@ -11,6 +12,7 @@ jobs:
phpcs:
runs-on: ubuntu-latest
steps:
# Get git sources
- uses: actions/checkout@v4
with:
fetch-depth: 50 # important!
Expand Down
Loading

0 comments on commit 137961f

Please sign in to comment.