Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into d…
Browse files Browse the repository at this point in the history
…ev_hook_manifest
  • Loading branch information
FHenry committed Jan 12, 2024
2 parents acb10ba + 014c9a1 commit 4576435
Show file tree
Hide file tree
Showing 584 changed files with 2,394 additions and 2,070 deletions.
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ languages:
JavaScript: true
PHP: true
engines:
phpcodesniffer: true
phpcodesniffer: true
exclude_paths:
- 'build/*'
- 'dev/*'
Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
attributes:
value: |
This is a template to help you report good issues. You may use [Github Markdown](https://help.github.com/articles/getting-started-with-writing-and-formatting-on-github/) syntax to format your issue report.
- type: textarea
id: bug
attributes:
Expand All @@ -27,19 +27,19 @@ body:
attributes:
label: Environment OS
description: Server OS type and version

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

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

- type: input
id: environment-database
attributes:
Expand All @@ -63,7 +63,7 @@ body:
attributes:
label: Steps to reproduce the behavior
description: Verbose description

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

- type: textarea
id: suggested-implementation
attributes:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/exakat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Exakat
uses: docker://exakat/exakat-ga
with:
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/NestedTernary,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/UndefinedFunctions,Functions/WrongNumberOfArguments,Functions/WrongTypeWithCall,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Php/WrongTypeForNativeFunction,Structures/AddZero,Structures/DropElseAfterReturn,Structures/IfWithSameConditions,Structures/MergeIfThen,Structures/NestedTernary,Structures/ElseIfElseif,Structures/ExitUsage,Structures/RepeatedPrint,Structures/RepeatedRegex,Structures/SameConditions,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UselessParenthesis,Structures/UseConstant'
ignore_dirs: '/htdocs/includes/,/htdocs/install/doctemplates/,/build/,/dev/,/doc/,/scripts/,/test/'
file_extensions: php
project_reports: Perfile
file_extensions: php
project_reports: Perfile
11 changes: 4 additions & 7 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
name: PHPSTAN

# Controls when the workflow will run
on:
# Triggers the workflow on pull request events but only for the develop branch
pull_request:
branches: [ develop ]
on: [push, pull_request ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -45,9 +42,9 @@ jobs:
uses: actions/cache/restore@v3
with:
path: ./.github/tmp
key: "phpstan-cache-PR-${{ matrix.php-version }}-${{ github.run_id }}"
key: "phpstan-cache-${{ matrix.php-version }}-${{ github.run_id }}"
restore-keys: |
phpstan-cache-PR-${{ matrix.php-version }}-
phpstan-cache-${{ matrix.php-version }}-
- name: Debug
run: cd ./.github/tmp && ls -al
- name: Run PHPSTAN
Expand All @@ -58,4 +55,4 @@ jobs:
if: always()
with:
path: ./.github/tmp
key: "phpstan-cache-PR-${{ matrix.php-version }}-${{ github.run_id }}"
key: "phpstan-cache-${{ matrix.php-version }}-${{ github.run_id }}"
4 changes: 2 additions & 2 deletions .github/workflows/stale-issues-safe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
issue_comment:
types: [created]
workflow_dispatch:

permissions: {} # none

jobs:
Expand All @@ -26,4 +26,4 @@ jobs:
days-before-close: 10
operations-per-run: 100
dry-run: false

26 changes: 13 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- stage: PHP min and max
if: type = push
php: '7.1'
env:
env:
- DB=postgresql
- TRAVIS_PHP_VERSION=7.1
- stage: PHP min and max
Expand All @@ -49,7 +49,7 @@ jobs:
- stage: PHP 8.3
if: type = push AND branch = develop
php: '8.3'
env:
env:
- DB=mysql
- TRAVIS_PHP_VERSION=8.3

Expand Down Expand Up @@ -89,7 +89,7 @@ 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
- |
echo Install pgsql if run is for pgsql
if [ "$DB" = 'postgresql' ]; then
Expand All @@ -116,15 +116,15 @@ install:
- |
if [ "$TRAVIS_PHP_VERSION" = '7.1' ]; then
sudo update-alternatives --set php /usr/bin/php7.1
fi
fi
if [ "$TRAVIS_PHP_VERSION" = '8.1' ]; then
sudo update-alternatives --set php /usr/bin/php8.1
fi
fi
if [ "$TRAVIS_PHP_VERSION" = '8.2' ]; then
sudo update-alternatives --set php /usr/bin/php8.2
fi
fi
php -i | head -
- |
echo "Updating Composer config"
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
Expand All @@ -133,7 +133,7 @@ install:
php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
sudo chmod -R a+rwx /usr/local/bin/composer
#sudo apt install composer
composer -V
composer -n config -g vendor-dir htdocs/includes
Expand Down Expand Up @@ -229,7 +229,7 @@ before_script:
#sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa
sudo mysqld_safe --skip-grant-tables --socket=/tmp/aaa &
sleep 3
sudo ps fauxww
sudo ps fauxww
echo "MySQL set root password"
sudo mysql -u root -h 127.0.0.1 -e "FLUSH PRIVILEGES; CREATE DATABASE IF NOT EXISTS travis CHARACTER SET = 'utf8'; ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'; CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY 'password'; CREATE USER 'travis'@'127.0.0.1' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON travis.* TO [email protected]; GRANT ALL PRIVILEGES ON travis.* TO [email protected]; FLUSH PRIVILEGES;"
echo "MySQL grant"
Expand All @@ -238,15 +238,15 @@ before_script:
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'use mysql; select * from user;'
echo "List pid file"
sudo mysql -u root -h 127.0.0.1 -ppassword -e "show variables like '%pid%';"
#sudo kill `cat /var/lib/mysqld/mysqld.pid`
#sudo systemctl start mariadb
echo "MySQL grant"
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'GRANT ALL PRIVILEGES ON travis.* TO [email protected];'
echo "MySQL flush"
sudo mysql -u root -h 127.0.0.1 -ppassword -e 'FLUSH PRIVILEGES;'
echo "MySQL load sql"
sudo mysql -u root -h 127.0.0.1 -ppassword -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql
fi
Expand Down Expand Up @@ -415,12 +415,12 @@ script:
echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE
#cat $INSTALL_FORCED_FILE
echo
- |
echo "Upgrading Dolibarr"
# Ensure we catch errors with -e. Set this to +e if you want to go to the end to see log files.
# Note: We keep +e because with pgsql, one of upgrade process fails even if migration seems ok, so
# I disable stop on error to be able to continue.
# I disable stop on error to be able to continue.
set +e
cd htdocs/install
php upgrade.php 3.5.0 3.6.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade350360.log
Expand Down
2 changes: 1 addition & 1 deletion build/README
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ See makepack-howto.txt for prerequisites.

--------------------------------------------------------------------------------------------------

- To build developper documentation, launch the script
- To build developer documentation, launch the script
> perl dolibarr-doxygen-build.pl


Expand Down
10 changes: 5 additions & 5 deletions build/debian/README.howto
Original file line number Diff line number Diff line change
Expand Up @@ -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 informations on package
# dpkg -I package.deb Give information on package
# dpkg -i package.deb Install a package
# dpkg-reconfigure -plow package Reconfigure package
# dpkg -L packagename List content of installed package
Expand Down Expand Up @@ -173,7 +173,7 @@ or
> ls /srv/chroot

Puis pour se connecter et préparer l'environnement
> schroot -c name_of_chroot (exemple schroot -c unstable-amd64-sbuild)
> schroot -c name_of_chroot (example 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)
Expand Down Expand Up @@ -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 uncommited file
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 -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
Expand Down Expand Up @@ -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 serie 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 series 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:
Expand All @@ -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 uncommited file
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 -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
Expand Down
Empty file modified build/debian/control
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion build/debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ License: GPL-3+
Files: htdocs/includes/ckeditor/*
Copyright: 2003-2012 CKSource - Frederico Knabben
License: GPL-2+
The ckeditor is tripple licensed under the GNU General Public License (GPL),
The ckeditor is triple 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).
.
Expand Down
2 changes: 2 additions & 0 deletions build/debian/dolibarr.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Debian install package run: config, preinst, prerm, postinst, postrm
#

# shellcheck disable=1091,2034

set -e


Expand Down
2 changes: 2 additions & 0 deletions build/debian/dolibarr.postinst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/sh
# postinst script for dolibarr

# shellcheck disable=1091,2086,2154

set -e

# summary of how this script can be called:
Expand Down
2 changes: 2 additions & 0 deletions build/debian/dolibarr.postrm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#
# see: dh_installdeb(1)

# shellcheck disable=1091,2006,2034,2086,2089,2090

#set -e
set +e

Expand Down
2 changes: 2 additions & 0 deletions build/debian/get-orig-source.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/sh

# shellcheck disable=2034,2086,2103,2164

tmpdir=$(mktemp -d)


Expand Down
2 changes: 1 addition & 1 deletion build/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
export DH_VERBOSE=1
export DH_OPTIONS=-v

#export DH_COMPAT=7 # This is the debhelper compatability version to use, now defined into compat file
#export DH_COMPAT=7 # This is the debhelper compatibility version to use, now defined into compat file


%:
Expand Down
8 changes: 4 additions & 4 deletions build/docker/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# 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
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
Expand All @@ -15,8 +15,8 @@ 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
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
Expand Down
2 changes: 1 addition & 1 deletion build/docker/mariadb/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM mariadb:latest
# Enable comented out UTF8 charset/collation options
# Enable commented out UTF8 charset/collation options
RUN sed '/utf8/ s/^#//' /etc/mysql/mariadb.cnf >/tmp/t && mv /tmp/t /etc/mysql/mariadb.cnf
4 changes: 2 additions & 2 deletions build/doxygen/dolibarr-doxygen-build.pl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/perl
#--------------------------------------------------------------------
# Lance la generation de la doc dev doxygen
# Start the generation of the development documentation with doxygen
#--------------------------------------------------------------------

# Detecte repertoire du script
# Determine the patho of this script
($DIR=$0) =~ s/([^\/\\]+)$//;
$DIR||='.';
$DIR =~ s/([^\/\\])[\\\/]+$/$1/;
Expand Down
4 changes: 2 additions & 2 deletions build/doxygen/dolibarr-doxygen.doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 penality.
# causing a significant performance penalty.
# 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 rougly double the
# a logarithmic scale so increasing the size by one will roughly 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
Expand Down
2 changes: 1 addition & 1 deletion build/doxygen/doxygen-awesome.css
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ html {
--toc-background: var(--side-nav-background);
--toc-foreground: var(--side-nav-foreground);

/* height of an item in any tree / collapsable table */
/* height of an item in any tree / collapsible table */
--tree-item-height: 30px;

--memname-font-size: var(--code-font-size);
Expand Down
2 changes: 1 addition & 1 deletion build/launchpad/README
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ If you want to build/test package locally:
Use URL pattern (stable):
For stable: http://www.dolibarr.org/files/lastbuild/package_debian-ubuntu/dolibarr_x.z.*.tar.gz

- For Dev, you can also add link serie to GIT HEAD.
- For Dev, you can also add link series to GIT HEAD.
- For stable, you can init from command line
cd bzr/dolibarr-stable
bzr init
Expand Down
Loading

0 comments on commit 4576435

Please sign in to comment.