Skip to content

Commit

Permalink
Merge branch '20.0' of https://github.com/Dolibarr/dolibarr into donM…
Browse files Browse the repository at this point in the history
…odelNumero
  • Loading branch information
dbeniamine committed Jan 2, 2025
2 parents fb1314a + 4b6b4eb commit 960a732
Show file tree
Hide file tree
Showing 6,085 changed files with 342,730 additions and 214,432 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
7 changes: 7 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Default **language here is English**. So please prepare your contributions in En
5. Commit and push your changes.
6. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).


<span id="branches" name="branches"></span>
### Branches

Expand All @@ -44,9 +45,11 @@ higher versions.
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. 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:

Expand Down Expand Up @@ -110,7 +113,9 @@ Short description (when the commit is not introducing feature nor closing a bug)
Long description (Can span across multiple lines).
</pre>


### Pull Requests

Pull Request (PR) process is the process to submit a change (enhancement, bug fix, ...) into the code of the project. There is some rules to know and
a process to follow to optimize the chance to have PRs merged efficiently...

Expand All @@ -120,6 +125,8 @@ a process to follow to optimize the chance to have PRs merged efficiently...

* When submitting a pull request, use same rule as [Commits](#commits) for the message. If your pull request only contains 1 commit, GitHub will be smart enough to fill it for you. Otherwise, please be a bit verbose about what you're providing.

* A screenshot will be always required for any PR of change/addition of a GUI behaviour.

Also, some code changes need a prior approbation:

* if you want to include a new external library (into htdocs/includes directory), please ask before to the core project manager (mention @dolibarr-jedi in your issue) to see if such a library can be accepted.
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]
35 changes: 6 additions & 29 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,51 +19,28 @@ 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:
Expand Down
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
Empty file added .github/tmp/.gitkeep
Empty file.
16 changes: 16 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Workflow run order

To reduce run minutes, the following order is put in place:

On PR & Merge, always run:

- pre-commit;
- phan.

When both succeed, start:

- phpstan;
- Windows-ci;
- travis.

See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
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 }}
40 changes: 40 additions & 0 deletions .github/workflows/ci-on-pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "CI-PULL-REQUEST"

on: [pull_request]
jobs:
pre-commit:
uses: ./.github/workflows/pre-commit.yml
secrets: inherit
with:
gh_event: ${{ github.event_name }}
phan:
uses: ./.github/workflows/phan.yml
secrets: inherit
needs: [pre-commit]
with:
gh_event: ${{ github.event_name }}
phpstan:
uses: ./.github/workflows/phpstan.yml
secrets: inherit
needs: [pre-commit, phan]
with:
gh_event: ${{ github.event_name }}
#windows-ci:
# needs: [pre-commit, phan, phpstan]
# secrets: inherit
# uses: ./.github/workflows/windows-ci.yml
# with:
# gh_event: ${{ github.event_name }}
gh-travis: # Runs travis script on github runner (not on travis)
if: false
# needs: [pre-commit, phan]
# needs: [windows-ci]
secrets: inherit
uses: ./.github/workflows/gh-travis.yml
with:
gh_event: ${{ github.event_name }}

# Note (not tested, from https://github.com/orgs/community/discussions/38361)
# To cancel jobs if one failes, the following action may help
# - if: "failure()"
# uses: "andymckay/[email protected]"
40 changes: 40 additions & 0 deletions .github/workflows/ci-on-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "CI-PUSH"

on: [push]
jobs:
pre-commit:
uses: ./.github/workflows/pre-commit.yml
secrets: inherit
with:
gh_event: ${{ github.event_name }}
phan:
uses: ./.github/workflows/phan.yml
secrets: inherit
needs: [pre-commit]
with:
gh_event: ${{ github.event_name }}
phpstan:
uses: ./.github/workflows/phpstan.yml
secrets: inherit
needs: [pre-commit, phan]
with:
gh_event: ${{ github.event_name }}
windows-ci:
needs: [pre-commit, phan, phpstan]
secrets: inherit
uses: ./.github/workflows/windows-ci.yml
with:
gh_event: ${{ github.event_name }}
gh-travis: # Runs travis script on github runner (not on travis)
if: false
# needs: [pre-commit, phan]
# needs: [windows-ci]
secrets: inherit
uses: ./.github/workflows/gh-travis.yml
with:
gh_event: ${{ github.event_name }}

# Note (not tested, from https://github.com/orgs/community/discussions/38361)
# To cancel jobs if one failes, the following action may help
# - if: "failure()"
# uses: "andymckay/[email protected]"
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
49 changes: 49 additions & 0 deletions .github/workflows/gh-travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
# This runs a travis script inside a github runner
name: Travis
# Controls when the workflow will run
on:
# workflow called by the parent workflow ci.yml
workflow_call:
inputs:
gh_event:
required: true
type: string
# can run job manually
workflow_dispatch:

concurrency:
group: travis-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
}}
cancel-in-progress: true
env:
gh_event: ${{ inputs.gh_event || github.event_name }}
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job
gh-travis:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
fail-fast: false
# matrix:
# php-version:
# # PHPStan requires PHP >= 7.2.
# #- "7.2"
# - "8.2"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout travis file
uses: actions/checkout@v4
- name: Run .travis.yml build script
uses: ktomk/run-travis-yml@v1
with:
# run-job: travis # name of a job in travis file
allow-failure: false
# file: .travis.yml
# steps: | # Default: setup, before_install, install, before_script, script, after_script, before_deploy
# install
# script
# env:
# TRAVIS_PHP_VERSION: ${{ matrix.php-version }}
Loading

0 comments on commit 960a732

Please sign in to comment.