mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Compare commits
24 Commits
phpstan-ba
...
19.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7cd529a179 | ||
|
|
82c3849baa | ||
|
|
c932a1c878 | ||
|
|
f2f8278603 | ||
|
|
cc5a8fd15a | ||
|
|
a567cade7d | ||
|
|
764bb3791b | ||
|
|
9ac82f488e | ||
|
|
222cd76799 | ||
|
|
47799b88cf | ||
|
|
78ca968db6 | ||
|
|
aa8fac1deb | ||
|
|
2ebdcfda5c | ||
|
|
70431043af | ||
|
|
ad37ece7bc | ||
|
|
a1476fd221 | ||
|
|
0e1c580f11 | ||
|
|
4223ff08ce | ||
|
|
d16f8b68db | ||
|
|
d8891130f5 | ||
|
|
b2f9de7489 | ||
|
|
c1c2358e75 | ||
|
|
1cd3ca3222 | ||
|
|
8ddf9f6075 |
@@ -6,6 +6,7 @@ languages:
|
||||
engines:
|
||||
phpcodesniffer: true
|
||||
exclude_paths:
|
||||
- 'build/*'
|
||||
- 'dev/*'
|
||||
- 'doc/*'
|
||||
- 'test/*'
|
||||
|
||||
@@ -22,11 +22,3 @@ indent_style = tab
|
||||
indent_style = tab
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
[*.sql]
|
||||
indent_style = tab
|
||||
trim_trailing_whitespace = true
|
||||
indent_size = 4
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -21,7 +21,6 @@
|
||||
*.yml text eol=lf
|
||||
*.yaml text eol=lf
|
||||
*.conf text eol=lf
|
||||
*.neon text eol=lf
|
||||
|
||||
.bash_aliases text eol=lf
|
||||
|
||||
|
||||
107
.github/CONTRIBUTING.md
vendored
107
.github/CONTRIBUTING.md
vendored
@@ -1,90 +1,53 @@
|
||||
How to contribute to Dolibarr
|
||||
=============================
|
||||
|
||||
Submit a Bug report or a Feature request
|
||||
---------------------------------------
|
||||
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 or need help on using the software, please use [the forums](https://www.dolibarr.org/forum.php). Forums exist in different languages.
|
||||
<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 to inform about a bug or a development trouble and requests for a new feature, are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
|
||||
Default **language here is English**. So please prepare your contributions in English (we recommend using an online translation service if you don't speak English).
|
||||
Issues are managed on [GitHub](https://github.com/Dolibarr/dolibarr/issues).
|
||||
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 anyone else has already reported your issue.
|
||||
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 information whenever possible).
|
||||
5. Delete unnecessary submissions.
|
||||
6. **Check your Message at Preview before submitting.**
|
||||
6. **Check your Message at Preview before sending.**
|
||||
|
||||
|
||||
|
||||
<a name="code"></a>
|
||||
|
||||
Submit code
|
||||
<a name="code"></a>Submit code
|
||||
---------------------
|
||||
|
||||
This process describes how a Developer can submit code to the project so it can be analyzed and validated by the PR Maintainer (we call this a Pull Request).
|
||||
|
||||
Definition:
|
||||
- Developer: is the human knowing the development language of the application that wants to change some part of the code by modifying the sources of the project.
|
||||
- PR Maintainer: is the human knowing the development language and code who checks that the code submitted for approbation is correct to validate it, in other words, the PR Maintainer is the approbator of commits.
|
||||
- Release Maintainer: is the human that validates that a freeze/beta version is ok to be released officially as a stable version.
|
||||
|
||||
|
||||
### Basic workflow
|
||||
|
||||
As the Developer:
|
||||
|
||||
1. Check you agree with the terms of the [DCO - Developer's Certificate of Origin](https://github.com/Dolibarr/dolibarr/blob/develop/DCO)
|
||||
2. [Fork](https://help.github.com/articles/fork-a-repo) the [GitHub repository](https://github.com/Dolibarr/dolibarr).
|
||||
3. Clone your fork.
|
||||
4. Choose a branch(See the [Branches](#branches) section below).
|
||||
5. Read our developer documentation on the [Dolibarr Wiki](https://wiki.dolibarr.org/index.php?title=Developer_documentation).
|
||||
6. Commit and push your changes.
|
||||
7. [Make a pull request](https://help.github.com/articles/creating-a-pull-request).
|
||||
|
||||
As the PR Maintainer:
|
||||
|
||||
7. The PR Maintainer will check and decide if he approves or not the commits. During this step, the PR Maintainer can modify your own code to make it valid for approbation or ask you to make the change yourself. For this the PR Maintainer may add commits to a PR. Depending on the tools used (can be done from github directly or from an IDE), such commits may be done directly after validating your PR (for example to complete it).
|
||||
|
||||
As the Release Maintainer:
|
||||
|
||||
8. A tag will be added to take a snapshot of the code with all the changes approved by PR Maintainers, when ready to do a release.
|
||||
|
||||
|
||||
Note: Project leader(Master Yoda and BDFL) retains all above roles and can directly commit to the project without a PR. Of course anyone can check commit history and comment!
|
||||
|
||||
1. [Fork](https://help.github.com/articles/fork-a-repo) the [GitHub repository](https://github.com/Dolibarr/dolibarr).
|
||||
2. Clone your fork.
|
||||
3. Choose a branch(See the [Branches](#branches) section below).
|
||||
4. Read our developer documentation on the [Dolibarr Wiki](https://wiki.dolibarr.org/index.php?title=Developer_documentation).
|
||||
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
|
||||
|
||||
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 make a pull request against the oldest version affected.
|
||||
|
||||
We recommend to push it into N - 2 where N is the latest version available, if not possible into version N - 1, and finally into develop.
|
||||
|
||||
The rule N - 2 is just a tip if you don't know which version to choose to get the best compromise between ease of correction and number of potential beneficiaries of the correction.
|
||||
|
||||
If you push a bug fix on a very old version it is still going to be merged and propagated into newer versions(choose wisely because old versions depend on old deprecated/unsupported versions of PHP and external libraries).
|
||||
If you're fixing a bug, it is preferred that you cook your fix and pull request it against an oldest version affected.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
- As the Developer, please don't edit the ChangeLog file. This file is generated from all commit messages during the release process by the Project releaser.
|
||||
|
||||
- As the Developer: Do not submit changes into files xx_XX/afile.lang. They are language files and are updated/synced automatically from Transifex. If you need to add a new language file, just add it for the en_US language.
|
||||
|
||||
- As the Release Maintainer: The Release Maintainer will decide to make a new release as soon as the planning of the release is reached and the code in the branch to release reach the status of "No more known serious bugs".
|
||||
|
||||
|
||||
<a name="commits"></a>
|
||||
|
||||
### Commits
|
||||
|
||||
### <a name="commits"></a>Commits
|
||||
Use clear commit messages with the following structure:
|
||||
|
||||
```plaintext
|
||||
@@ -140,30 +103,26 @@ FIX|Fix #456 Short description (where #456 is number of bug fix, if it exists. I
|
||||
or
|
||||
CLOSE|Close #456 Short description (where #456 is number of feature request, if it exists. In upper case to appear into ChangeLog)
|
||||
or
|
||||
NEW|New|QUAL|Qual|PERF|Perf Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #xxx)
|
||||
NEW|New|QUAL|Qual|PERF|Perf Short description (In upper case to appear into ChangeLog, use this if you add a feature not tracked, otherwise use CLOSE #456)
|
||||
or
|
||||
Short description (when the commit is not introducing a feature nor closing a bug)
|
||||
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...
|
||||
|
||||
* A PR must be atomic. It means it must contains the lower possible changes for 1 need (1 bug fix or 1 new feature) without breaking usability of code. If a PR can be split into several PRs, it often means your PR is not atomic. For PR on maintenance versions, the modified code must be as low as possible and only the absolutely necessary changes are allowed (You must have the number of lines modified as low as possible to have the visible bug fixed (no refactoring, no perf, no quality, no renaming must be joined). This allow to reduce to the maximum the number of future conflicts (so the number of regressions) when merging fixes into higher version to reduce the time of any future impact analysis.
|
||||
* A PR must be atomic. It means it must contains the lower possible changes for 1 need (1 bug fix or 1 new feature) without breaking usability of code. If a PR can be split into several PRs, it often means your PR is not atomic.
|
||||
|
||||
* Your Pull Request (PR) must pass the Continuous Integration checks and code quality checks.
|
||||
|
||||
* 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 behavior.
|
||||
|
||||
Also, some code changes need a prior approbation:
|
||||
|
||||
* if you want to include a new external library (into htdocs/includes directory), please contact the core project manager first (mention @dolibarr-jedi in your issue) to see if such a library can be accepted.
|
||||
* 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.
|
||||
|
||||
* if you add new tables or fields, you MUST first submit a standalone PR with the data structure changes you plan to add/modify (and only data structure changes). Start development only once this data structure has been accepted.
|
||||
|
||||
@@ -171,12 +130,12 @@ Once a PR has been submitted, you may need to wait for its integration. It is co
|
||||
|
||||
If the label of PR start with "Draft" or "WIP" (Work In Progress), it will not be analyzed for merging until you change the label of the PR (but it can be analyzed for discussion).
|
||||
|
||||
If your PR has errors reported by the Continuous Integration Platform, it means your PR is not valid and nothing will be done with it. It will be kept open to allow developers to fix this, or it may be closed several months later. Don't expect anything on your PR if you have such errors, you MUST first fix the Continuous Integration error to have it taken into consideration.
|
||||
If your PR has errors reported by the Continuous Integration Platform, it means your PR is not valid and nothing will be done with it. It will be kept open to allow developers to fix this, or it may be closed several month later. Don't expect anything on your PR if you have such errors, you MUST first fix the Continuous Integration error to have it taken into consideration.
|
||||
|
||||
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 explains 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 asks you. The majority of open PRs are waiting an action of the author of the PR.
|
||||
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 PRs 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 PRs in Open Source world for a major project. Don't expect the core team to reach 100%.
|
||||
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.
|
||||
|
||||
|
||||
@@ -185,15 +144,15 @@ A so high ratio is very rare on a so popular project and with the increasing pop
|
||||
|
||||
Translations
|
||||
------------
|
||||
The source language (en_US) is maintained in the repository.
|
||||
The source language (en_US) is maintained in the repository. See the [Code](#code) section above.
|
||||
|
||||
All other translations are managed online at [Transifex](https://www.transifex.com/dolibarr-association/dolibarr/).
|
||||
|
||||
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 assumes 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 translations of a source text and restore the translation in one click with no need to retranslate it if there is no need to.
|
||||
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.
|
||||
|
||||
|
||||
### Resources
|
||||
|
||||
29
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
29
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -19,9 +19,20 @@ body:
|
||||
- type: input
|
||||
id: environment-version
|
||||
attributes:
|
||||
label: Dolibarr Version
|
||||
label: Environment 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
|
||||
@@ -35,10 +46,22 @@ body:
|
||||
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 and expected behavior
|
||||
label: Steps to reproduce the behavior
|
||||
description: Verbose description
|
||||
|
||||
- type: textarea
|
||||
|
||||
7
.github/PULL_REQUEST_TEMPLATE.md
vendored
7
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,9 +1,8 @@
|
||||
# Instructions
|
||||
*This is a template to help you make good pull requests. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.*
|
||||
*Please:*
|
||||
- *only keep the "FIX", "CLOSE", "NEW", "UIUX", PERF" or "QUAL" section* (use uppercase to have the PR appears into the ChangeLog, lowercase will not appears)
|
||||
- *only keep the "FIX", "CLOSE", "NEW", "PERF" or "QUAL" section* (use uppercase to have the PR appears into the ChangeLog, lowercase will not appears)
|
||||
- *follow the project [contributing guidelines](/.github/CONTRIBUTING.md)*
|
||||
- ***in particular, in case of a bugfix, please check that you are targetting the branch corresponding to the oldest version in which the bug occurs***
|
||||
- *replace the bracket enclosed texts with meaningful information*
|
||||
|
||||
|
||||
@@ -19,10 +18,6 @@
|
||||
[*Long description*]
|
||||
|
||||
|
||||
# UIUX|Uiux [*Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
||||
# PERF|Perf #[*issue_number Short description*]
|
||||
[*Long description*]
|
||||
|
||||
|
||||
13
.github/dependabot.yml
vendored
13
.github/dependabot.yml
vendored
@@ -1,19 +1,6 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
allow:
|
||||
# Allow production updates only (can do a AND, several entries are doing a OR)
|
||||
- dependency-type: "production"
|
||||
#- dependency-type: "direct"
|
||||
exclude-paths:
|
||||
- 'dev'
|
||||
- 'tests/acceptance'
|
||||
- 'tests/selenium'
|
||||
|
||||
0
.github/tmp/.gitkeep
vendored
0
.github/tmp/.gitkeep
vendored
33
.github/workflows/README.md
vendored
33
.github/workflows/README.md
vendored
@@ -1,33 +0,0 @@
|
||||
# CI Workflows
|
||||
|
||||
The 2 main CI workflows are:
|
||||
----------------------------
|
||||
|
||||
- ci-on-pull_request.yml
|
||||
- ci-on-push.yml
|
||||
|
||||
This run the actions:
|
||||
|
||||
- pre-commit.yml
|
||||
- phan.yml
|
||||
- phpstan.yml
|
||||
When all succeed, start:
|
||||
- Windows-ci;
|
||||
|
||||
See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
|
||||
|
||||
|
||||
The other worklows are:
|
||||
-----------------------
|
||||
|
||||
- ci-stale-issues-safe to autoclose old issues.
|
||||
- ci-phpstan_baseline to update the phpstan baseline file.
|
||||
- ci-cache-clean-pr to clean cache when closing a PR.
|
||||
- ci-test to make CI tests
|
||||
|
||||
Some tests workflows are:
|
||||
------------------------
|
||||
|
||||
- pr-18
|
||||
- pr-18-autolbal
|
||||
- test
|
||||
39
.github/workflows/ci-cache-clean-pr.yml
vendored
39
.github/workflows/ci-cache-clean-pr.yml
vendored
@@ -1,39 +0,0 @@
|
||||
---
|
||||
# This clean the caches of a branch when we close the pull request.
|
||||
# See https://github.com/actions/cache/blob/main/tips-and-workarounds.md#force-deletion-of-caches-overriding-default-cache-eviction-policy
|
||||
name: Cleanup caches of a closed branch
|
||||
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@v6
|
||||
- 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 }}
|
||||
29
.github/workflows/ci-checkfilesetlock.yml
vendored
29
.github/workflows/ci-checkfilesetlock.yml
vendored
@@ -1,29 +0,0 @@
|
||||
---
|
||||
# This is a basic workflow to check the lock on major version (to lock some files on certified versions)
|
||||
name: Check fileset lock
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: check-${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
checkmajorversion:
|
||||
name: Check lock on fileset unalterable_files with generate_filelist_xml.php
|
||||
runs-on: ubuntu-latest
|
||||
# Do not run schedule on forks
|
||||
if: |
|
||||
github.repository == 'Dolibarr/dolibarr'
|
||||
|| github.event.schedule == false
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.2
|
||||
coverage: none # disable xdebug, pcov
|
||||
- name: Run generate_filelist_xml.php
|
||||
run: |
|
||||
# shellcheck disable=2086
|
||||
dev/build/generate_filelist_xml.php checklock=auto unalterable_files
|
||||
42
.github/workflows/ci-on-pull_request.yml
vendored
42
.github/workflows/ci-on-pull_request.yml
vendored
@@ -1,42 +0,0 @@
|
||||
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]
|
||||
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
|
||||
# needs: [pre-commit, phan, phpstan]
|
||||
# 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 fails, the following action may help
|
||||
# - if: "failure()"
|
||||
# uses: "andymckay/cancel-action@0.3"
|
||||
42
.github/workflows/ci-on-push.yml
vendored
42
.github/workflows/ci-on-push.yml
vendored
@@ -1,42 +0,0 @@
|
||||
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]
|
||||
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
|
||||
# needs: [pre-commit, phan, phpstan]
|
||||
# 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 fails, the following action may help
|
||||
# - if: "failure()"
|
||||
# uses: "andymckay/cancel-action@0.3"
|
||||
24
.github/workflows/ci-on-release.yml
vendored
Normal file
24
.github/workflows/ci-on-release.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: "CI-RELEASE"
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
trigger-docker:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Generate a token
|
||||
id: generate-token
|
||||
uses: actions/create-github-app-token@v2
|
||||
with:
|
||||
app-id: ${{ vars.RELEASE_DOCKER_ID }}
|
||||
private-key: ${{ secrets.RELEASE_DOCKER_SECRET }}
|
||||
|
||||
- uses: peter-evans/repository-dispatch@v4
|
||||
with:
|
||||
token: ${{ steps.generate-token.outputs.token }}
|
||||
repository: Dolibarr/dolibarr-docker
|
||||
event-type: new-release
|
||||
client-payload: '{"version": "${{ github.event.release.tag_name }}"}'
|
||||
82
.github/workflows/ci-phpstan_baseline.yml
vendored
82
.github/workflows/ci-phpstan_baseline.yml
vendored
@@ -1,82 +0,0 @@
|
||||
---
|
||||
# This run the script to update the phpstan baseline file dev/build/phpstan/phpstan-baseline.neon
|
||||
name: 'PHPStan baseline'
|
||||
|
||||
on:
|
||||
# Every day we want to refresh the baseline
|
||||
schedule:
|
||||
- cron: '0 12 * * *'
|
||||
|
||||
# We want to be able to manually refresh the baseline too
|
||||
workflow_dispatch:
|
||||
|
||||
workflow_call:
|
||||
inputs:
|
||||
gh_event:
|
||||
required: true
|
||||
type: string
|
||||
# Run PHPStan analyse on pull requests
|
||||
# pull_request:
|
||||
|
||||
permissions: {} # none
|
||||
|
||||
env:
|
||||
PHP_VERSION: '8.2'
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
CACHE_KEY_PART: ${{ ( inputs.gh_event == 'pull_request' || github.event_name == 'pull_request' ) && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_name }}
|
||||
jobs:
|
||||
phpstan:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ env.PHP_VERSION }}
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phpstan:2.1.12, cs2pr
|
||||
extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap,
|
||||
mysql, pgsql, sqlite3, ldap, xml, mcrypt
|
||||
env:
|
||||
fail-fast: true
|
||||
# Restore old cache
|
||||
- name: Restore phpstan cache
|
||||
id: cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ./.github/tmp
|
||||
key: phpstan-cache-${{ env.PHP_VERSION }}-${{ env.CACHE_KEY_PART }}-${{
|
||||
github.run_id }}
|
||||
restore-keys: |
|
||||
phpstan-cache-${{ env.PHP_VERSION }}-${{ env.CACHE_KEY_PART }}-
|
||||
phpstan-cache-${{ env.PHP_VERSION }}-${{ github.head_ref }}-
|
||||
phpstan-cache-${{ env.PHP_VERSION }}-${{ github.base_ref }}-
|
||||
phpstan-cache-${{ env.PHP_VERSION }}-
|
||||
- uses: ruudk/phpstan-baseline-refresh-create-pr-action@main
|
||||
with:
|
||||
github_token: ${{ env.GH_TOKEN }}
|
||||
phpstan_path: phpstan
|
||||
configuration_path: phpstan.neon.dist
|
||||
phpstan_additional_arguments: --memory-limit 7G -a dev/build/phpstan/bootstrap_action.php
|
||||
baseline_path: dev/build/phpstan/phpstan-baseline.neon
|
||||
commit_name: Dolibot
|
||||
commit_email: dolibarr-bot@users.noreply.github.com
|
||||
commit_message: PHPStan > Update baseline
|
||||
target_branch: develop
|
||||
# pr_create: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 1 || 0 }}
|
||||
pr_create: 1
|
||||
pr_title: PHPStan > Update baseline
|
||||
pr_reviewer: eldy
|
||||
pr_body: |
|
||||
This PR is automatically created to cleanup our baseline.
|
||||
|
||||
Since the last refresh of the baseline we have fixed {0} ignored errors.
|
||||
|
||||
Keep it up all! :muscle:
|
||||
|
||||
There are only {1} ignored errors left :sweat_smile:
|
||||
45
.github/workflows/ci-pr-devcamp.yaml.disabled
vendored
45
.github/workflows/ci-pr-devcamp.yaml.disabled
vendored
@@ -1,45 +0,0 @@
|
||||
# Action to prepare the github action
|
||||
# Go on Dolibarr Organization - Settings - Developer settings - GitHub App (https://github.com/organizations/Dolibarr/settings/apps)
|
||||
# Create an App: Enter a name + In Home page URL use https://github.com/Dolibarr/dolibarr + Disable webhook
|
||||
# Set Permissions (see other app for list of permissions)
|
||||
# Click on generate the private keys
|
||||
# Click on Install application - choose the repository of the bot
|
||||
# Go on Organisation - Secret and variables and create a secret PR_SECRET_KEY and copy the content of received private key. Choose the repository access to "Repository Dolibarr".
|
||||
# Go on Organisation - Secret and variables and create a variable PR_APP_ID and copy the ID of the previously create ID. Choose the repository access to "Repository Dolibarr".
|
||||
#
|
||||
|
||||
name: Set the tag with devcamp label during the session of a devcamp
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened]
|
||||
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
add-label-devcamp:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
#- name: Install GitHub CLI
|
||||
# run: sudo apt-get install gh
|
||||
|
||||
- name: Generate a token
|
||||
id: generate-token
|
||||
uses: actions/create-github-app-token@v2
|
||||
with:
|
||||
app-id: ${{ vars.PR_APP_ID }}
|
||||
private-key: ${{ secrets.PR_SECRET_KEY }}
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Assign label
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
url: ${{ github.event.pull_request.html_url }}
|
||||
run: |
|
||||
echo "env.url=${{env.url}}"
|
||||
gh pr edit "${{env.url}}" --add-label "Event: DevCamp 2025 XXX"
|
||||
28
.github/workflows/ci-stale-issues-safe.yml
vendored
28
.github/workflows/ci-stale-issues-safe.yml
vendored
@@ -1,28 +0,0 @@
|
||||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: "Close stale issues (bugs and feature requests)"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 21 * * *"
|
||||
issue_comment:
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {} # none
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
permissions:
|
||||
issues: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: Dolibarr/stale@staleunstale
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).'
|
||||
stale-label: 'Issue Stale (automatic label)'
|
||||
exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,hacktoberfest,hacktoberfest-accepted,good first issue,Bug Security (CVE),Analysis of PR in progress'
|
||||
days-before-stale: 365
|
||||
days-before-close: 10
|
||||
operations-per-run: 100
|
||||
dry-run: false
|
||||
24
.github/workflows/ci-tag-check.yml.disabled
vendored
24
.github/workflows/ci-tag-check.yml.disabled
vendored
@@ -1,24 +0,0 @@
|
||||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: "Check tag branch"
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "18.*"
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Verify tag is on main
|
||||
run: |
|
||||
TAG_COMMIT=$(git rev-list -n 1 $GITHUB_REF)
|
||||
if ! git branch --contains $TAG_COMMIT | grep -q "18.0"; then
|
||||
echo "The tag must be on branch 18.0"
|
||||
exit 1
|
||||
fi
|
||||
38
.github/workflows/doxygen-gh-pages.yml.disabled
vendored
Normal file
38
.github/workflows/doxygen-gh-pages.yml.disabled
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: Doxygen
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 15 * * *"
|
||||
workflow_dispatch:
|
||||
branches:
|
||||
- develop
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Build
|
||||
uses: DenverCoder1/doxygen-github-pages-action@v1.2.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: gh-pages
|
||||
folder: build/html
|
||||
config_file: build/doxygen/dolibarr-doxygen.doxyfile
|
||||
|
||||
# - name: Deploy
|
||||
# uses: JamesIves/github-pages-deploy-action@v4
|
||||
# with:
|
||||
# branch: gh-pages
|
||||
# folder: build/html # The folder the action should deploy.
|
||||
# target-folder: docs/html2
|
||||
|
||||
#jobs:
|
||||
# doxygen:
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: 'Doxygen'
|
||||
# uses: mattnotmitt/doxygen-action@1.9.5
|
||||
# with:
|
||||
# doxyfile-path: build/doxygen
|
||||
27
.github/workflows/exakat.yml
vendored
Normal file
27
.github/workflows/exakat.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: "Exakat analysis"
|
||||
|
||||
on:
|
||||
# execute once a month, the 1st
|
||||
schedule:
|
||||
- cron: "0 20 1 * *"
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
exakat:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- 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_dirs: '/htdocs/includes/,/htdocs/install/doctemplates/,/build/,/dev/,/doc/,/scripts/,/test/'
|
||||
file_extensions: php
|
||||
project_reports: Perfile
|
||||
49
.github/workflows/gh-travis.yml.disabled
vendored
49
.github/workflows/gh-travis.yml.disabled
vendored
@@ -1,49 +0,0 @@
|
||||
---
|
||||
# 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@v5
|
||||
- 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 }}
|
||||
@@ -217,7 +217,7 @@ jobs:
|
||||
a2query -s
|
||||
a2query -m
|
||||
ls /etc/apache2/sites-available
|
||||
#sudo cp -f $GITHUB_WORKSPACE/dev/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf
|
||||
#sudo cp -f $GITHUB_WORKSPACE/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf
|
||||
#sudo sed -e "s?%GITHUB_WORKSPACE%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||
a2ensite 000-default
|
||||
a2enmod php7.1
|
||||
@@ -362,3 +362,4 @@ jobs:
|
||||
phpunitresult=$?
|
||||
echo "Phpunit return code = $phpunitresult"
|
||||
set +e
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ jobs:
|
||||
a2query -s
|
||||
a2query -m
|
||||
ls /etc/apache2/sites-available
|
||||
#sudo cp -f $GITHUB_WORKSPACE/dev/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf
|
||||
#sudo cp -f $GITHUB_WORKSPACE/build/travis-ci/apache-githubaction.conf /etc/apache2/sites-available/000-default.conf
|
||||
#sudo sed -e "s?%GITHUB_WORKSPACE%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||
a2ensite 000-default
|
||||
a2enmod php8.1
|
||||
@@ -331,3 +331,4 @@ jobs:
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
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 .
|
||||
|
||||
|
||||
13
.github/workflows/greetings-pr.yml.disabled
vendored
Normal file
13
.github/workflows/greetings-pr.yml.disabled
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: Greetings PR
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
greeting:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
pr-message: 'Welcome to the Dolibarr army. You are on the road to become an Admiral (see https://wiki.dolibarr.org/index.php/Dolibarr_Project)'
|
||||
46
.github/workflows/phan.yml
vendored
46
.github/workflows/phan.yml
vendored
@@ -1,46 +0,0 @@
|
||||
---
|
||||
# This is a basic workflow to check code with PHPSTAN tool
|
||||
name: Phan
|
||||
|
||||
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: phan-${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
PHAN_CONFIG: dev/tools/phan/config.php
|
||||
PHAN_BASELINE: dev/tools/phan/baseline.txt
|
||||
PHAN_MIN_PHP: 7.2
|
||||
PHAN_QUICK: ${{ github.event.schedule && '' || '--quick' }}
|
||||
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
|
||||
|
||||
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@v6
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 8.2
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phan
|
||||
- name: Run Phan analysis
|
||||
run: |
|
||||
# shellcheck disable=2086
|
||||
phan $PHAN_QUICK -k "$PHAN_CONFIG" -B "$PHAN_BASELINE" --analyze-twice --minimum-target-php-version "$PHAN_MIN_PHP" --output-mode=github
|
||||
30
.github/workflows/phpcs.yml
vendored
Normal file
30
.github/workflows/phpcs.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: "PHPCS"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "**.php"
|
||||
- "phpcs.xml"
|
||||
- ".github/workflows/phpcs.yml"
|
||||
|
||||
jobs:
|
||||
phpcs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 50 # important!
|
||||
|
||||
# we may use whatever way to install phpcs, just specify the path on the next step
|
||||
# however, curl seems to be the fastest
|
||||
- name: Install PHP_CodeSniffer
|
||||
run: |
|
||||
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
|
||||
php phpcs.phar --version
|
||||
|
||||
- uses: thenabeel/action-phpcs@v8
|
||||
with:
|
||||
files: "**.php" # you may customize glob as needed
|
||||
phpcs_path: php phpcs.phar
|
||||
standard: dev/setup/codesniffer/ruleset.xml
|
||||
fail_on_warnings: false
|
||||
63
.github/workflows/phpcsfixer.yml.disabled
vendored
Normal file
63
.github/workflows/phpcsfixer.yml.disabled
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
name: GitHub CI PHPCS and PHPCBF
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
#on:
|
||||
# push:
|
||||
# paths:
|
||||
# - '**.php'
|
||||
|
||||
jobs:
|
||||
#filesChanged:
|
||||
# uses: ./.github/workflows/files_changed.yaml
|
||||
# with:
|
||||
# folder_path: .*
|
||||
|
||||
linter_name:
|
||||
name: Run & fix PHP Code Sniffer
|
||||
runs-on: ubuntu-latest
|
||||
#needs: filesChanged
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
# fetch-depth: 10
|
||||
|
||||
- name: echo Get list of all changed files
|
||||
run: |
|
||||
#echo ${{ needs.filesChanged.outputs.all_changed_files }}
|
||||
#echo boolean_output=${{ needs.filesChanged.outputs.boolean_output }}
|
||||
echo github.head_ref=${{github.head_ref}}
|
||||
echo github.base_ref=${{github.base_ref}}
|
||||
echo github.ref_name=${{github.ref_name}}
|
||||
|
||||
- uses: eldy/phpcsfixer-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
use_default_configuration_file: false
|
||||
phpcs_standard: 'dev/setup/codesniffer/ruleset.xml'
|
||||
phpcs_head_ref: ${{github.head_ref}}
|
||||
phpcs_base_ref: ${{github.base_ref}}
|
||||
phpcs_ref_name: ${{github.ref_name}}
|
||||
phpcs_github_event_name: ${{github.event_name}}
|
||||
phpcs_files: ${{ needs.filesChanged.outputs.all_changed_files }}
|
||||
|
||||
#- uses: stefanzweifel/git-auto-commit-action@v4 # auto commit the fixes action for GitHub
|
||||
# with:
|
||||
# commit_message: Fix PHPCS errors by GitHub PHPCSfixer action
|
||||
|
||||
- name: Commit changes
|
||||
uses: EndBug/add-and-commit@v9.1.3
|
||||
with:
|
||||
default_author: github_actions
|
||||
committer_name: GitHub Actions
|
||||
committer_email: actions@github.com
|
||||
#author_name: PHP CS fixer
|
||||
#author_email: eldy@destailleur.fr
|
||||
#committer_name: PHP CS fixer
|
||||
#committer_email: eldy@destailleur.fr
|
||||
message: 'PHP CS fixer github action'
|
||||
add: '*.php'
|
||||
|
||||
95
.github/workflows/phpstan.yml
vendored
95
.github/workflows/phpstan.yml
vendored
@@ -1,95 +0,0 @@
|
||||
---
|
||||
# This is a basic workflow to check code with PHPSTAN tool
|
||||
name: PHPStan
|
||||
|
||||
# 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: phpstan-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
CACHE_KEY_PART: ${{ ( inputs.gh_event == 'pull_request' || github.event_name == 'pull_request' ) && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_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
|
||||
php-stan:
|
||||
# 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:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v6
|
||||
# Get PHP and addons
|
||||
- name: Setup PHP
|
||||
id: setup-php
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phpstan:2.1.12, cs2pr
|
||||
extensions: calendar, json, imagick, gd, zip, mbstring, intl, opcache, imap,
|
||||
mysql, pgsql, sqlite3, ldap, xml, mcrypt
|
||||
|
||||
# Restore old cache
|
||||
- name: Restore phpstan cache
|
||||
id: cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ./.github/tmp
|
||||
key: phpstan-cache-${{ matrix.php-version }}-${{ env.CACHE_KEY_PART }}-${{
|
||||
github.run_id }}
|
||||
restore-keys: |
|
||||
phpstan-cache-${{ matrix.php-version }}-${{ env.CACHE_KEY_PART }}-
|
||||
phpstan-cache-${{ matrix.php-version }}-${{ github.head_ref }}-
|
||||
phpstan-cache-${{ matrix.php-version }}-${{ github.base_ref }}-
|
||||
phpstan-cache-${{ matrix.php-version }}-
|
||||
- name: Show debug into
|
||||
run: cd ./.github/tmp && ls -al
|
||||
|
||||
# Run PHPStan
|
||||
- name: Run PHPStan
|
||||
id: phpstan
|
||||
run: |
|
||||
phpstan -vvv analyse --error-format=checkstyle --memory-limit 7G -a dev/build/phpstan/bootstrap_action.php | tee _stan.xml | cs2pr --graceful-warnings
|
||||
# continue-on-error: true
|
||||
|
||||
# Save cache
|
||||
- name: Save phpstan cache
|
||||
uses: actions/cache/save@v4
|
||||
if: ${{ success() || ( ! cancelled() && steps.cache.outputs.cache-hit != 'true' ) }}
|
||||
with:
|
||||
path: ./.github/tmp
|
||||
key: phpstan-cache-${{ matrix.php-version }}-${{ env.CACHE_KEY_PART }}-${{
|
||||
github.run_id }}
|
||||
- name: Provide phpstan log as artifact
|
||||
uses: actions/upload-artifact@v5
|
||||
if: ${{ always() }}
|
||||
with:
|
||||
name: phpstan-srcrt
|
||||
path: ${{ github.workspace }}/_stan.xml
|
||||
retention-days: 2
|
||||
# Run PHPStan generate baseline
|
||||
# - name: Run PHPStan generate baseline
|
||||
# id: phpstan-baseline
|
||||
# if: ${{ success() }}
|
||||
# run: |
|
||||
# phpstan -vv analyse --memory-limit 7G -a dev/build/phpstan/bootstrap_action.php --generate-baseline dev/build/phpstan/phpstan-baseline.neon
|
||||
99
.github/workflows/pre-commit.yml
vendored
99
.github/workflows/pre-commit.yml
vendored
@@ -1,23 +1,8 @@
|
||||
---
|
||||
name: pre-commit
|
||||
|
||||
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: pre-commit-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
|
||||
}}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
|
||||
pull_request:
|
||||
push:
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -25,33 +10,15 @@ jobs:
|
||||
RAW_LOG: pre-commit.log
|
||||
CS_XML: pre-commit.xml
|
||||
steps:
|
||||
#- name: Install required tools
|
||||
# run: sudo apt-get update && sudo apt-get install cppcheck
|
||||
# if: false
|
||||
- name: Install required tools
|
||||
run: sudo apt-get update && sudo apt-get install cppcheck
|
||||
if: false
|
||||
|
||||
# Checkout git sources to analyze
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Try to get the list of modified files into steps.changed-php.outputs.all_changed_files
|
||||
#- name: Get changed files
|
||||
# id: changed-files
|
||||
# uses: actions/github-script@v7
|
||||
# with:
|
||||
# script: |
|
||||
# const base = context.payload.pull_request?.base?.sha;
|
||||
# const head = context.payload.pull_request?.head?.sha;
|
||||
# const response = await github.rest.repos.compareCommits({
|
||||
# owner: context.repo.owner,
|
||||
# repo: context.repo.repo,
|
||||
# base,
|
||||
# head
|
||||
# });
|
||||
#
|
||||
# const changedFiles = response.data.files.map(file => file.filename);
|
||||
# core.setOutput("all_changed_files", changedFiles.join(" "));
|
||||
|
||||
# Another method to get the list of changed files
|
||||
# It sets the variable steps.changed-php.outputs.all_changed_files for other steps
|
||||
# The next uses the git API because there is no clone yet.
|
||||
# This is faster for a big repo.
|
||||
- name: Get all changed php files (if PR)
|
||||
id: changed-php
|
||||
if: env.gh_event == 'pull_request'
|
||||
@@ -59,92 +26,68 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: ./.github/scripts/get_changed_php.sh
|
||||
|
||||
#- name: Print changed files
|
||||
# run: echo "Changed files are ${{ steps.changed-files.outputs.all_changed_files }}"
|
||||
|
||||
# Action setup-python needs a requirements.txt or pyproject.toml
|
||||
# This ensures one of them exists.
|
||||
- name: Create requirements.txt if no requirements.txt or pyproject.toml
|
||||
run: |-
|
||||
[ -r requirements.txt ] || [ -r pyproject.toml ] || touch requirements.txt
|
||||
# Install python and pre-commit tool
|
||||
- uses: actions/setup-python@v6
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
cache: pip
|
||||
python-version: "3.11"
|
||||
- run: python -m pip install pre-commit
|
||||
|
||||
# Restore previous cache of precommit
|
||||
- uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: ~/.cache/pre-commit/
|
||||
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
|
||||
# Run all the precommit tools (defined in pre-commit-config.yaml).
|
||||
- name: Extract PHP version
|
||||
id: extract-php-version
|
||||
run: |
|
||||
# shellcheck disable=SC2016
|
||||
PHP_VERSION=$(sed -n 's/.*\$arrayphpmaxversionwarning\s*=\s*array\s*(\s*\([0-9]\+\)\s*,\s*\([0-9]\+\).*/\1.\2/p' htdocs/install/check.php)
|
||||
echo "PHP_VERSION=$PHP_VERSION" >> "$GITHUB_ENV"
|
||||
echo "PHP_VERSION=$PHP_VERSION" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup PHPCS
|
||||
uses: shivammathur/setup-php@v2
|
||||
# Install proper php version, and also install phpcs which may be needed
|
||||
if: |
|
||||
! cancelled() &&
|
||||
(
|
||||
steps.changed-php.outputs.any_changed == 'true'
|
||||
||
|
||||
(
|
||||
env.gh_event == 'push'
|
||||
&& (
|
||||
github.event.ref == 'refs/heads/develop'
|
||||
|| endsWith(github.event.ref, '.0')
|
||||
)
|
||||
)
|
||||
)
|
||||
with:
|
||||
php-version: ${{ env.PHP_VERSION }} # Version from check.php
|
||||
coverage: none # disable xdebug, pcov
|
||||
tools: phpcs
|
||||
|
||||
# Install perltidy and perlcritic
|
||||
- name: Install perltidy and perlcritic
|
||||
run: sudo apt-get update && sudo apt-get install -y perltidy libperl-critic-perl
|
||||
|
||||
# Run all the precommit tools (defined into pre-commit-config.yaml).
|
||||
# We can force exclusion of some of them here.
|
||||
- name: Run pre-commit hooks
|
||||
env:
|
||||
# SKIP is used by pre-commit to not execute certain hooks
|
||||
SKIP: no-commit-to-branch,php-cs,php-cbf,trailing-whitespace,end-of-file-fixer
|
||||
SKIP: no-commit-to-branch,php-cs,php-cbf,trailing-whitespace,end-of-file-fixer,check-json,check-executables-have-shebangs,check-shebang-scripts-are-executable,beautysh,yamllint,shellcheck
|
||||
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)
|
||||
# id: changed-php
|
||||
# uses: tj-actions/changed-files@v45
|
||||
# if: env.gh_event == 'pull_request'
|
||||
# uses: tj-actions/changed-files@v42
|
||||
# if: github.event_name == 'pull_request'
|
||||
# with:
|
||||
# files: |
|
||||
# **.php
|
||||
|
||||
- name: Run some pre-commit hooks on selected changed files only
|
||||
if: "! cancelled() && steps.changed-php.outputs.any_changed == 'true'"
|
||||
if: steps.changed-php.outputs.any_changed == 'true'
|
||||
env:
|
||||
ALL_CHANGED_FILES: ${{ steps.changed-php.outputs.all_changed_files }}
|
||||
run: |
|
||||
set -o pipefail
|
||||
# shellcheck disable=2086
|
||||
pre-commit run php-cs --files ${ALL_CHANGED_FILES} | tee -a "${RAW_LOG}"
|
||||
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: |
|
||||
env.gh_event == 'push'
|
||||
github.event_name == 'push'
|
||||
&& (
|
||||
github.event.ref == 'refs/heads/develop'
|
||||
|| endsWith(github.event.ref, '.0')
|
||||
@@ -152,12 +95,11 @@ 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}
|
||||
ls -l ~/.cache/pre-commit/
|
||||
|
||||
- name: Convert Raw Log to Annotations
|
||||
uses: mdeweerd/logToCheckStyle@v2025.11.2
|
||||
uses: mdeweerd/logToCheckStyle@v2024.2.9
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
in: ${{ env.RAW_LOG }}
|
||||
@@ -170,10 +112,11 @@ jobs:
|
||||
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
# Upload result log files of precommit into the Artifact shared store
|
||||
- name: Provide log as artifact
|
||||
uses: actions/upload-artifact@v5
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ ! cancelled() }}
|
||||
with:
|
||||
name: precommit-logs
|
||||
path: |
|
||||
${{ env.RAW_LOG }}
|
||||
${{ env.CS_XML }}
|
||||
retention-days: 2
|
||||
|
||||
29
.github/workflows/stale-issues-safe.yml
vendored
Normal file
29
.github/workflows/stale-issues-safe.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions
|
||||
name: "Close stale issues (bugs and feature requests)"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 21 * * *"
|
||||
issue_comment:
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {} # no restriction by default
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
permissions:
|
||||
issues: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: Dolibarr/stale@staleunstale
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).'
|
||||
stale-label: 'Issue Stale (automatic label)'
|
||||
exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,hacktoberfest,hacktoberfest-accepted,good first issue,Bug Security (CVE),Analysis of PR in progress'
|
||||
days-before-stale: 365
|
||||
days-before-close: 10
|
||||
operations-per-run: 100
|
||||
dry-run: false
|
||||
|
||||
199
.github/workflows/windows-ci.yml
vendored
199
.github/workflows/windows-ci.yml
vendored
@@ -1,199 +0,0 @@
|
||||
---
|
||||
name: Win CI
|
||||
|
||||
# yamllint disable-line rule:truthy
|
||||
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: win-ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref
|
||||
}}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
gh_event: ${{ inputs.gh_event || github.event_name }}
|
||||
PHPUNIT_LOG: phpunit_tests.log
|
||||
DOLIBARR_LOG: documents/dolibarr.log
|
||||
PHPSERVER_LOG: phpserver.log
|
||||
PHPSERVER_DOMAIN_PORT: 127.0.0.1:8000 # could be 127.0.0.1:8000 if config modified
|
||||
CACHE_KEY_PART: ${{ ( inputs.gh_event == 'pull_request' || github.event_name == 'pull_request' ) && format('{0}-{1}', github.base_ref, github.head_ref) || github.ref_name }}
|
||||
PHP_INI_SCAN_DIR: C:\myphpini
|
||||
CKEY: win-ci-2
|
||||
GITHUB_JSON: ${{ toJSON(github) }} # Helps in debugging Github Action
|
||||
|
||||
jobs:
|
||||
win-test:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest]
|
||||
# php_version: [7.4, 8.0] # Add more versions if needed
|
||||
php_version: [7.4] # Add more versions if needed
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php_version }}
|
||||
# ini-values: post_max_size=256M, max_execution_time=180
|
||||
extensions: >
|
||||
calendar, gd, imagick, imap, intl, json, ldap, mbstring,
|
||||
mcrypt, mysql, mysqli, opcache, pgsql, sqlite3, xml, zip
|
||||
tools: >
|
||||
composer,
|
||||
phpunit:9.5
|
||||
coverage: none
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# phpts: ts # ts for thread-safe, default nts
|
||||
|
||||
# Restore cache
|
||||
- name: Restore cache
|
||||
id: cache
|
||||
uses: actions/cache/restore@v4
|
||||
env:
|
||||
HASH: ${{ hashFiles('htdocs/install/**', 'htdocs/filefunc.inc.php', 'htdocs/version.inc.php') }}
|
||||
KEY_ROOT: ${{ matrix.os }}-${{ env.ckey }}-${{ matrix.php_version }}
|
||||
with:
|
||||
# See https://github.com/actions/cache/issues/1275#issuecomment-1925217178
|
||||
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 }}-
|
||||
${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ github.head_ref }}-
|
||||
${{ env.KEY_ROOT }}-${{ env.HASH }}-${{ github.base_ref }}-
|
||||
${{ 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
|
||||
run: |-
|
||||
echo "BASEDIR=%CD%" >> %GITHUB_ENV%
|
||||
ECHO "==== Show INI file usage before our configuration ==="
|
||||
php --ini
|
||||
ECHO "==== Set PHP_INI_SCAN_DIR to include the INI File we create ==="
|
||||
mkdir %PHP_INI_SCAN_DIR%
|
||||
SET INIFILE="%PHP_INI_SCAN_DIR%\dolibarr.ini"
|
||||
SET HTDOCS_DIR=%CD%\htdocs
|
||||
SET DATA_DIR=%CD%\documents
|
||||
SET TEST_DIR=%CD%\test
|
||||
SET INITDEMO_DIR=%CD%\dev\initdemo
|
||||
ECHO "==== Create INI file to set open_basedir ==="
|
||||
echo [php] > %INIFILE%
|
||||
echo open_basedir^="%HTDOCS_DIR%;%DATA_DIR%;%TEST_DIR%;%INITDEMO_DIR%;%PHPROOT%" >> %INIFILE%
|
||||
REM Unset PHP_INI_SCAN_DIR to disable open_basedir restritions (to limit debug effort)
|
||||
REM SET PHP_INI_SCAN_DIR=
|
||||
ECHO "==== Show contents of INI file to set open_basedir ==="
|
||||
type %INIFILE%
|
||||
ECHO "==== Verify it is used by PHP ==="
|
||||
php --ini
|
||||
REM TEST OPEN_BASEDIR restriction is not limiting wrongly
|
||||
REM THE DATA_DIR MUST BE CREATED HERE - open_base does not allow it's creation
|
||||
mkdir "%DATA_DIR%"
|
||||
mkdir "%DATA_DIR%\mytest"
|
||||
php -r "$d=implode(DIRECTORY_SEPARATOR,[__DIR__,'documents','mytest']);echo 'IS_DIR '.$d.' '.((int) is_dir($d)).PHP_EOL;"
|
||||
php -r "$d=__DIR__.'\documents/mytest';echo 'TEST PATH IS SHOWN: '.$d.PHP_EOL;"
|
||||
php -r "$d=__DIR__.'\documents/mytest';echo 'IS_DIR '.$d.' '.((int) is_dir($d)).PHP_EOL;"
|
||||
ECHO "The above should show 2 successful tests"
|
||||
|
||||
- name: Run Bash script that Initialises the database
|
||||
# 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]"
|
||||
ECHO "==== Verify openbase_dir restriction"
|
||||
php --ini
|
||||
# Run bash script to initialise database
|
||||
ECHO "==== Start 'setup_conf.sh' to setup database"
|
||||
${SHELL} -xv dev/setup/phpunit/setup_conf.sh
|
||||
## Updating test configuration to not stop on first failure (to see all errors) - need sed
|
||||
sed -i -e 's/stopOnFailure="[^"]*"/stopOnFailure="false"/' test/phpunit/phpunittest.xml
|
||||
ECHO "#[group]Directory contents after database setup to verify cache files, ..."
|
||||
ls -l
|
||||
ECHO "#[endgroup]"
|
||||
# Export some tool paths to reuse the from CMD shell.
|
||||
{
|
||||
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
|
||||
shell: cmd
|
||||
# setting up php.ini, starting the php server are currently in this step
|
||||
run: |-
|
||||
ECHO "==== Visually verify our dolibarr.INI file usage ==="
|
||||
php --ini
|
||||
ECHO "==== Add our web server information to the config file ==="
|
||||
echo $dolibarr_main_url_root="http://${{ env.PHPSERVER_DOMAIN_PORT }}"; >> htdocs/conf/conf.php
|
||||
ECHO "#[group]==== Dolibarr config file contents"
|
||||
cat htdocs/conf/conf.php
|
||||
ECHO "#[endgroup]"
|
||||
ECHO "==== START PHP server"
|
||||
start /B php -S %PHPSERVER_DOMAIN_PORT% -t htdocs >> %PHPSERVER_LOG% 2>&1
|
||||
ECHO "#[group]==== Output from curl on PHP server"
|
||||
curl "http://${{ env.PHPSERVER_DOMAIN_PORT }}"
|
||||
ECHO "#[endgroup]"
|
||||
ECHO "==== START PHPUNIT TESTS"
|
||||
REM 'DOSKEY' USED to recover error code (no pipefile equivalent in windows?)
|
||||
( php "%PHPROOT%\phpunit" -d memory_limit=-1 -c %CD%\test\phpunit\phpunittest.xml "test\phpunit\AllTests.php" --exclude-group WindowsWaitingForFix & call doskey /exename=err err=%%^^errorlevel%% ) | "${{ env.TEE }}" "${{ env.PHPUNIT_LOG }}"
|
||||
echo ""
|
||||
echo "Ensure that PHPUNIT completed (no early exit from code)"
|
||||
"${{ env.TAIL }}" -5 "${{ env.PHPUNIT_LOG }}" | "${{ env.GREP }}" -qE "(OK .*[0-9]+ tests.*[0-9]+ assertions|Tests: [0-9]+)" || EXIT /B 1
|
||||
echo "PHPUNIT seems to have completed with a test result, reuse the exit code"
|
||||
for /f "tokens=2 delims==" %%A in ('doskey /m:err') do EXIT /B %%A
|
||||
|
||||
- name: Convert Raw Log to Annotations
|
||||
uses: mdeweerd/logToCheckStyle@v2025.11.2
|
||||
if: ${{ failure() }}
|
||||
with:
|
||||
in: ${{ env.PHPUNIT_LOG }}
|
||||
|
||||
- name: Provide dolibarr and phpunit logs as artifact
|
||||
uses: actions/upload-artifact@v5
|
||||
if: ${{ ! cancelled() }}
|
||||
with:
|
||||
name: win-ci-logs
|
||||
path: |
|
||||
${{ env.PHPUNIT_LOG }}
|
||||
${{ env.DOLIBARR_LOG }}
|
||||
${{ env.PHPSERVER_LOG }}
|
||||
db_init.sql
|
||||
db_init.sql.md5
|
||||
retention-days: 2
|
||||
|
||||
# Save cache
|
||||
- name: Save cache
|
||||
uses: actions/cache/save@v4
|
||||
if: ${{ ! cancelled() }}
|
||||
with:
|
||||
# See https://github.com/actions/cache/issues/1275#issuecomment-1925217178
|
||||
enableCrossOsArchive: true
|
||||
key: ${{ steps.cache.outputs.cache-primary-key }}
|
||||
path: |
|
||||
./db_init.sql
|
||||
./db_init.sql.md5
|
||||
./.cache/mariadb
|
||||
34
.gitignore
vendored
34
.gitignore
vendored
@@ -41,20 +41,15 @@ htdocs/includes/php-parallel-lint/
|
||||
htdocs/includes/sebastian/
|
||||
htdocs/includes/squizlabs/
|
||||
htdocs/includes/webmozart/
|
||||
htdocs/install/install.forced.php
|
||||
htdocs/.well-known/apple-developer-merchantid-domain-association
|
||||
/factory/
|
||||
/output/
|
||||
|
||||
# Node Modules
|
||||
dev/build/yarn-error.log
|
||||
dev/build/node_modules/
|
||||
build/yarn-error.log
|
||||
build/node_modules/
|
||||
node_modules/
|
||||
|
||||
vendor/
|
||||
php-vendor
|
||||
tmp/
|
||||
|
||||
#yarn
|
||||
yarn.lock
|
||||
|
||||
@@ -68,29 +63,8 @@ doc/install.lock
|
||||
/composer.json
|
||||
/composer.lock
|
||||
|
||||
# Local script, executed during pre-commit
|
||||
/local.sh
|
||||
|
||||
# Local phpstan configuration
|
||||
/phpstan.neon
|
||||
/phpstan-baseline.neon
|
||||
|
||||
# Logs
|
||||
/*.log
|
||||
|
||||
# Vim swap files
|
||||
*.sw?
|
||||
|
||||
# Generated by PHPUNIT.BAT
|
||||
/INI_PHPUNIT
|
||||
|
||||
# ignore cache builds
|
||||
/dev/build/phpstan/phpstan
|
||||
/dev/build/phpstan/bootstrap_custom.php
|
||||
/build/phpstan/phpstan
|
||||
/build/phpstan/bootstrap_custom.php
|
||||
phpstan_custom.neon
|
||||
/.php-cs-fixer.cache
|
||||
/.php_cs.cache
|
||||
/.cache
|
||||
|
||||
# ignore .htaccess files
|
||||
.htaccess
|
||||
|
||||
5
.mailmap
5
.mailmap
@@ -1,14 +1,11 @@
|
||||
# This is mapping list between real user name/email and entry into sources files
|
||||
# If you don't want to have your real email appears here, just send a Pull Request to
|
||||
# replace the second field between <> with <secret>
|
||||
#
|
||||
# This files allows to have several profiles (the second part) matched to the same name/email (the first part).
|
||||
#
|
||||
Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
Laurent Destailleur <eldy@destailleur.fr> eldy <eldy@destailleur.fr>
|
||||
Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <ldestailleur@teclib.com>
|
||||
Laurent Destailleur <eldy@destailleur.fr> eldy10 <eldy10@master8.(none)>
|
||||
Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <eldy@destailleur.fr>
|
||||
Laurent Destailleur <eldy@destailleur.fr> Laurent Destailleur <ephpcsdy@destailleur.fr>
|
||||
Regis Houssin <regis.houssin@inodbox.com> Regis Houssin <regis@dolibarr.fr>
|
||||
Regis Houssin <regis.houssin@inodbox.com> Régis Houssin <regishoussin@device5.home>
|
||||
Juanjo Menent <jmenent@2byte.es> simnandez <jmenent@2byte.es>
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*/
|
||||
return include __DIR__ . "/../dev/tools/phan/config.php";
|
||||
63
.php-cs-fixer.dist.php
Normal file
63
.php-cs-fixer.dist.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
/* PHP 7.0 */
|
||||
$finder = (new PhpCsFixer\Finder())
|
||||
->in(__DIR__)
|
||||
->exclude([
|
||||
'core/includes',
|
||||
'custom',
|
||||
'documents',
|
||||
'doctemplates',
|
||||
'vendor',
|
||||
'install/doctemplates',
|
||||
'htdocs/custom',
|
||||
'htdocs/includes',
|
||||
'htdocs/install/doctemplates',
|
||||
])
|
||||
->notPath('vendor');
|
||||
|
||||
|
||||
/* PHP 7.4+ */
|
||||
/*
|
||||
$finder = (new PhpCsFixer\Finder())
|
||||
->in(__DIR__)
|
||||
->exclude([
|
||||
'custom',
|
||||
'documents',
|
||||
'htdocs/custom',
|
||||
'htdocs/includes',
|
||||
])
|
||||
->notPath([
|
||||
'vendor',
|
||||
]);
|
||||
*/
|
||||
|
||||
return (new PhpCsFixer\Config())
|
||||
->setRules([
|
||||
// Apply PSR-12 as per https://wiki.dolibarr.org/index.php?title=Langages_et_normes#PHP:~:text=utiliser%20est%20le-,PSR%2D12,-(https%3A//www
|
||||
'@PSR12' => true, // Disabled for now to limit number of changes
|
||||
|
||||
// Minimum version Dolibarr v18.0.0
|
||||
// Compatibility with min 7.1 is announced with Dolibarr18.0 but
|
||||
// app is still working with 7.0 so no reason to abandon compatiblity with this target for the moment.
|
||||
// So we use target PHP70 for the moment.
|
||||
'@PHP70Migration' => true,
|
||||
//'@PHP71Migration' => true,
|
||||
// Avoid adding public to const (incompatible with PHP 7.0):
|
||||
'visibility_required' => ['elements'=>['property', 'method']],
|
||||
|
||||
//'strict_param' => true,
|
||||
//'array_syntax' => ['syntax' => 'short'],
|
||||
//'list_syntax' => false,
|
||||
//'visibility_required' => false,
|
||||
'array_syntax' => false,
|
||||
'ternary_to_null_coalescing' => false
|
||||
])
|
||||
->setFinder($finder)
|
||||
// TAB Indent violates PSR-12 "must" rule, but used in code
|
||||
// (See https://www.php-fig.org/psr/psr-12/#24-indenting )
|
||||
->setIndent("\t")
|
||||
// All files MUST use the Unix LF line ending only
|
||||
// https://www.php-fig.org/psr/psr-12/#22-files
|
||||
->setLineEnding("\n")
|
||||
;
|
||||
@@ -1,151 +1,77 @@
|
||||
---
|
||||
exclude: (?x)^( htdocs/includes/ckeditor/.*|(\.(?!github/workflows)[^/]*/.*))$
|
||||
exclude: (?x)^( htdocs/includes/ckeditor/.* )
|
||||
repos:
|
||||
# Several miscellaneous checks and fix (on yaml files, end of files fix)
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v6.0.0
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
# This hook tests the name of the branch and return an error if the name is
|
||||
# 'develop' or an official version 'x.y'
|
||||
# So you can't commit if your branch name is not a custom branch name.
|
||||
# Using a custom branch name is good practice that makes it easier to manage PRs.
|
||||
# You can skip this:
|
||||
# - Permanently:
|
||||
# export SKIP=no-commit-to-branch # In your .bashrc or session.
|
||||
# - Only this for one commit:
|
||||
# SKIP=no-commit-to-branch git commit -a -m "My message"
|
||||
# - Skipping all checks for a commit:
|
||||
# git commit -a -m "My message" --no-verify
|
||||
# (Recommendation: run git commit -a .. once, then with `--no-verify`)
|
||||
- id: no-commit-to-branch
|
||||
args: [--branch, develop, --pattern, \d+.0$]
|
||||
# This checks that xml files are correct
|
||||
- id: check-xml
|
||||
exclude: |
|
||||
(?x)^(htdocs/includes/.*)$
|
||||
# This checks that yaml files are correct
|
||||
- id: check-yaml
|
||||
args: [--unsafe]
|
||||
# This checks that json files are correct
|
||||
- id: check-json
|
||||
# Fixes Fix files that have DOS end of line endings
|
||||
- id: mixed-line-ending
|
||||
# alternative for dev/tools/fixdosfiles.sh
|
||||
exclude: |
|
||||
(?x)^(htdocs/includes/tecnickcom/tcpdf/fonts/.*
|
||||
|.*/CRLF.*.php # Files in swiftmailer
|
||||
)$
|
||||
args: [--fix=lf]
|
||||
# Remove trailing whitespace
|
||||
exclude: (?x)^(htdocs/includes/tecnickcom/tcpdf/fonts/.*)$
|
||||
- id: trailing-whitespace
|
||||
exclude_types: [markdown]
|
||||
# Fix the end of file
|
||||
- id: end-of-file-fixer
|
||||
# Check that there are no completely merged file conflicts
|
||||
- id: check-merge-conflict
|
||||
stages: [pre-rebase, pre-commit, pre-merge-commit]
|
||||
# Check that files with shebangs have the executable bit set (in git)
|
||||
- id: check-executables-have-shebangs
|
||||
# Check that shell files are executables
|
||||
- id: check-shebang-scripts-are-executable
|
||||
exclude:
|
||||
(?x)^( dev/tools/dolibarr-postgres2mysql.php |test/other/test_serialize.php
|
||||
|test/phpunit/textutf8.txt |test/phpunit/textiso.txt |htdocs/includes/.*
|
||||
|htdocs/modulebuilder/template/.* |dev/build/debian/dolibarr.postrm |dev/build/debian/dolibarr.postinst
|
||||
|dev/build/debian/dolibarr.config )$
|
||||
# Fix the first UTF8 byte
|
||||
|htdocs/modulebuilder/template/.* |build/debian/dolibarr.postrm |build/debian/dolibarr.postinst
|
||||
|build/debian/dolibarr.config )$
|
||||
- id: fix-byte-order-marker
|
||||
# Check that there are no files that have are the same when uppercased (conflict on windows)
|
||||
- id: check-case-conflict
|
||||
|
||||
# Gitleaks is a SAST tool for detecting and preventing hardcoded secrets like passwords, api keys, and tokens in git repos
|
||||
# Beautify shell scripts
|
||||
- repo: https://github.com/gitleaks/gitleaks.git
|
||||
rev: v8.29.0
|
||||
rev: v8.16.1
|
||||
hooks:
|
||||
- id: gitleaks
|
||||
|
||||
# Check github actions
|
||||
- repo: https://github.com/rhysd/actionlint
|
||||
rev: v1.7.8
|
||||
hooks:
|
||||
- id: actionlint
|
||||
|
||||
# Beautify shell scripts
|
||||
- repo: https://github.com/lovesegfault/beautysh.git
|
||||
rev: v6.2.1
|
||||
hooks:
|
||||
- id: beautysh
|
||||
exclude: |
|
||||
(?x)^(dev/setup/git/hooks/pre-commit
|
||||
)$
|
||||
exclude: (?x)^(dev/setup/git/hooks/pre-commit)$
|
||||
args: [--tab]
|
||||
|
||||
# Run local script
|
||||
#
|
||||
# For example, to update the license in edited files, you could add to local.sh:
|
||||
# For instance to update the license in edited files, you could add to local.sh:
|
||||
#
|
||||
# ```shell
|
||||
# #!/bin/bash
|
||||
# MYDIR=$(dirname "$0")
|
||||
# git diff HEAD --name-only | grep -v includes | \
|
||||
# xargs "$MYDIR/dev/tools/updatelicense.php"
|
||||
# CHANGED_INTERNALS=$(git diff --name-only | grep -v includes)
|
||||
# "$MYDIR/dev/tools/updatelicense.php" $CHANGED_INTERNALS
|
||||
# ```
|
||||
- repo: local
|
||||
hooks:
|
||||
- name: Find missing/unused/duplicate language keys
|
||||
id: check-translations
|
||||
files: (?x)^(htdocs/langs/en_US/.*\.lang)
|
||||
language: script
|
||||
entry: ./dev/translation/sanity_check_trans_missing_unused.sh
|
||||
pass_filenames: false
|
||||
args: [list]
|
||||
- id: local-precommit-script
|
||||
name: Run local script before commit if it exists
|
||||
language: system
|
||||
entry: bash -c '[ ! -x local.sh ] || ./local.sh'
|
||||
pass_filenames: false
|
||||
- id: duplicate-lang-lines
|
||||
stages: [manual]
|
||||
name: Find duplicate language lines
|
||||
files: (?x)^(htdocs/langs/en_US/.*\.lang)
|
||||
language: script
|
||||
entry: ./dev/tools/fixduplicatelanglines.sh
|
||||
pass_filenames: false
|
||||
args: [list]
|
||||
- id: duplicate-lang-keys
|
||||
stages: [manual]
|
||||
name: Find duplicate language keys
|
||||
files: (?x)^(htdocs/langs/en_US/.*\.lang)
|
||||
language: script
|
||||
entry: ./dev/tools/fixduplicatelangkey.sh
|
||||
pass_filenames: false
|
||||
args: [list]
|
||||
- id: fix-alt-languages
|
||||
stages: [manual]
|
||||
name: Fix alt languages
|
||||
# Selection: see fixaltlanguages.sh script
|
||||
files: (?x)^(htdocs/langs/(e[lnstu]|k[akmno]|s[lqrv]|b[nrs]|c[asy]|n[bel]|[ip]t|a[mr]|d[ae]|f[ar]|h[ei]|m[sy]|t[ag]|u[kr]|gl|ja|lo|ru|vi|zh)_[^/]*/.*\.lang)
|
||||
language: script
|
||||
entry: ./dev/tools/fixaltlanguages_pre-commit.sh
|
||||
pass_filenames: true
|
||||
|
||||
# Check PHP syntax
|
||||
- repo: https://github.com/mdeweerd/pre-commit-php
|
||||
rev: v1.6.8
|
||||
rev: v1.6.5
|
||||
hooks:
|
||||
- id: php-cbf
|
||||
files: \.(php)$
|
||||
args: [--standard=dev/setup/codesniffer/ruleset.xml]
|
||||
- id: php-cs
|
||||
exclude: |
|
||||
(?x)^(htdocs/includes/.*)$
|
||||
files: \.(php)$
|
||||
args:
|
||||
[
|
||||
--standard=dev/setup/codesniffer/ruleset.xml,
|
||||
--report=emacs,
|
||||
--severity=5,
|
||||
--no-colors,
|
||||
]
|
||||
- alias: php-cs-with-cache
|
||||
id: php-cs
|
||||
@@ -156,7 +82,6 @@ repos:
|
||||
--standard=dev/setup/codesniffer/ruleset.xml,
|
||||
--report=emacs,
|
||||
--severity=5,
|
||||
--no-colors,
|
||||
--cache=.cache/pre-commit/dolibarr-php-cs.cache,
|
||||
.,
|
||||
]
|
||||
@@ -170,7 +95,7 @@ repos:
|
||||
|
||||
# Prettier (format code, only for non common files)
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: v3.1.0
|
||||
rev: v3.0.3
|
||||
hooks:
|
||||
- id: prettier
|
||||
stages: [manual]
|
||||
@@ -193,7 +118,7 @@ repos:
|
||||
|
||||
# Check format of yaml files
|
||||
- repo: https://github.com/adrienverge/yamllint.git
|
||||
rev: v1.37.1
|
||||
rev: v1.33.0
|
||||
hooks:
|
||||
- id: yamllint
|
||||
args:
|
||||
@@ -203,7 +128,7 @@ repos:
|
||||
|
||||
# Execute codespell to fix typo errors (setup of codespell into dev/tools/codespell/)
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.4.1
|
||||
rev: v2.2.6
|
||||
hooks:
|
||||
- id: codespell
|
||||
# Due to a current limitation of configuration files,
|
||||
@@ -219,8 +144,10 @@ repos:
|
||||
- dev/tools/codespell/codespell-ignore.txt
|
||||
- -x
|
||||
- dev/tools/codespell/codespell-lines-ignore.txt
|
||||
- --uri-ignore-words-list
|
||||
- ned
|
||||
exclude_types: [image]
|
||||
exclude: (?x)^(.phan/stubs/.*|phpstan\.neon.*)$
|
||||
exclude: (?x)^(.phan/stubs/.*)$
|
||||
additional_dependencies: [tomli]
|
||||
- alias: codespell-lang-en_US
|
||||
# Only for translations with specialised exceptions
|
||||
@@ -246,49 +173,7 @@ repos:
|
||||
|
||||
# Check some shell scripts
|
||||
- repo: https://github.com/shellcheck-py/shellcheck-py
|
||||
rev: v0.11.0.1
|
||||
rev: v0.9.0.6
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
args: [-W, "100"]
|
||||
|
||||
# Check sql file syntax
|
||||
- repo: https://github.com/sqlfluff/sqlfluff
|
||||
rev: 3.3.1
|
||||
hooks:
|
||||
- id: sqlfluff-lint
|
||||
stages: [pre-commit, manual] # manual needed for ci
|
||||
exclude: (?x)^
|
||||
(dev/initdemo/mysqldump_.*\.sql
|
||||
|htdocs/core/menus/init_menu_auguria\.sql
|
||||
|htdocs/includes/.*
|
||||
|htdocs/install/doctemplates/websites/.*_template
|
||||
|htdocs/install/doctemplates/websites/website_template.*\.sql
|
||||
|htdocs/install/mysql/data/llx_20_c_departements\.sql
|
||||
|htdocs/install/mysql/data/llx_accounting_account_.*\.sql
|
||||
|htdocs/install/mysql/migration/3\..*\.sql
|
||||
|htdocs/install/mysql/migration/(1[0-5]|[456789])\.0\.0-.*\.sql
|
||||
|htdocs/install/mysql/migration/repair\.sql
|
||||
|htdocs/install/mysql/tables/llx_bookcal_availabilities-bookcal\.sql
|
||||
|htdocs/install/mysql/tables/llx_categorie.*\.key\.sql
|
||||
|htdocs/install/mysql/tables/llx_rights_def\.key\.sql
|
||||
|htdocs/install/pgsql/functions/functions.*\.sql
|
||||
|htdocs/modulebuilder/template/sql/.*\.sql
|
||||
)$
|
||||
|
||||
- repo: https://github.com/perltidy/perltidy
|
||||
rev: '20250105.03'
|
||||
hooks:
|
||||
- id: perltidy
|
||||
# virtualmin excuded - reason https://github.com/Dolibarr/dolibarr/pull/36370#issuecomment-3565101823
|
||||
exclude: (?x)^
|
||||
(dev/build/perl/virtualmin/dolibarr.pl
|
||||
)$
|
||||
args: [ --tabs, --nola ]
|
||||
- repo: https://github.com/henryykt/pre-commit-perl
|
||||
rev: v0.0.5
|
||||
hooks:
|
||||
- id: perlcritic
|
||||
# virtualmin excuded - reason https://github.com/Dolibarr/dolibarr/pull/36370#issuecomment-3565101823
|
||||
exclude: (?x)^
|
||||
(dev/build/perl/virtualmin/dolibarr.pl
|
||||
)$
|
||||
|
||||
92
.travis.yml
92
.travis.yml
@@ -29,34 +29,29 @@ env:
|
||||
# Set to true for very verbose output
|
||||
- DEBUG=true
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- ~/.cache
|
||||
|
||||
|
||||
jobs:
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- php: 'latest'
|
||||
- php: '8.3'
|
||||
include:
|
||||
- stage: PHP min and max
|
||||
if: type = push
|
||||
php: '7.2'
|
||||
php: '7.1'
|
||||
env:
|
||||
- DB=postgresql
|
||||
- TRAVIS_PHP_VERSION=7.2
|
||||
- TRAVIS_PHP_VERSION=7.1
|
||||
- stage: PHP min and max
|
||||
if: type = pull_request OR type = push
|
||||
php: '8.4'
|
||||
php: '8.2'
|
||||
env:
|
||||
- DB=mysql
|
||||
- TRAVIS_PHP_VERSION=8.4
|
||||
- stage: PHP latest
|
||||
- TRAVIS_PHP_VERSION=8.2
|
||||
- stage: PHP 8.3
|
||||
if: type = push AND branch = develop
|
||||
php: 'latest'
|
||||
php: '8.3'
|
||||
env:
|
||||
- DB=mysql
|
||||
- TRAVIS_PHP_VERSION=latest
|
||||
- TRAVIS_PHP_VERSION=8.3
|
||||
|
||||
notifications:
|
||||
email:
|
||||
@@ -85,9 +80,6 @@ before_install:
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
|
||||
sudo apt install unzip 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
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
|
||||
sudo apt install unzip apache2 php7.2 php7.2-cli php7.2-curl php7.2-mysql php7.2-pgsql php7.2-gd php7.2-imap php7.2-intl php7.2-ldap php7.2-xml php7.2-mbstring php7.2-xml php7.2-zip libapache2-mod-php7.2
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
|
||||
sudo apt install unzip 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
|
||||
fi
|
||||
@@ -97,12 +89,6 @@ before_install:
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.3' ]; then
|
||||
sudo apt install unzip apache2 php8.3 php8.3-cli php8.3-curl php8.3-mysql php8.3-pgsql php8.3-gd php8.3-imap php8.3-intl php8.3-ldap php8.3-xml php8.3-mbstring php8.3-xml php8.3-zip libapache2-mod-php8.3
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.4' ]; then
|
||||
sudo apt install unzip apache2 php8.4 php8.4-cli php8.4-curl php8.4-mysql php8.4-pgsql php8.4-gd php8.4-imap php8.4-intl php8.4-ldap php8.4-xml php8.4-mbstring php8.4-xml php8.4-zip libapache2-mod-php8.4
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = 'latest' ]; then
|
||||
sudo apt install unzip apache2 php8.4 php8.4-cli php8.4-curl php8.4-mysql php8.4-pgsql php8.4-gd php8.4-imap php8.4-intl php8.4-ldap php8.4-xml php8.4-mbstring php8.4-xml php8.4-zip libapache2-mod-php8.4
|
||||
fi
|
||||
|
||||
- |
|
||||
echo Install pgsql if run is for pgsql
|
||||
@@ -112,8 +98,8 @@ before_install:
|
||||
#ps fauxww | grep postgres
|
||||
ls /etc/postgresql/13/main/
|
||||
|
||||
sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/14/main/pg_hba.conf
|
||||
sudo cat /etc/postgresql/14/main/pg_hba.conf
|
||||
sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/13/main/pg_hba.conf
|
||||
sudo cat /etc/postgresql/13/main/pg_hba.conf
|
||||
|
||||
sudo service postgresql restart
|
||||
|
||||
@@ -134,9 +120,6 @@ install:
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
|
||||
sudo update-alternatives --set php /usr/bin/php7.1
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '7.2' ]; then
|
||||
sudo update-alternatives --set php /usr/bin/php7.2
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
|
||||
sudo update-alternatives --set php /usr/bin/php8.1
|
||||
fi
|
||||
@@ -180,7 +163,7 @@ install:
|
||||
squizlabs/php_codesniffer ^3
|
||||
fi
|
||||
# phpunit 9 is required for php 8
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.0' ] || [ "$TRAVIS_PHP_VERSION" = '8.1' ] || [ "$TRAVIS_PHP_VERSION" = '8.2' ] || [ "$TRAVIS_PHP_VERSION" = '8.3' ] || [ "$TRAVIS_PHP_VERSION" = '8.4' ] || [ "$TRAVIS_PHP_VERSION" = 'latest' ]; then
|
||||
if [ "$TRAVIS_PHP_VERSION" = '8.0' ] || [ "$TRAVIS_PHP_VERSION" = '8.1' ] || [ "$TRAVIS_PHP_VERSION" = '8.2' ] || [ "$TRAVIS_PHP_VERSION" = '8.3' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then
|
||||
sudo composer self-update 2.4.4
|
||||
composer -n require --ignore-platform-reqs phpunit/phpunit ^8 \
|
||||
php-parallel-lint/php-parallel-lint ^1.2 \
|
||||
@@ -283,7 +266,6 @@ before_script:
|
||||
#echo '\d llx_c_country' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
|
||||
# Create pgsql compatibility functions
|
||||
echo "Load functions.sql (may generated errors for tables that does not exists yet)"
|
||||
psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis' < htdocs/install/pgsql/functions/functions.sql
|
||||
fi
|
||||
echo
|
||||
@@ -327,7 +309,7 @@ before_script:
|
||||
- |
|
||||
echo "Setting up Apache"
|
||||
sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
|
||||
sudo cp -f dev/build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf
|
||||
sudo cp -f build/travis-ci/apache.conf /etc/apache2/sites-available/000-default.conf
|
||||
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
|
||||
sudo cat /etc/apache2/sites-available/000-default.conf
|
||||
sudo service apache2 restart
|
||||
@@ -371,13 +353,6 @@ script:
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.4" ]; then
|
||||
parallel-lint -e php --exclude dev/tools/test/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \
|
||||
--exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \
|
||||
--exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \
|
||||
--exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \
|
||||
--exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --exclude htdocs/includes/webklex --blame .
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
|
||||
@@ -385,20 +360,16 @@ script:
|
||||
echo "Checking coding style (only for 1 version to not overload travis and avoid duplicate tests)"
|
||||
# Ensure we catch errors
|
||||
set -e
|
||||
CACHE_OPT="--cache=${HOME}/.cache/dolibarr-phpcs-${TRAVIS_PHP_VERSION}.cache"
|
||||
# Exclusions are defined in the ruleset.xml file
|
||||
#if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.1" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;
|
||||
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 .;
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.2" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;
|
||||
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 .;
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.4" ]; then
|
||||
phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --severity=1 ${CACHE_OPT} --runtime-set ignore_warnings_on_exit true .;
|
||||
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 .;
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
@@ -418,9 +389,6 @@ script:
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.3" ]; then
|
||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
fi
|
||||
if [ "$TRAVIS_PHP_VERSION" = "8.4" ]; then
|
||||
var-dump-check --extensions php --tracy --exclude htdocs/includes --exclude test/ --exclude htdocs/public/test/ --exclude htdocs/core/lib/functions.lib.php .
|
||||
fi
|
||||
set +e
|
||||
echo
|
||||
|
||||
@@ -519,18 +487,6 @@ script:
|
||||
php upgrade.php 18.0.0 19.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade18001900.log || cat $TRAVIS_BUILD_DIR/upgrade18001900.log
|
||||
php upgrade2.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-2.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-2.log
|
||||
php step5.php 18.0.0 19.0.0 > $TRAVIS_BUILD_DIR/upgrade18001900-3.log || cat $TRAVIS_BUILD_DIR/upgrade18001900-3.log
|
||||
php upgrade.php 19.0.0 20.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade19002000.log || cat $TRAVIS_BUILD_DIR/upgrade19002000.log
|
||||
php upgrade2.php 19.0.0 20.0.0 > $TRAVIS_BUILD_DIR/upgrade19002000-2.log || cat $TRAVIS_BUILD_DIR/upgrade19002000-2.log
|
||||
php step5.php 19.0.0 20.0.0 > $TRAVIS_BUILD_DIR/upgrade19002000-3.log || cat $TRAVIS_BUILD_DIR/upgrade19002000-3.log
|
||||
php upgrade.php 20.0.0 21.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade20002100.log || cat $TRAVIS_BUILD_DIR/upgrade20002100.log
|
||||
php upgrade2.php 20.0.0 21.0.0 > $TRAVIS_BUILD_DIR/upgrade20002100-2.log || cat $TRAVIS_BUILD_DIR/upgrade20002100-2.log
|
||||
php step5.php 20.0.0 21.0.0 > $TRAVIS_BUILD_DIR/upgrade20002100-3.log || cat $TRAVIS_BUILD_DIR/upgrade20002100-3.log
|
||||
php upgrade.php 21.0.0 22.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade21002200.log || cat $TRAVIS_BUILD_DIR/upgrade21002200.log
|
||||
php upgrade2.php 21.0.0 22.0.0 > $TRAVIS_BUILD_DIR/upgrade21002200-2.log || cat $TRAVIS_BUILD_DIR/upgrade21002200-2.log
|
||||
php step5.php 21.0.0 22.0.0 > $TRAVIS_BUILD_DIR/upgrade21002200-3.log || cat $TRAVIS_BUILD_DIR/upgrade21002200-3.log
|
||||
php upgrade.php 22.0.0 23.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade22002300.log || cat $TRAVIS_BUILD_DIR/upgrade22002300.log
|
||||
php upgrade2.php 22.0.0 23.0.0 > $TRAVIS_BUILD_DIR/upgrade22002300-2.log || cat $TRAVIS_BUILD_DIR/upgrade22002300-2.log
|
||||
php step5.php 22.0.0 23.0.0 > $TRAVIS_BUILD_DIR/upgrade22002300-3.log || cat $TRAVIS_BUILD_DIR/upgrade22002300-3.log
|
||||
set +e
|
||||
echo
|
||||
|
||||
@@ -538,7 +494,6 @@ script:
|
||||
echo Show some debug info like table content or log
|
||||
#echo '\d llx_adherent' | psql 'postgresql://postgres:postgres@127.0.0.1:5432/travis'
|
||||
cat $TRAVIS_BUILD_DIR/upgrade18001900.log
|
||||
cat $TRAVIS_BUILD_DIR/upgrade19002000.log
|
||||
echo
|
||||
|
||||
- |
|
||||
@@ -567,11 +522,12 @@ script:
|
||||
|
||||
- |
|
||||
echo "Unit testing"
|
||||
# Execute phpunit, check its exit status and that the phpunit output shows a test summary
|
||||
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php | tee /dev/tty | grep -qE "(OK .*[0-9]+ tests.*[0-9]+ assertions|Tests: [0-9]+)" ; phpunitresult=$((PIPESTATUS[0]?PIPESTATUS[0]:PIPESTATUS[2]))
|
||||
# Ensure we catch errors with -e. Set this to +e instead of -e if you want to go to the end to see dolibarr.log file.
|
||||
set -e
|
||||
phpunit -d memory_limit=-1 -c test/phpunit/phpunittest.xml test/phpunit/AllTests.php
|
||||
phpunitresult=$?
|
||||
echo "Phpunit return code = $phpunitresult"
|
||||
# Comment next line if you want to go to the end to see the dolibarr.log file.
|
||||
[ $phpunitresult == 0 ] || exit $phpunitresult
|
||||
set +e
|
||||
echo
|
||||
|
||||
after_script:
|
||||
@@ -595,18 +551,18 @@ after_failure:
|
||||
# Show upgrade log files
|
||||
#for ficlog in `ls $TRAVIS_BUILD_DIR/*.log`
|
||||
#do
|
||||
#echo "Debugging information for file $ficlog"
|
||||
#echo "Debugging informations for file $ficlog"
|
||||
#cat $ficlog
|
||||
#done
|
||||
# Show Apache log file
|
||||
echo "Debugging information for file apache error.log"
|
||||
echo "Debugging informations for file apache error.log"
|
||||
sudo tail -n 200 /var/log/apache2/travis_error_log
|
||||
if [ "$DEBUG" = true ]; then
|
||||
# Dolibarr log file
|
||||
echo "Debugging information for file dolibarr.log (latest 50 lines)"
|
||||
echo "Debugging informations for file dolibarr.log (latest 50 lines)"
|
||||
tail -n 200 $TRAVIS_BUILD_DIR/documents/dolibarr.log
|
||||
# Database log file
|
||||
echo "Debugging information for file mysql error.log"
|
||||
echo "Debugging informations for file mysql error.log"
|
||||
sudo tail -n 200 /var/log/mysql/error.log
|
||||
# TODO: PostgreSQL log file
|
||||
echo
|
||||
|
||||
36
.tx/config
36
.tx/config
@@ -44,6 +44,12 @@ source_file = htdocs/langs/en_US/blockedlog.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:bookmarks]
|
||||
file_filter = htdocs/langs/<lang>/bookmarks.lang
|
||||
source_file = htdocs/langs/en_US/bookmarks.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:boxes]
|
||||
file_filter = htdocs/langs/<lang>/boxes.lang
|
||||
source_file = htdocs/langs/en_US/boxes.lang
|
||||
@@ -98,6 +104,12 @@ source_file = htdocs/langs/en_US/datapolicy.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:deliveries]
|
||||
file_filter = htdocs/langs/<lang>/deliveries.lang
|
||||
source_file = htdocs/langs/en_US/deliveries.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:dict]
|
||||
file_filter = htdocs/langs/<lang>/dict.lang
|
||||
source_file = htdocs/langs/en_US/dict.lang
|
||||
@@ -134,6 +146,12 @@ source_file = htdocs/langs/en_US/exports.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:help]
|
||||
file_filter = htdocs/langs/<lang>/help.lang
|
||||
source_file = htdocs/langs/en_US/help.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:holiday]
|
||||
file_filter = htdocs/langs/<lang>/holiday.lang
|
||||
source_file = htdocs/langs/en_US/holiday.lang
|
||||
@@ -266,6 +284,12 @@ source_file = htdocs/langs/en_US/partnership.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:paybox]
|
||||
file_filter = htdocs/langs/<lang>/paybox.lang
|
||||
source_file = htdocs/langs/en_US/paybox.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:paypal]
|
||||
file_filter = htdocs/langs/<lang>/paypal.lang
|
||||
source_file = htdocs/langs/en_US/paypal.lang
|
||||
@@ -356,12 +380,6 @@ source_file = htdocs/langs/en_US/stripe.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:subtotals]
|
||||
file_filter = htdocs/langs/<lang>/subtotals.lang
|
||||
source_file = htdocs/langs/en_US/subtotals.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:supplier_proposal]
|
||||
file_filter = htdocs/langs/<lang>/supplier_proposal.lang
|
||||
source_file = htdocs/langs/en_US/supplier_proposal.lang
|
||||
@@ -410,3 +428,9 @@ source_file = htdocs/langs/en_US/workflow.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[o:dolibarr-association:p:dolibarr:r:zapier]
|
||||
file_filter = htdocs/langs/<lang>/zapier.lang
|
||||
source_file = htdocs/langs/en_US/zapier.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
|
||||
15
COPYRIGHT
15
COPYRIGHT
@@ -26,7 +26,6 @@ PHP libraries:
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation. Used by dynamic price only. TODO Replace with dol_eval ?
|
||||
Escpos-php 3.0 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
GeoIP2 0.2.0 Apache License 2.0 Yes Lib to make geoip convert
|
||||
GeoPHP 1.2 Modified BSD License Yes Lib to make geo convert
|
||||
MathPHP 2.8.1 MIT License Yes Modern math library for PHP (only few files)
|
||||
Mobiledetect 2.8.41 MIT License Yes Detect mobile devices browsers
|
||||
NuSoap 0.9.16 LGPL 2.1+ Yes Library to develop SOAP Web services. From https://github.com/f00b4r/nusoap/tree/v0.9.16
|
||||
@@ -43,22 +42,23 @@ PrestaShop-WS-Lib 94feb5f OSL-3.0 No
|
||||
PSR/Logs 1.0 MIT License Yes Library for logs (used by DebugBar)
|
||||
PSR/simple-cache ? MIT License Yes Library for cache (used by PHPSpreadSheet)
|
||||
Restler 3.1.1 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
|
||||
Sabre 4.6.0 BSD Yes DAV support
|
||||
Sabre 4.0.2 BSD Yes DAV support
|
||||
Swift Mailer 5.4.2-DEV MIT License Yes Comprehensive mailing tools for PHP
|
||||
Symfony/var-dumper ??? MIT License Yes Library to make var dump (used by DebugBar)
|
||||
Stripe 10.7.0 MIT Licence Yes Library for Stripe module
|
||||
TCPDF 6.7.5 LGPL-3+ Yes PDF generation
|
||||
TCPDI 1.1.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||
TCPDF 6.3.2 LGPL-3+ Yes PDF generation
|
||||
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||
|
||||
bacon, dasprid, swiss-qr-bill, kmukku, symfony/validator
|
||||
|
||||
JS libraries:
|
||||
Ace 1.43.12 BSD Yes JS library to get code syntaxique coloration in a textarea (Must take src dir into https://github.com/ajaxorg/ace-builds/).
|
||||
Ace 1.4.14 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
ChartJS 3.7.1 MIT License Yes JS library for graph
|
||||
CKEditor 4.22.1 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
jQuery 3.6.4 MIT License Yes JS library
|
||||
jQuery UI 1.13.2 GPL and MIT License Yes JS library plugin UI
|
||||
jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css
|
||||
jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups)
|
||||
jQuery Colorpicker 1.1 MIT License Yes JS library for color picker for a defined list of colors
|
||||
jQuery JCrop 0.9.8 GPL and MIT License Yes JS library plugin Crop (to crop images)
|
||||
jQuery Jeditable 1.7.1 GPL and MIT License Yes JS library plugin jeditable (to edit in place)
|
||||
@@ -68,7 +68,8 @@ jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes
|
||||
jQuery jquerytreeview 1.4.1 MIT License Yes JS library for filetree
|
||||
jQuery TableDnD 0.6 GPL and MIT License Yes JS library plugin TableDnD (to reorder table rows)
|
||||
jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
|
||||
jsGanttImproved 2.8.10 BSD License Yes JS library (to build Gantt reports)
|
||||
jsGanttImproved 2.7.3 BSD License Yes JS library (to build Gantt reports)
|
||||
JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone
|
||||
SwaggerUI 2.2.10 GPL-2+ Yes JS library to offer the REST API explorer
|
||||
|
||||
Image libraries:
|
||||
@@ -78,7 +79,7 @@ Font libraries:
|
||||
Fontawesome 5.13 Font Awesome Free Licence Yes
|
||||
|
||||
|
||||
For more licenses compatibility information: https://www.gnu.org/licenses/licenses.en.html
|
||||
For more licenses compatibility informations: https://www.gnu.org/licenses/licenses.en.html
|
||||
|
||||
|
||||
Authors
|
||||
|
||||
182
README-FR.md
Normal file
182
README-FR.md
Normal file
@@ -0,0 +1,182 @@
|
||||
# DOLIBARR ERP & CRM
|
||||
|
||||

|
||||

|
||||
|
||||
Dolibarr ERP & CRM est un logiciel moderne pour gérer votre activité (société, association, auto-entrepreneurs, artisans).
|
||||
Il est simple d'utilisation et modulaire, vous permettant de n'activez que les fonctions dont vous avez besoin (contacts, fournisseurs, factures, commandes, stocks, agenda, ...).
|
||||
|
||||

|
||||
|
||||
## LICENCE
|
||||
|
||||
Dolibarr est distribué sous les termes de la licence GNU General Public License v3+ ou supérieure.
|
||||
|
||||
## INSTALLER DOLIBARR
|
||||
|
||||
### Configuration simple
|
||||
|
||||
Si vous avez peu de compétences techniques et que vous souhaitez installer Dolibarr ERP/CRM en quelques clics, vous pouvez utiliser l'une des versions pré-packagées avec les prérequis:
|
||||
|
||||
- DoliWamp pour Windows
|
||||
- DoliDeb pour Debian ou Ubuntu
|
||||
- DoliRpm pour Redhat, Fedora, OpenSuse, Mandriva ou Mageia
|
||||
|
||||
Les packages peuvent être téléchargés à partir de [site web officiel](https://www.dolibarr.org/).
|
||||
|
||||
### Configuration avancée
|
||||
|
||||
Vous pouvez aussi utiliser un serveur Web et une base de données prise en charge (MariaDB, MySQL ou PostgreSQL) pour installer la version standard.
|
||||
|
||||
- Décompressez l'archive .zip téléchargée pour copier le répertoire "dolibarr/htdocs" et tous ses fichiers à la racine du serveur Web ou récupérez-les directement à partir de GitHub (recommandé si vous connaissez git):
|
||||
|
||||
`git clone https://github.com/dolibarr/dolibarr -b x.y` (où x.y est la version principale comme 3.6, 9.0, ...)
|
||||
|
||||
- Configurez votre serveur Web pour qu'il utilise "*dolibarr/htdocs*" en tant que racine si votre serveur Web ne possède pas déjà de répertoire défini vers lequel pointer.
|
||||
|
||||
- Créez un fichier `htdocs/conf/conf.php` vide et définissez les autorisations d'*écrire* pour l'utilisateur de votre serveur Web (l'autorisation *écrire* sera supprimée une fois l'installation terminée)
|
||||
|
||||
- Depuis votre navigateur, allez à la page "install/" de dolibarr
|
||||
|
||||
L’URL dépendra de la façon dont votre configuration Web a été configurée pour pointer vers votre installation de dolibarr. Cela peut ressembler à:
|
||||
|
||||
`http://localhost/dolibarr/htdocs/install/`
|
||||
|
||||
ou
|
||||
|
||||
`http://localhost/dolibarr/install/`
|
||||
|
||||
ou
|
||||
|
||||
`http://yourdolibarrvirtualhost/install/`
|
||||
|
||||
- Suivez les instructions de l'installateur
|
||||
|
||||
## METTRE A JOUR DOLIBARR
|
||||
|
||||
Pour mettre à jour Dolibarr depuis une vieille version vers celle ci:
|
||||
|
||||
- Faites une sauvegarde de votre instance [voir ce tutorial](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
|
||||
|
||||
- Vérifiez que la nouvelle version est compatible avec la version PHP de votre serveur [voir PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
|
||||
- Ecrasez les vieux fichiers dans le vieux répertoire 'dolibarr' par les fichiers
|
||||
fournis dans ce nouveau package.
|
||||
|
||||
- Au prochain accès, Dolibarr proposera la page de "mise à jour" des données (si nécessaire).
|
||||
Si un fichier install.lock existe pour verrouiller le processus de mise à jour, il sera demandé de le supprimer manuellement (vous devriez trouver le fichier install.lock dans le répertoire utilisé pour stocker les documents générés ou transférés sur le serveur. Dans la plupart des cas, c'est le répertoire appelé "documents")
|
||||
|
||||
Note: *Le processus de migration peut être lancé manuellement et plusieurs fois, sans risque, en appelant la page /install/*
|
||||
|
||||
## CE QUI EST NOUVEAU
|
||||
|
||||
Voir le fichier [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog).
|
||||
|
||||
## CE QUE DOLIBARR PEUT FAIRE
|
||||
|
||||
### Modules principaux (tous optionnels)
|
||||
|
||||
- Annuaires des prospects et/ou client et/ou fournisseurs
|
||||
- Gestion de catalogue de produits et services
|
||||
- Gestion des devis, propositions commerciales
|
||||
- Gestion des commandes
|
||||
- Gestion des factures clients/fournisseurs et paiements
|
||||
- Gestion des virements bancaires SEPA
|
||||
- Gestion des comptes bancaires
|
||||
- Calendrier/Agenda partagé (avec export ical, vcal)
|
||||
- Suivi des opportunités et/ou projets (suivi de rentabilité incluant les factures, notes de frais, temps consommé valorisé, ...)
|
||||
- Gestion de contrats de services
|
||||
- Gestion de stock et inventaires
|
||||
- Gestion des expéditions
|
||||
- Gestion des demandes de congés
|
||||
- Gestion des notes de frais
|
||||
- Gestion de recrutement
|
||||
- GED (Gestion Electronique de Documents)
|
||||
- E-Mailings de masse
|
||||
- Réalisation de sondages
|
||||
- Gestion d'adhérents
|
||||
- Point de vente/Caisse enregistreuse
|
||||
- … (près de 100 modules disponibles en standard, près de 1000 autre sur la place de marché d'extensions)
|
||||
|
||||
### Autres modules
|
||||
|
||||
- Gestion de marque-pages
|
||||
- Gestion des promesses de dons
|
||||
- Rapports
|
||||
- Imports/Exports des données
|
||||
- Support des codes barres
|
||||
- Calcul des marges
|
||||
- Connectivité LDAP
|
||||
- Intégration de ClickToDial
|
||||
- Intégration RSS
|
||||
- Intégration Skype
|
||||
- Intégration de système de paiements (PayPal, Stripe, Paybox...)
|
||||
- …
|
||||
|
||||
### Divers
|
||||
|
||||
- Multi-langue.
|
||||
- Multi-utilisateurs avec différents niveaux de permissions par module.
|
||||
- Multidevise.
|
||||
- Peux être multi-société par ajout du module externe multi-société.
|
||||
- Plusieurs thèmes visuels.
|
||||
- Application simple à utiliser.
|
||||
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur [https://wiki.dolibarr.org/index.php/Prérequis](https://wiki.dolibarr.org/index.php/Prérequis)).
|
||||
- Compatible avec toutes les offres Cloud du marché respectant les prérequis de base de données et PHP.
|
||||
- APIs.
|
||||
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
|
||||
- Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
|
||||
- Support natif de nombreuses fonctions spécifiques aux pays comme:
|
||||
- La taxe espagnole TE et ISPF
|
||||
- Gestion de la TVA NPR (non perçue récupérable - pour les utilisateurs français des DOM-TOM)
|
||||
- La loi française Finance 2016 et logiciels de caisse
|
||||
- La double taxe canadienne
|
||||
- Le timbre fiscal tunisien
|
||||
- Numérotation de facture de l'argentines (avec type A,B,C...)
|
||||
- Compatible avec vos processus RGPD
|
||||
- ...
|
||||
- …
|
||||
|
||||
### Extension
|
||||
|
||||
Dolibarr peut aussi être étendu à volonté avec l'ajout de modules/applications externes développées par des développeurs tiers, disponible sur [DoliStore](https://www.dolistore.com).
|
||||
|
||||
## CE QUE DOLIBARR NE PEUT PAS (ENCORE) FAIRE
|
||||
|
||||
Voici un liste de fonctionnalités pas encore gérées par Dolibarr:
|
||||
|
||||
- Dolibarr ne contient pas de module de génération de feuille de paie.
|
||||
- Les tâches du module de gestion de projets n'ont pas de dépendances entre elle.
|
||||
- Dolibarr n'embarque pas de Webmail intégré nativement.
|
||||
- Dolibarr ne fait pas le café (pas encore).
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
La documentation utilisateur, développeur et traducteur est disponible sous forme de ressources de la communauté via le site [Wiki](https://wiki.dolibarr.org).
|
||||
|
||||
## CONTRIBUER
|
||||
|
||||
Ce projet existe grâce à ses nombreux contributeurs [[Contribuer](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)].
|
||||
|
||||
[](https://github.com/Dolibarr/dolibarr/graphs/contributors)
|
||||
|
||||
## CREDITS
|
||||
|
||||
Dolibarr est le résultat du travail de nombreux contributeurs depuis des années et utilise des librairies d'autres contributeurs.
|
||||
|
||||
Voir le fichier [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT)
|
||||
|
||||
## ACTUALITES ET RESEAUX SOCIAUX
|
||||
|
||||
Suivez le projet Dolibarr sur les réseaux francophones
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr.fr)
|
||||
- [X](https://www.twitter.com/dolibarr_france)
|
||||
|
||||
ou sur les réseaux anglophones
|
||||
|
||||
- [Facebook](https://www.facebook.com/dolibarr)
|
||||
- [X](https://www.twitter.com/dolibarr)
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
||||
103
README.md
103
README.md
@@ -1,65 +1,63 @@
|
||||
# DOLIBARR ERP & CRM
|
||||
|
||||

|
||||

|
||||
[](https://php.net/)
|
||||
[](https://php.net/)
|
||||
[](https://github.com/Dolibarr/dolibarr)
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/5521)
|
||||
|
||||
Dolibarr ERP & CRM is a modern software package that helps manage your organization's activities (contacts, quotes, invoices, orders, stocks, agenda, human resources, ecm, manufacturing…).
|
||||
Dolibarr ERP & CRM is a modern software package that helps manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…).
|
||||
|
||||
It's an Open-Source Software suite (written in PHP with JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers.
|
||||
It's an Open Source Software suite (written in PHP with optional JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers.
|
||||
|
||||
You can freely use, study, modify or distribute it according to its license.
|
||||
|
||||
You can use it as a standalone application or as a web application to access it from the Internet or from a LAN.
|
||||
You can use it as a standalone application or as a web application to access it from the Internet or a LAN.
|
||||
|
||||
Dolibarr has a large community ready to help you, free forums and [preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org)
|
||||
|
||||

|
||||
|
||||
|
||||
## LICENSE
|
||||
|
||||
Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either Version 3 of the License, or (at your option) any later version (GPL-3+).
|
||||
Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version (GPL-3+).
|
||||
|
||||
See the [COPYING](https://github.com/Dolibarr/dolibarr/blob/develop/COPYING) file for a full copy of the license.
|
||||
|
||||
Other licenses apply for some included dependencies. See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) for a full list.
|
||||
|
||||
|
||||
## INSTALLING
|
||||
|
||||
There is a lot of different solutions to install Dolibarr.
|
||||
### Simple setup
|
||||
|
||||
### Using packages
|
||||
|
||||
If you have low technical skills and you're looking to install Dolibarr ERP/CRM with just few clicks, you can use one of the packaged versions (see next chapter if you have IT knowledge) :
|
||||
If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions:
|
||||
|
||||
- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp))
|
||||
- [DoliDeb for Debian, Ubuntu](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian)
|
||||
- DoliRpm for Red Hat, Fedora, OpenSuse, Mandriva or Mageia
|
||||
- The Docker image (see chapter "Using Docker")
|
||||
- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian)
|
||||
- DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia
|
||||
|
||||
Releases can be downloaded from [official website](https://www.dolibarr.org/).
|
||||
|
||||
### Using the generic step by step setup (recommended for IT users)
|
||||
### Advanced setup
|
||||
|
||||
You can use any web server supporting PHP (Apache, Nginx, ...) and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version:
|
||||
You can use a web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version.
|
||||
|
||||
- Verify that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
On GNU/Linux, first check if your distribution has already packaged Dolibarr.
|
||||
|
||||
- Uncompress the downloaded .zip archive to copy the `dolibarr/htdocs` directory and all its files inside your web server root or get the files directly from GitHub (recommended if you know git as it makes it easier if you want to upgrade later):
|
||||
#### Generic install steps
|
||||
|
||||
`git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is the main version like 9.0, 19.0, ...)
|
||||
- Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
|
||||
- Set up your web server to use `dolibarr/htdocs` as root if your web server does not already define a directory to point to.
|
||||
- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommended if you know git as it makes it easier if you want to upgrade later):
|
||||
|
||||
`git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is the main version like 3.6, 9.0, ...)
|
||||
|
||||
- Set up your web server to use "*dolibarr/htdocs*" as root if your web server does not have an already defined directory to point to.
|
||||
|
||||
- Create an empty `htdocs/conf/conf.php` file and set *write* permissions for your web server user (*write* permission will be removed once install is finished)
|
||||
|
||||
- From your browser, go to the dolibarr "install/" page
|
||||
|
||||
The URL will depend on how your web configuration directs to your dolibarr installation. It may look like:
|
||||
The URL will depends on how your web setup was set up to point to your dolibarr installation. It may look like:
|
||||
|
||||
`http://localhost/dolibarr/htdocs/install/`
|
||||
|
||||
@@ -73,33 +71,24 @@ You can use any web server supporting PHP (Apache, Nginx, ...) and a supported d
|
||||
|
||||
- Follow the installer instructions
|
||||
|
||||
### Using Docker images
|
||||
|
||||
Dolibarr is also available as a [Docker image](https://hub.docker.com/r/dolibarr/dolibarr). Installation instructions are available [here](https://github.com/Dolibarr/dolibarr-docker).
|
||||
|
||||
### Using ready to use SaaS/Cloud offers
|
||||
|
||||
If you lack the time to install it yourself, consider exploring commercial 'ready-to-use' Cloud offerings (refer to https://saas.dolibarr.org). Keep in mind that this third option comes with associated costs.
|
||||
### SaaS/Cloud setup
|
||||
|
||||
If you don't have time to install it yourself, you can try some commercial 'ready to use' Cloud offers (See [https://saas.dolibarr.org](https://saas.dolibarr.org)). However, this third solution is not free.
|
||||
|
||||
## UPGRADING
|
||||
|
||||
Dolibarr supports upgrading, usually without the need for any (commercial) support (depending on if you use any commercial extensions). It supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate!
|
||||
|
||||
Follow these step-by-step instructions to seamlessly upgrade Dolibarr to the latest version:
|
||||
|
||||
- At first make a backup of your Dolibarr files & then [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
|
||||
- Verify that your installed PHP version is supported by the new version [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
- Overwrite all old files from the 'dolibarr' directory with files provided in the new version's package.
|
||||
- At your next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
|
||||
- Check that your installed PHP version is supported by the new version [see PHP support](https://wiki.dolibarr.org/index.php/Releases).
|
||||
- Overwrite all old files from the 'dolibarr' directory with files provided into the new version's package.
|
||||
- At first next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process.
|
||||
If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file in the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*").
|
||||
|
||||
|
||||
## WHAT'S NEW
|
||||
|
||||
See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) file.
|
||||
|
||||
|
||||
## FEATURES
|
||||
|
||||
### Main application/modules (all optional)
|
||||
@@ -116,7 +105,6 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Product Variants
|
||||
- Bill of Materials (BOM)
|
||||
- Manufacturing Orders (MO)
|
||||
- Workstations / Workplaces
|
||||
|
||||
Customer/Sales Management
|
||||
|
||||
@@ -135,10 +123,10 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
Supplier/Purchase Management
|
||||
|
||||
- Suppliers/Vendors + Contacts
|
||||
- Supplier (pricing) requests
|
||||
- Supplier (price) requests
|
||||
- Purchase Orders management
|
||||
- Delivery/Reception
|
||||
- Supplier Invoices/Credit notes and payment management
|
||||
- Supplier Invoices/credit notes and payment management
|
||||
- INCOTERMS
|
||||
|
||||
Finance/Accounting
|
||||
@@ -154,7 +142,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
|
||||
Collaboration
|
||||
|
||||
- Shared calendar/agenda (with `ical` and `vcal` import/export for third-party tools integration)
|
||||
- Shared calendar/agenda (with ical and vcal import/export for third-party tools integration)
|
||||
- Projects & Tasks management
|
||||
- Event organization
|
||||
- Ticket System
|
||||
@@ -162,7 +150,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
|
||||
HR - Human Resources Management
|
||||
|
||||
- Employee leave management
|
||||
- Employee's leaves management
|
||||
- Expense reports
|
||||
- Recruitment management
|
||||
- Employee/staff management
|
||||
@@ -176,13 +164,12 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Data export/import
|
||||
- Barcodes
|
||||
- LDAP connectivity
|
||||
- Click-To-Dial integration
|
||||
- ClickToDial integration
|
||||
- Mass emailing
|
||||
- RSS integration
|
||||
- Social platforms linking
|
||||
- Payment platforms integration (PayPal, Stripe, Paybox...)
|
||||
- Email-Collector
|
||||
- AI support via API
|
||||
|
||||
(around 100 modules available by default, 1000+ addons at the official marketplace Dolistore.com)
|
||||
|
||||
@@ -191,22 +178,21 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
|
||||
- Multi-Language Support (Localization in most major languages)
|
||||
- Multi-users and groups with finely-grained rights
|
||||
- Multi-Currency
|
||||
- Multi-Company (by adding an external module)
|
||||
- Multi-Company (by adding of an external module)
|
||||
- Very user-friendly and easy to use
|
||||
- Customizable dashboards
|
||||
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
|
||||
- APIs (REST, SOAP)
|
||||
- Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture)
|
||||
- Support a lot of country-specific features:
|
||||
- Spanish Tax RE and IRPF
|
||||
- Spanish Tax RE and ISPF
|
||||
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
|
||||
- Canadian double taxes (federal/province) and other countries using cumulative VAT
|
||||
- Tunisian tax stamp
|
||||
- Argentina invoice numbering using A,B,C...
|
||||
- Greece fetch customer vat details from AADE, all invoice types, MyData(external free module)
|
||||
- ZATCA e-invoicing QR-Code
|
||||
- Compatible with [European directives](https://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
|
||||
- Compatible with data privacy rules (Europe's GDPR, ...)
|
||||
- Compatible with data privacy rules (Europe GDPR, ...)
|
||||
- ...
|
||||
- Flexible PDF & ODT generation for invoices, proposals, orders...
|
||||
- ...
|
||||
@@ -223,56 +209,45 @@ See exact requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequ
|
||||
|
||||
Dolibarr can be extended with a lot of other external applications or modules from third-party developers available at the [DoliStore](https://www.dolistore.com).
|
||||
|
||||
|
||||
## WHAT DOLIBARR CAN'T DO YET
|
||||
|
||||
These are features that Dolibarr does **not** yet fully support:
|
||||
|
||||
- Tasks dependencies in projects
|
||||
- Payroll module
|
||||
- Native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc.
|
||||
- No native embedded Webmail, but you can send emails to contacts in Dolibarr with e.g. offers, invoices, etc.
|
||||
- Dolibarr can't do coffee (yet)
|
||||
|
||||
|
||||
## DOCUMENTATION
|
||||
|
||||
Administrator, user, developer and translator's documentation are available along with other community resources in the [Wiki](https://wiki.dolibarr.org).
|
||||
|
||||
|
||||
## CONTRIBUTING AND RELEASE PROCESS
|
||||
## CONTRIBUTING
|
||||
|
||||
This project exists thanks to all the people who contribute.
|
||||
Please read the instructions on how to contribute (report a bug/error, a feature request, send code, ...) [[Contributing](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
|
||||
Please read the instructions on how to contribute (report a bug/error, a feature request, send code ...) [[Contribute](https://github.com/Dolibarr/dolibarr/blob/develop/.github/CONTRIBUTING.md)]
|
||||
|
||||
A View on Contributors:
|
||||
|
||||
[](https://github.com/Dolibarr/dolibarr/graphs/contributors)
|
||||
|
||||
The release process is described into the file dev/build/makepack-howto.md
|
||||
|
||||
|
||||
## CREDITS
|
||||
|
||||
Dolibarr is the work of many contributors over the years and uses some fine PHP libraries.
|
||||
|
||||
See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file.
|
||||
|
||||
|
||||
## NEWS AND SOCIAL NETWORKS
|
||||
|
||||
Follow Dolibarr project on:
|
||||
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [Mastodon](https://pouet.chapril.org/@dolibarr)
|
||||
- [BlueSky](https://bsky.app/profile/dolibarr.org)
|
||||
- [Threads](https://www.threads.net/@dolibarr)
|
||||
- [X](https://x.com/dolibarr)
|
||||
- [Facebook](https://www.facebook.com/dolibarr)
|
||||
- [X](https://x.com/dolibarr)
|
||||
- [LinkedIn](https://www.linkedin.com/company/association-dolibarr)
|
||||
- [Reddit](https://www.reddit.com/r/Dolibarr_ERP_CRM/)
|
||||
- [YouTube](https://www.youtube.com/user/DolibarrERPCRM)
|
||||
- [GitHub](https://github.com/Dolibarr/dolibarr)
|
||||
|
||||
|
||||
## Sponsors
|
||||
### Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here. 🙏 [[Become a sponsor/backer](https://opencollective.com/dolibarr#backer)]
|
||||
|
||||
34
SECURITY.md
34
SECURITY.md
@@ -1,31 +1,24 @@
|
||||
# Security Policy
|
||||
|
||||
This file contains some policies about the security reports on Dolibarr ERP CRM project, a popular Open Source ERP and CRM used by millions of users.
|
||||
|
||||
This file contains some policies about the security reports on Dolibarr ERP CRM project, one of the most popular Open Source ERP and CRM in the world.
|
||||
|
||||
## Supported Versions for security reports
|
||||
|
||||
Security report are valid only on current stable version (see https://dolibarr.org web site to get current stable version) or on development version (branch "develop" on https://github.com/Dolibarr/dolibarr).
|
||||
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
To report a vulnerability, for a private report, you can:
|
||||
|
||||
- Send your report on Vulnerability Disclosure Program (VDP): Link will be updated soon (recommended for everybody)
|
||||
<!--
|
||||
- Send your report on Vulnerability Disclosure Program (VDP) [https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US](https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US) (recommended for everybody)
|
||||
- Send your report on [https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US](https://app.yogosha.com/cvd/dolibarr/10VxeNx6Ui3rSEhAgX63US) (recommended for everybody)
|
||||
- Or if you have permissions, use GitHub security advisory at [https://github.com/Dolibarr/dolibarr/security/advisories/new](https://github.com/Dolibarr/dolibarr/security/advisories/new)
|
||||
-->
|
||||
- Or send an email to security@dolibarr.org with clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary.
|
||||
|
||||
- Or send by email to security@dolibarr.org a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary
|
||||
|
||||
## Hunting vulnerabilities on Dolibarr
|
||||
|
||||
We believe that the future of software is online SaaS. This means software are more and more critical and no technology is perfect. Working with skilled security researchers is crucial in identifying weaknesses in our technology.
|
||||
|
||||
If you believe you've found a security bug in our service, we are happy to work with you to resolve the issue promptly.
|
||||
We plan to re-open our bug bounty program (closed in end of 2024) in the future, but this is not yet available.
|
||||
If you believe you've found a security bug in our service, we are happy to work with you to resolve the issue promptly and ensure you are fairly rewarded for your discovery.
|
||||
|
||||
Any type of denial-of-service attack is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure.
|
||||
|
||||
@@ -39,7 +32,6 @@ If you try to find bug on Dolibarr, we recommend to append to your user-agent he
|
||||
|
||||
You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put in your own web server virtual host from [https://www.dolibarr.org/download](https://www.dolibarr.org/download)
|
||||
|
||||
|
||||
## Eligibility and Responsible Disclosure
|
||||
|
||||
We are happy to thank everyone who submits valid reports which help us improve the security of Dolibarr, however only those that meet the following eligibility requirements will be "validated reports" (if not, we may close the report without any answer):
|
||||
@@ -52,7 +44,6 @@ You must not leak, manipulate, or destroy any user data of third parties to find
|
||||
|
||||
Reports are processed around once a month.
|
||||
|
||||
|
||||
## Scope for qualified vulnerabilities
|
||||
|
||||
ONLY vulnerabilities discovered, when the following setup on test platform is used, are "valid":
|
||||
@@ -66,24 +57,22 @@ ONLY vulnerabilities discovered, when the following setup on test platform is us
|
||||
- MAIN_RESTRICTHTML_ONLY_VALID_HTML = 1
|
||||
- MAIN_RESTRICTHTML_ONLY_VALID_HTML_TIDY = 1
|
||||
- MAIN_RESTRICTHTML_REMOVE_ALSO_BAD_ATTRIBUTES = 1
|
||||
- MAIN_DISALLOW_URL_INTO_DESCRIPTIONS = 1 (only relative links are allowed in descriptions/notes), or 2 (no links are allowed in descriptions/notes)
|
||||
CSRF attacks and HTML injections are accepted but double check this setup that is experimental setup that already fix a lot of case and soon enabled by default.
|
||||
* ONLY security reports on modules provided by default and with the "stable" status are valid (troubles in "experimental", "development" or external modules are not valid vulnerabilities).
|
||||
* The root of web server must link to htdocs and the documents directory must be outside of the web server root (this is the default when using the default installer but may differs with external installer).
|
||||
* The web server setup must be done so that only the documents directory is in write mode and directory listing is not allowed. The directory path htdocs/ must be read-only.
|
||||
* The web server setup must be done so that only the documents directory is in write mode. The root directory called htdocs must be read-only.
|
||||
* The modules DebugBar and ModuleBuilder must NOT be enabled. (by default, these modules are not enabled. They are developer tools)
|
||||
* Ability for a high-level user to edit web site pages in the CMS by including HTML or JavaScript is an expected feature. Vulnerabilities in the website module are validated only if HTML or JavaScript injection can be done by a non-allowed user.
|
||||
* Fail2ban rules for rate limit on the login page, forgotten password page, API calls and all public pages (/public/*) must be installed as recommended in the section "About - Admin tools - Section Access limits and mitigation".
|
||||
|
||||
Scope is the web application (backoffice) and the APIs.
|
||||
|
||||
|
||||
## Examples of vulnerabilities that are Qualified for reporting.
|
||||
|
||||
* Remote code execution (RCE)
|
||||
* Local files access and manipulation (LFI, RFI, XXE, SSRF, XSPA)
|
||||
* Code injections (JS, SQL, PHP). HTML are covered only for fields that are not description, notes or comments fields (where rich content is allowed on purpose).
|
||||
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose) and except
|
||||
in the module "Web site" when permission to edit website content is allowed (injecting any data in this case is allowed too).
|
||||
* Cross-Site Scripting (XSS), except from setup page of module "External web site" (allowing any content here, editable by admin user only, is accepted on purpose) and except in the module "Web site" when permission to edit website content is allowed (injecting any data in this case is allowed too).
|
||||
* Cross-Site Requests Forgery (CSRF) with real security impact (when using GET URLs, CSRF are qualified only for creating, updating or deleting data from pages restricted to admin users)
|
||||
* Open redirect
|
||||
* Broken authentication & session management
|
||||
@@ -93,14 +82,9 @@ Scope is the web application (backoffice) and the APIs.
|
||||
* "HTTP Host Header" XSS
|
||||
* Software version disclosure (for non-admin users only)
|
||||
* Stack traces or path disclosure (for non-admin users only)
|
||||
* Ability for a high-level user to edit web site pages in the CMS by including HTML or JavaScript is an expected feature. Vulnerabilities in the website module are validated only
|
||||
if HTML or JavaScript injection can be done by a non-allowed user.
|
||||
|
||||
|
||||
## Examples of vulnerabilities that are Non-qualified for reporting.
|
||||
|
||||
* Any vulnerabilities due to a configuration different than the one defined in chapter "Scope for qualified vulnerabilities".
|
||||
* Directory Listing (this is a bad setup of the web server, not a problem into the application)
|
||||
* "Self" XSS
|
||||
* Clickjacking/UI redressing
|
||||
* Presence of autocomplete attribute on web forms
|
||||
@@ -108,9 +92,9 @@ Scope is the web application (backoffice) and the APIs.
|
||||
* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated
|
||||
* Reports on features on modules flagged as "deprecated", "experimental" or "development" if the module needs to be enabled for that (this is not the case on production).
|
||||
* Software or libraries versions, private IP disclosure, Stack traces or path disclosure when logged-in user is admin.
|
||||
* Any vulnerabilities due to a configuration different than the one defined in chapter "Scope for qualified vulnerabilities".
|
||||
* Vulnerabilities affecting outdated browsers or platforms, or vulnerabilities inside browsers themself.
|
||||
* Brute force attacks on login page, password forgotten page or any public pages (/public/*) are not qualified if the recommended fail2ban rules were not installed.
|
||||
* SSL/TLS practices (cypher enabled or not)
|
||||
* SSL/TLS best practices
|
||||
* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC)
|
||||
* Physical or social engineering attempts or issues that require physical access to a victim’s computer/device
|
||||
* Vulnerabilities of type XSS exploited by using javascript into a website page of the website module or by using php code into a website page (being able to set javascript or php code is the expected behaviour in the website module), except if the user does not have the permission to edit page or php code.
|
||||
|
||||
0
dev/build/.gitignore → build/.gitignore
vendored
0
dev/build/.gitignore → build/.gitignore
vendored
96
build/README
Normal file
96
build/README
Normal file
@@ -0,0 +1,96 @@
|
||||
README (English)
|
||||
|
||||
Path: /dolibarr/build/README
|
||||
|
||||
##################################################
|
||||
Building packages
|
||||
##################################################
|
||||
|
||||
All sub-directories of "build" directory contains files (setup or binary tools) required to build automatically Dolibarr packages.
|
||||
The build directory and all its contents is absolutely not required to make Dolibarr working.
|
||||
It is here only to build Dolibarr packages, and those generated packages will not contains this "build" directory.
|
||||
|
||||
|
||||
There are several tools:
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
- To build full Dolibarr packages, launch the script
|
||||
> Launch command perl makepack-dolibarr.pl
|
||||
|
||||
See makepack-howto.txt for prerequisites.
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
- To build a theme package, launch the script
|
||||
> perl makepack-dolibarrtheme.pl
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
- To build a package for a module, launch the script
|
||||
> perl makepack-dolibarrmodule.pl
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
- To build developper documentation, launch the script
|
||||
> perl dolibarr-doxygen-build.pl
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
You can find in "build", following sub-directories:
|
||||
|
||||
* composer
|
||||
To test an upgrade of a lib.
|
||||
|
||||
* debian
|
||||
To build Debian package.
|
||||
|
||||
* dmg:
|
||||
To build Mac OS package (not ready yet).
|
||||
|
||||
* doap:
|
||||
To build Doap descriptor to promote/describe Dolibarr releases.
|
||||
|
||||
* docker:
|
||||
To deploy Dolibarr with docker.
|
||||
|
||||
* doxygen:
|
||||
Dir with config file to build doxygen documentation.
|
||||
|
||||
* exe:
|
||||
To build exe package for Windows that distribute Dolibarr sources or
|
||||
to build the complete DoliWamp package.
|
||||
|
||||
* gource:
|
||||
To build the video of history of git changes.
|
||||
|
||||
* launchpad:
|
||||
Doc file to explain how to use launchpad.
|
||||
|
||||
* obs:
|
||||
Doc file to explain how to push release onto OBS.
|
||||
|
||||
* pad:
|
||||
To build a PAD file descriptor to promote/describe Dolibarr releases.
|
||||
|
||||
* patch:
|
||||
Script file to generate a patch file to distribute a Dolibarr mod.
|
||||
|
||||
* perl:
|
||||
Tool to install dolibarr when using virtualmin pro
|
||||
|
||||
* rpm:
|
||||
To build Redhat, Opensuse or Mandriva package.
|
||||
|
||||
* tgz:
|
||||
To build a tgz package.
|
||||
|
||||
* travis-ci:
|
||||
Used by travis to make CI.
|
||||
|
||||
* zip:
|
||||
To build a zip package.
|
||||
19
build/composer/README
Normal file
19
build/composer/README
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
* To list packages
|
||||
|
||||
composer show -i
|
||||
|
||||
* To test upgrade of a lib with composer:
|
||||
|
||||
Remove entry in composer.lock
|
||||
Edit composer.json to change version to "x.y.z"
|
||||
composer -v update --root-reqs --no-dev --no-autoloader --dry-run ccampbell/chromephp
|
||||
|
||||
* To upgrade a lib with composer:
|
||||
|
||||
Remove entry in composer.lock
|
||||
Edit composer.json to change version to "x.y.z"
|
||||
composer -v update --root-reqs --no-dev --no-autoloader ccampbell/chromephp
|
||||
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ export QUILT_PATCHES=debian/patches
|
||||
# dpkg -l List all packages
|
||||
# dpkg -b To build binary only package
|
||||
# dpkg -c package.deb List content of package
|
||||
# dpkg -I package.deb Give information on package
|
||||
# dpkg -I package.deb Give informations on package
|
||||
# dpkg -i package.deb Install a package
|
||||
# dpkg-reconfigure -plow package Reconfigure package
|
||||
# dpkg -L packagename List content of installed package
|
||||
@@ -173,7 +173,7 @@ or
|
||||
> ls /srv/chroot
|
||||
|
||||
Puis pour se connecter et préparer l'environnement
|
||||
> schroot -c name_of_chroot (example schroot -c unstable-amd64-sbuild)
|
||||
> schroot -c name_of_chroot (exemple schroot -c unstable-amd64-sbuild)
|
||||
> cat /etc/debian_chroot to check which debian branch we are into
|
||||
> apt-get install vim dialog
|
||||
> vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok)
|
||||
@@ -249,7 +249,7 @@ ou
|
||||
> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-x.y.z]
|
||||
|
||||
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-3.5.x]
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommitted file
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
|
||||
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
|
||||
Note: Package is built into directory ../build-area
|
||||
Note: To compare 2 packages: debdiff package1.dsc package2.dsc
|
||||
@@ -345,7 +345,7 @@ To update dolibarr debian package when only files not into debian has changed:
|
||||
|
||||
* Checkout the branch you want to work on: master of debian/...
|
||||
* Manually, add patches into debian/patches and update the file debian/series, or do the 2 steps with "quilt import filepatch.patch"
|
||||
* You can test patching of series with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revient a l'état du upstream sans les patch.
|
||||
* You can test patching of serie with "quilt push" (autant de fois que de patch). Avec "quilt pop -a", on revient a l'état du upstream sans les patch.
|
||||
* Update the debian/changelog to add entry of change.
|
||||
|
||||
Once files has been prepared, it's time to test:
|
||||
@@ -357,7 +357,7 @@ ou
|
||||
> git-buildpackage -us -uc --git-ignore-branch --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
|
||||
|
||||
Note: To build an old version, do: git checkout oldtagname -b newbranchname; git-buildpackage -us -uc --git-debian-branch=newbranchname --git-upstream-branch=[upstream|upstream-jessie|upstream-3.5.x|3.5.5]
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommitted file
|
||||
Note: You can use git-buildpackage -us -uc --git-ignore-new if you want to test build with uncommited file
|
||||
Note: You can use git-buildpackage -us -uc -d if you want to test build when dependencies does not match
|
||||
Note: Package is built into directory ../build-area
|
||||
Note: To compare 2 packages: debdiff package1.dsc package2.dsc
|
||||
21
build/debian/apache/.htaccess
Normal file
21
build/debian/apache/.htaccess
Normal file
@@ -0,0 +1,21 @@
|
||||
# File used to disable access into directory documents
|
||||
<IfVersion >= 2.3>
|
||||
Require all denied
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order deny, allow
|
||||
Denied from all
|
||||
</IfVersion>
|
||||
|
||||
|
||||
# OPTIMIZE: To use cache on static pages (A259200 = 1 month, A7200 = 2 hours, A691600 = 8 days = recommanded for static resources).
|
||||
# Note that you must also enable the module mod_expires.
|
||||
#ExpiresActive On
|
||||
#ExpiresByType image/x-icon A2592000
|
||||
#ExpiresByType image/gif A2592000
|
||||
#ExpiresByType image/png A2592000
|
||||
#ExpiresByType image/jpeg A2592000
|
||||
#ExpiresByType text/css A2592000
|
||||
#ExpiresByType text/javascript A2592000
|
||||
#ExpiresByType application/x-javascript A2592000
|
||||
#ExpiresByType application/javascript A2592000
|
||||
1
build/debian/compat
Normal file
1
build/debian/compat
Normal file
@@ -0,0 +1 @@
|
||||
10
|
||||
@@ -235,3 +235,4 @@ $dolibarr_main_prod='0';
|
||||
# dolibarr_main_distrib
|
||||
# A key to identify the distribution used for first installation
|
||||
$dolibarr_main_distrib = 'debian';
|
||||
|
||||
0
dev/build/debian/control → build/debian/control
Normal file → Executable file
0
dev/build/debian/control → build/debian/control
Normal file → Executable file
@@ -64,7 +64,7 @@ License: GPL-3+
|
||||
Files: htdocs/includes/ckeditor/*
|
||||
Copyright: 2003-2012 CKSource - Frederico Knabben
|
||||
License: GPL-2+
|
||||
The ckeditor is triple licensed under the GNU General Public License (GPL),
|
||||
The ckeditor is tripple licensed under the GNU General Public License (GPL),
|
||||
GNU Lesser General Public License (LGPL), and Mozilla Public License (MPL).
|
||||
In Debian, it is distributed under the GNU General Public License (GPL).
|
||||
.
|
||||
2
dev/build/debian/dolibarr.config → build/debian/dolibarr.config
Executable file → Normal file
2
dev/build/debian/dolibarr.config → build/debian/dolibarr.config
Executable file → Normal file
@@ -2,8 +2,6 @@
|
||||
# Debian install package run: config, preinst, prerm, postinst, postrm
|
||||
#
|
||||
|
||||
# shellcheck disable=1091,2034
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
27
build/debian/dolibarr.desktop
Normal file
27
build/debian/dolibarr.desktop
Normal file
@@ -0,0 +1,27 @@
|
||||
[Desktop Entry]
|
||||
# This file is used to add Ubuntu menu entry
|
||||
# It must be saved into directory /usr/share/applications
|
||||
Version=1.0
|
||||
Name=Dolibarr ERP & CRM
|
||||
Name[es]=Dolibarr ERP & CRM
|
||||
Name[fr]=Dolibarr ERP & CRM
|
||||
Name[it]=Dolibarr ERP & CRM
|
||||
GenericName=Dolibarr ERP & CRM
|
||||
Comment=The easy to use manager (ERP & CRM) for small and medium enterprises or foundations
|
||||
Comment[es]=Software para gestión de PYMES, profesionales independientes, auto emprendedores ó asociaciones
|
||||
Comment[fr]=L'ERP & CRM simple pour la gestion des PME et associations
|
||||
Comment[it]=Programma gestionale open source e gratuito per piccole e medie imprese, fondazioni e liberi professionisti
|
||||
# Command to open an URL
|
||||
# For Fedora: xdg-open
|
||||
# For Debian/Ubuntu: xdg-open or x-www-browser
|
||||
# (exo-open for xfde, gnome-open for gnome, ...)
|
||||
Exec=xdg-open http://localhost/dolibarr
|
||||
Icon=dolibarr
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Office
|
||||
StartupNotify=true
|
||||
InitialPreference=5
|
||||
Keywords=erp,crm,billing,customer,supplier,stock,agenda,project,order,shipment
|
||||
#NoDisplay=true
|
||||
#OnlyShowIn=GNOME
|
||||
2
dev/build/debian/dolibarr.postinst → build/debian/dolibarr.postinst
Executable file → Normal file
2
dev/build/debian/dolibarr.postinst → build/debian/dolibarr.postinst
Executable file → Normal file
@@ -1,8 +1,6 @@
|
||||
#!/bin/sh
|
||||
# postinst script for dolibarr
|
||||
|
||||
# shellcheck disable=1091,2086,2154
|
||||
|
||||
set -e
|
||||
|
||||
# summary of how this script can be called:
|
||||
6
dev/build/debian/dolibarr.postrm → build/debian/dolibarr.postrm
Executable file → Normal file
6
dev/build/debian/dolibarr.postrm → build/debian/dolibarr.postrm
Executable file → Normal file
@@ -3,8 +3,6 @@
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
# shellcheck disable=1091,2006,2034,2086,2089,2090
|
||||
|
||||
#set -e
|
||||
set +e
|
||||
|
||||
@@ -197,10 +195,10 @@ case "$1" in
|
||||
|
||||
# Now run the drop commands
|
||||
if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
|
||||
log="${log}Dropping database $dbname."
|
||||
log="${log}Droping database $dbname."
|
||||
if eval $mysqlcmd -f -e "\"DROP DATABASE $dbname;\"" ; then
|
||||
if eval $mysqlcmd -f -e "\"show databases;\"" | grep -e "^$dbname" > /dev/null 2>&1 ; then
|
||||
error="Database $dbname NOT successfully dropped. You have to do it manually."
|
||||
error="Database $dbname NOT successfully droped. You have to do it manually."
|
||||
echo postrm $error
|
||||
else
|
||||
status=drop
|
||||
@@ -102,3 +102,4 @@ Description: Delete database ?
|
||||
# Delete also all uploaded and generated files (datas related
|
||||
# to this quetion are all files found into /usr/share/dolibarr/documents,
|
||||
# uploaded or generated when using Dolibarr) ?
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
# shellcheck disable=2034,2086,2103,2164
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
|
||||
|
||||
41
build/debian/install.forced.php.install
Normal file
41
build/debian/install.forced.php.install
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
// File to force Dolibarr wizard installer choices.
|
||||
//
|
||||
// This file must be present into htdocs/install or /etc/dolibarr directory
|
||||
// during install process to be used.
|
||||
//
|
||||
//
|
||||
|
||||
$force_install_packager='deb';
|
||||
$force_install_noedit=1;
|
||||
$force_install_message='KeepDefaultValuesDeb';
|
||||
#$force_install_main_data_root='/usr/share/dolibarr/documents';
|
||||
$force_install_main_data_root='/var/lib/dolibarr/documents';
|
||||
$force_install_type='mysqli';
|
||||
$force_install_dbserver='localhost';
|
||||
$force_install_port='3306';
|
||||
$force_install_database='dolibarrdebian';
|
||||
$force_install_createdatabase='1';
|
||||
$force_install_databaselogin='dolibarrdebian';
|
||||
$force_install_databasepass='';
|
||||
$force_install_createuser='1';
|
||||
$force_install_databaserootlogin='__SUPERUSERLOGIN__';
|
||||
$force_install_databaserootpass='__SUPERUSERPASSWORD__';
|
||||
$force_install_dolibarrlogin='admin';
|
||||
$force_install_nophpinfo='1';
|
||||
$force_install_lockinstall='444';
|
||||
$force_install_distrib='debian';
|
||||
|
||||
// Value to overwrite path to use shared libraries/fonts instead of embedded one.
|
||||
// If during install, we enable/disable declaration to use non embedded libraries, we must also check they are
|
||||
// - not removed from package (see rm in rules file),
|
||||
// - declared into dependencies (see Depends in control file)
|
||||
//$force_dolibarr_lib_TCPDF_PATH='';
|
||||
//$force_dolibarr_lib_GEOIP_PATH='';
|
||||
//$force_dolibarr_lib_NUSOAP_PATH='/usr/share/php/nusoap';
|
||||
//$force_dolibarr_lib_ODTPHP_PATHTOPCLZIP='/usr/share/php/libphp-pclzip';
|
||||
//$force_dolibarr_js_CKEDITOR='/javascript/ckeditor'; // Use '/javascript/ckeditor' or 'disabled'
|
||||
//$force_dolibarr_js_JQUERY='/javascript/jquery';
|
||||
//$force_dolibarr_js_JQUERY_UI='/javascript/jquery-ui';
|
||||
//$force_dolibarr_js_JQUERY_FLOT='/javascript/flot';
|
||||
//$force_dolibarr_font_DOL_DEFAULT_TTF_BOLD='/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf';
|
||||
1
build/debian/po/POTFILES.in
Normal file
1
build/debian/po/POTFILES.in
Normal file
@@ -0,0 +1 @@
|
||||
[type: gettext/rfc822deb] dolibarr.templates
|
||||
@@ -4,7 +4,7 @@
|
||||
export DH_VERBOSE=1
|
||||
export DH_OPTIONS=-v
|
||||
|
||||
#export DH_COMPAT=7 # This is the debhelper compatibility version to use, now defined into compat file
|
||||
#export DH_COMPAT=7 # This is the debhelper compatability version to use, now defined into compat file
|
||||
|
||||
|
||||
%:
|
||||
@@ -81,16 +81,16 @@ override_dh_install:
|
||||
|
||||
rm -fr test
|
||||
|
||||
rm -fr dev/build/aps
|
||||
rm -fr dev/build/dmg
|
||||
rm -fr dev/build/doap
|
||||
rm -fr dev/build/exe
|
||||
rm -fr dev/build/launchpad
|
||||
rm -fr dev/build/live
|
||||
rm -fr dev/build/patch
|
||||
rm -fr dev/build/perl
|
||||
rm -fr dev/build/rpm
|
||||
rm -fr dev/build/zip
|
||||
rm -fr build/aps
|
||||
rm -fr build/dmg
|
||||
rm -fr build/doap
|
||||
rm -fr build/exe
|
||||
rm -fr build/launchpad
|
||||
rm -fr build/live
|
||||
rm -fr build/patch
|
||||
rm -fr build/perl
|
||||
rm -fr build/rpm
|
||||
rm -fr build/zip
|
||||
|
||||
# clean from all PHP embedded libraries (we use package dependencies instead)
|
||||
# rm -fr htdocs/includes/geoip
|
||||
@@ -128,3 +128,4 @@ override_dh_fixperms:
|
||||
# Give rights to the webserver on the upload directory
|
||||
chown www-data:www-data debian/dolibarr/var/lib/dolibarr/documents
|
||||
chmod 2775 debian/dolibarr/var/lib/dolibarr/documents
|
||||
|
||||
1
build/debian/source/format
Normal file
1
build/debian/source/format
Normal file
@@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
||||
@@ -14,3 +14,4 @@ source-is-missing htdocs/includes/restler/framework/Luracast/Restler/explorer/li
|
||||
# Those are false positives, the files are their own sources since
|
||||
# they are data files
|
||||
source-is-missing htdocs/includes/mobiledetect/mobiledetectlib/Mobile_Detect.json
|
||||
|
||||
7
build/dmg/dolimamp/README
Normal file
7
build/dmg/dolimamp/README
Normal file
@@ -0,0 +1,7 @@
|
||||
README (English)
|
||||
##################################################
|
||||
DOLIMAMP Package tools
|
||||
##################################################
|
||||
|
||||
This directory contains files and docs used to build
|
||||
a DoliMamp package for Mac OS X.
|
||||
61
build/docker/Dockerfile
Normal file
61
build/docker/Dockerfile
Normal file
@@ -0,0 +1,61 @@
|
||||
FROM php:8.1-apache-bullseye
|
||||
|
||||
ENV PHP_INI_DATE_TIMEZONE 'UTC'
|
||||
ENV PHP_INI_MEMORY_LIMIT 256M
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libjpeg62-turbo \
|
||||
libpng-dev \
|
||||
libpng16-16 \
|
||||
libldap2-dev \
|
||||
libxml2-dev \
|
||||
libzip-dev \
|
||||
zlib1g-dev \
|
||||
libicu-dev \
|
||||
g++ \
|
||||
default-mysql-client \
|
||||
unzip \
|
||||
curl \
|
||||
apt-utils \
|
||||
msmtp \
|
||||
msmtp-mta \
|
||||
mailutils \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \
|
||||
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
|
||||
&& docker-php-ext-install -j$(nproc) ldap && \
|
||||
mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini
|
||||
|
||||
RUN mkdir /var/documents
|
||||
RUN chown www-data:www-data /var/documents
|
||||
|
||||
COPY docker-run.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-run.sh
|
||||
|
||||
RUN pecl install xdebug && docker-php-ext-enable xdebug
|
||||
RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.mode=debug' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.start_with_request=yes' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.client_host=host.docker.internal' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.client_port=9003' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.discover_client_host=true' >> ${PHP_INI_DIR}/php.ini
|
||||
#RUN echo 'xdebug.log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini
|
||||
RUN echo 'xdebug.idekey="netbeans-xdebug"' >> ${PHP_INI_DIR}/php.ini
|
||||
|
||||
# set up sendmail config, to use maildev
|
||||
RUN echo "account default" > /etc/msmtprc
|
||||
RUN echo "auth off" >> /etc/msmtprc
|
||||
RUN echo "port 1025" >> /etc/msmtprc
|
||||
RUN echo "host mail" >> /etc/msmtprc
|
||||
RUN echo "from local@localdomain.com" >> /etc/msmtprc
|
||||
RUN echo "domain localhost.localdomain" >> /etc/msmtprc
|
||||
RUN echo "sendmail_path=/usr/bin/msmtp -t" >> /usr/local/etc/php/conf.d/php-sendmail.ini
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
ENTRYPOINT ["docker-run.sh"]
|
||||
34
build/docker/README.md
Normal file
34
build/docker/README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# How to use it ?
|
||||
|
||||
The docker-compose.yml file is a sample of a config file to use to build and run Dolibarr in the current workspace with Docker.
|
||||
This docker image is intended for development usage.
|
||||
For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr
|
||||
|
||||
Before build/run, define the variable HOST_USER_ID as following:
|
||||
|
||||
export HOST_USER_ID=$(id -u)
|
||||
|
||||
Go in repository build/docker :
|
||||
|
||||
cd build/docker
|
||||
|
||||
And then, you can run :
|
||||
|
||||
docker-compose up
|
||||
|
||||
This will run 4 containers Docker : Dolibarr, MariaDB, PhpMyAdmin and MailDev.
|
||||
|
||||
The URL to go to the Dolibarr is :
|
||||
|
||||
http://0.0.0.0
|
||||
|
||||
The URL to go to PhpMyAdmin is (login/password is root/root) :
|
||||
|
||||
http://0.0.0.0:8080
|
||||
|
||||
In Dolibarr configuration Email let PHP mail function, To see all mail send by Dolibarr go to maildev
|
||||
|
||||
http://0.0.0.0:8081
|
||||
|
||||
Setup the database connection during the installation process, please use mariadb (name of the database container) as database host.
|
||||
Setup documents folder, during the installation process, to /var/documents
|
||||
62
build/docker/docker-compose.yml
Normal file
62
build/docker/docker-compose.yml
Normal file
@@ -0,0 +1,62 @@
|
||||
version: '3'
|
||||
|
||||
networks:
|
||||
internal-pod:
|
||||
internal: true
|
||||
external-pod:
|
||||
internal: false
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpassfordev
|
||||
MYSQL_DATABASE: dolibarr
|
||||
ports:
|
||||
- "3306:3306"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
phpmyadmin:
|
||||
image: phpmyadmin/phpmyadmin
|
||||
environment:
|
||||
PMA_HOST: mariadb
|
||||
depends_on:
|
||||
- mariadb
|
||||
ports:
|
||||
- "8080:80"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
|
||||
web:
|
||||
build: .
|
||||
environment:
|
||||
HOST_USER_ID: $HOST_USER_ID
|
||||
PHP_INI_DATE_TIMEZONE: $PHP_INI_DATE_TIMEZONE
|
||||
PHP_INI_MEMORY_LIMIT: $PHP_INI_MEMORY_LIMIT
|
||||
volumes:
|
||||
- ../../htdocs:/var/www/html/
|
||||
- ../../documents:/var/documents
|
||||
ports:
|
||||
- "80:80"
|
||||
- "9000:9000"
|
||||
depends_on:
|
||||
- mariadb
|
||||
- mail
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
extra_hosts:
|
||||
- "localhost.localdomain:127.0.0.1"
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
mail:
|
||||
image: maildev/maildev
|
||||
ports:
|
||||
- "8081:1080"
|
||||
- "25:1025"
|
||||
networks:
|
||||
- internal-pod
|
||||
- external-pod
|
||||
24
build/docker/docker-run.sh
Normal file
24
build/docker/docker-run.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
# Script used by the Dockerfile.
|
||||
# See README.md to know how to create a Dolibarr env with docker
|
||||
|
||||
usermod -u ${HOST_USER_ID} www-data
|
||||
groupmod -g ${HOST_USER_ID} www-data
|
||||
|
||||
chgrp -hR www-data /var/www/html
|
||||
chmod g+rwx /var/www/html/conf
|
||||
|
||||
if [ ! -d /var/documents ]; then
|
||||
echo "[docker-run] => create volume directory /var/documents ..."
|
||||
mkdir -p /var/documents
|
||||
fi
|
||||
echo "[docker-run] => Set Permission to www-data for /var/documents"
|
||||
chown -R www-data:www-data /var/documents
|
||||
|
||||
echo "[docker-run] => update ${PHP_INI_DIR}/conf.d/dolibarr-php.ini"
|
||||
cat <<EOF > ${PHP_INI_DIR}/conf.d/dolibarr-php.ini
|
||||
date.timezone = ${PHP_INI_DATE_TIMEZONE:-UTC}
|
||||
memory_limit = ${PHP_INI_MEMORY_LIMIT:-256M}
|
||||
EOF
|
||||
|
||||
exec apache2-foreground
|
||||
3
build/docker/mariadb/Dockerfile
Normal file
3
build/docker/mariadb/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM mariadb:latest
|
||||
# Enable comented out UTF8 charset/collation options
|
||||
RUN sed '/utf8/ s/^#//' /etc/mysql/mariadb.cnf >/tmp/t && mv /tmp/t /etc/mysql/mariadb.cnf
|
||||
55
build/doxygen/dolibarr-doxygen-build.pl
Executable file
55
build/doxygen/dolibarr-doxygen-build.pl
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/perl
|
||||
#--------------------------------------------------------------------
|
||||
# Lance la generation de la doc dev doxygen
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
# Detecte repertoire du script
|
||||
($DIR=$0) =~ s/([^\/\\]+)$//;
|
||||
$DIR||='.';
|
||||
$DIR =~ s/([^\/\\])[\\\/]+$/$1/;
|
||||
|
||||
$OPTIONS="";
|
||||
#$OPTIONS="-d Preprocessor";
|
||||
|
||||
$CONFFILE="dolibarr-doxygen.doxyfile";
|
||||
|
||||
use Cwd;
|
||||
my $dir = getcwd;
|
||||
|
||||
print "Current dir is: $dir\n";
|
||||
#print "Running dir for doxygen must be: $DIR\n";
|
||||
|
||||
if (! -s "build/doxygen/$CONFFILE")
|
||||
{
|
||||
print "Error: current directory for building Dolibarr doxygen documentation is not correct.\n";
|
||||
print "\n";
|
||||
print "Change your current directory then, to launch the script, run:\n";
|
||||
print '> perl .\dolibarr-doxygen-build.pl (on Windows)'."\n";
|
||||
print '> perl ../dolibarr-doxygen-build.pl (on Linux or BSD)'."\n";
|
||||
sleep 4;
|
||||
exit 1;
|
||||
}
|
||||
|
||||
$SOURCE=".";
|
||||
|
||||
# Get version $MAJOR, $MINOR and $BUILD
|
||||
$result = open( IN, "< " . $SOURCE . "/htdocs/filefunc.inc.php" );
|
||||
if ( !$result ) { die "Error: Can't open descriptor file " . $SOURCE . "/htdocs/filefunc.inc.php\n"; }
|
||||
while (<IN>) {
|
||||
if ( $_ =~ /define\('DOL_VERSION', '([\d\.a-z\-]+)'\)/ ) { $PROJVERSION = $1; break; }
|
||||
}
|
||||
close IN;
|
||||
($MAJOR,$MINOR,$BUILD)=split(/\./,$PROJVERSION,3);
|
||||
if ($MINOR eq '') { die "Error can't detect version into ".$SOURCE . "/htdocs/filefunc.inc.php"; }
|
||||
|
||||
|
||||
$version=$MAJOR.".".$MINOR.".".$BUILD;
|
||||
|
||||
|
||||
print "Running doxygen for version ".$version.", please wait...\n";
|
||||
print "cat build/doxygen/$CONFFILE | sed -e 's/x\.y\.z/".$version."/' | doxygen $OPTIONS - 2>&1\n";
|
||||
$result=`cat build/doxygen/$CONFFILE | sed -e 's/x\.y\.z/$version/' | doxygen $OPTIONS - 2>&1`;
|
||||
|
||||
print $result;
|
||||
|
||||
0;
|
||||
88
build/doxygen/dolibarr-doxygen-filter.pl
Executable file
88
build/doxygen/dolibarr-doxygen-filter.pl
Executable file
@@ -0,0 +1,88 @@
|
||||
#!/usr/bin/perl
|
||||
#--------------------------------------------------------------------
|
||||
# \brief This script is a preprocessor for PHP files to be used
|
||||
# on PHP source files before running Doxygen.
|
||||
# \author Laurent Destailleur
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
# Usage: dolibarr-doxygen-filter.pl pathtofilefromdolibarrroot
|
||||
|
||||
$file=$ARGV[0];
|
||||
if (! $file)
|
||||
{
|
||||
print "Usage: dolibarr-doxygen-filter.pl pathtofilefromdolibarrroot\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
open(FILE,$file) || die "Failed to open file $file";
|
||||
while (<FILE>)
|
||||
{
|
||||
if ($_ =~ /\\version\s/i)
|
||||
{
|
||||
$_ =~ s/\$Id://i;
|
||||
$_ =~ s/(Exp|)\s\$$//i;
|
||||
$_ =~ s/(\\version\s+)[^\s]+\s/$1/i;
|
||||
$_ =~ s/(\w)\s(\w)/$1_$2/g;
|
||||
}
|
||||
$_ =~ s/exit\s*;/exit(0);/i;
|
||||
$i=0;
|
||||
$len=length($_);
|
||||
$s="";
|
||||
$insidequote=0;
|
||||
$insidedquote=0;
|
||||
$ignore="";
|
||||
while ($i < $len)
|
||||
{
|
||||
$c=substr($_,$i,1);
|
||||
if ($c eq "\\")
|
||||
{
|
||||
if ($insidequote) { $ignore="'"; };
|
||||
if ($insidedquote) { $ignore="\""; };
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($c eq "'")
|
||||
{
|
||||
if (! $insidedquote)
|
||||
{
|
||||
$c="\"";
|
||||
#print "X".$ignore;
|
||||
if ($ignore ne "'")
|
||||
{
|
||||
#print "Z".$ignore;
|
||||
$insidequote++;
|
||||
if ($insidequote == 2)
|
||||
{
|
||||
$insidequote=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#print "X".$insidequote;
|
||||
}
|
||||
elsif ($c eq "\"")
|
||||
{
|
||||
#print "Y".$insidequote;
|
||||
if ($insidequote)
|
||||
{
|
||||
$c="'";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($ignore ne "\"")
|
||||
{
|
||||
$insidedquote++;
|
||||
if ($insidedquote == 2)
|
||||
{
|
||||
$insidedquote=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$ignore="";
|
||||
}
|
||||
$s.=$c;
|
||||
$i++;
|
||||
}
|
||||
print $s;
|
||||
}
|
||||
close(FILE);
|
||||
21
build/doxygen/dolibarr-doxygen-getversion.pl
Executable file
21
build/doxygen/dolibarr-doxygen-getversion.pl
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/perl
|
||||
#--------------------------------------------------------------------
|
||||
# Script to get version of a source file
|
||||
# Does not work with cygwin cvs command on Windows.
|
||||
#
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
# Usage: dolibarr-doxygen-getversion.pl pathtofilefromdolibarrroot
|
||||
|
||||
$file=$ARGV[0];
|
||||
if (! $file)
|
||||
{
|
||||
print "Usage: dolibarr-doxygen-getversion.pl pathtofilefromdolibarrroot\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$commande='cvs status "'.$file.'" | sed -n \'s/^[ \]*Working revision:[ \t]*\([0-9][0-9\.]*\).*/\1/p\'';
|
||||
#print $commande;
|
||||
$result=`$commande 2>&1`;
|
||||
|
||||
print $result;
|
||||
@@ -41,7 +41,7 @@ PROJECT_NUMBER = x.y.z
|
||||
# If a relative path is entered, it will be relative to the location
|
||||
# where doxygen was started. If left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = dev/build
|
||||
OUTPUT_DIRECTORY = build
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
|
||||
# 4096 sub-directories (in 2 levels) under the output directory of each output
|
||||
@@ -283,10 +283,10 @@ TYPEDEF_HIDES_STRUCT = NO
|
||||
# For small to medium size projects (<1000 input files) the default value is
|
||||
# probably good enough. For larger projects a too small cache size can cause
|
||||
# doxygen to be busy swapping symbols to and from disk most of the time
|
||||
# causing a significant performance penalty.
|
||||
# causing a significant performance penality.
|
||||
# If the system has enough physical memory increasing the cache will improve the
|
||||
# performance by keeping more symbols in memory. Note that the value works on
|
||||
# a logarithmic scale so increasing the size by one will roughly double the
|
||||
# a logarithmic scale so increasing the size by one will rougly double the
|
||||
# memory usage. The cache size is given by this formula:
|
||||
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols
|
||||
@@ -575,7 +575,7 @@ WARN_FORMAT = "$file:$line: $text"
|
||||
# and error messages should be written. If left blank the output is written
|
||||
# to stderr.
|
||||
|
||||
WARN_LOGFILE = dev/build/html/doxygen_warnings.log
|
||||
WARN_LOGFILE = build/html/doxygen_warnings.log
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
@@ -804,14 +804,14 @@ HTML_FILE_EXTENSION = .html
|
||||
# standard header.
|
||||
|
||||
# Does not work with 1.7.3
|
||||
#HTML_HEADER = dev/build/doxygen/doxygen_header.html
|
||||
#HTML_HEADER = build/doxygen/doxygen_header.html
|
||||
|
||||
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
|
||||
# each generated HTML page. If it is left blank doxygen will generate a
|
||||
# standard footer.
|
||||
|
||||
# Does not work with 1.7.3
|
||||
HTML_FOOTER = dev/build/doxygen/doxygen_footer.html
|
||||
HTML_FOOTER = build/doxygen/doxygen_footer.html
|
||||
|
||||
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
|
||||
# style sheet that is used by each HTML page. It can be used to
|
||||
@@ -1655,4 +1655,4 @@ DOT_CLEANUP = YES
|
||||
|
||||
|
||||
FULL_SIDEBAR = NO
|
||||
HTML_EXTRA_STYLESHEET = dev/build/doxygen/doxygen-awesome.css
|
||||
HTML_EXTRA_STYLESHEET = build/doxygen/doxygen-awesome.css
|
||||
@@ -160,7 +160,7 @@ html {
|
||||
--toc-background: var(--side-nav-background);
|
||||
--toc-foreground: var(--side-nav-foreground);
|
||||
|
||||
/* height of an item in any tree / collapsible table */
|
||||
/* height of an item in any tree / collapsable table */
|
||||
--tree-item-height: 30px;
|
||||
|
||||
--memname-font-size: var(--code-font-size);
|
||||
@@ -48,3 +48,5 @@
|
||||
</div>
|
||||
|
||||
<!-- End doxygen_header.html -->
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user