Skip to content

Commit

Permalink
Merge branch 'develop' into fix-phpstan-warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Hystepik authored Feb 2, 2024
2 parents 87be8df + ff04c99 commit e3844b4
Show file tree
Hide file tree
Showing 133 changed files with 1,727 additions and 1,033 deletions.
13 changes: 8 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ repos:
# For instance to update the license in edited files, you could add to local.sh:
#
# ```shell
# #!/bin/bash
# #!/bin/bash
# MYDIR=$(dirname "$0")
# CHANGED_INTERNALS=$(git diff --name-only | grep -v includes)
# "$MYDIR/dev/tools/updatelicense.php" $CHANGED_INTERNALS
Expand All @@ -52,16 +52,19 @@ repos:
pass_filenames: false

# Check PHP syntax
- repo: https://github.com/bolovsky/pre-commit-php
rev: 1.5.1
- repo: https://github.com/mdeweerd/pre-commit-php
rev: v1.6.3
hooks:
- id: php-cbf
files: \.(php)$
args: [--standard=dev/setup/codesniffer/ruleset.xml]
- id: php-cs
files: \.(php)$
args: [--standard=dev/setup/codesniffer/ruleset.xml,--report=emacs]
args: [--standard=dev/setup/codesniffer/ruleset.xml, --report=emacs]
- id: php-lint
- id: php-stan
stages: [manual]
files: \.(php)$

# Prettier (format code, only for non common files)
- repo: https://github.com/pre-commit/mirrors-prettier
Expand Down Expand Up @@ -132,7 +135,7 @@ repos:
- -L
- informations,medias,uptodate,reenable,crypted,developpers
- -L
- "creat,unitl,alltime,datas,referers"
- creat,unitl,alltime,datas,referers
- -I
- dev/tools/codespell/codespell-ignore.txt
- -x
Expand Down
43 changes: 21 additions & 22 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
English Dolibarr ChangeLog
--------------------------------------------------------------


***** ChangeLog for 19.0.0 compared to 18.0.0 *****
***** ChangeLog for 20.0.0 compared to 19.0.0 *****

For users:
----------
Expand All @@ -18,6 +17,7 @@ WARNING:
--------

The following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* Ldap class methods connect_bind() & dump_content() have been renamed
* More class properties (with old name in french) are now deprecated in favor of the property name in english.
* Some API HTTP return code were moved from 401 to 403 to better follow REST specification.

Expand All @@ -41,14 +41,13 @@ NEW: #26312 Manage intermediate BIC - SQL Part (#26325)
NEW: Accountancy: Add quick navigation with keyboard shortcut on ledger (#26221)
NEW: Accountancy: FEC/FEC2 format export with attachments (#26192)
NEW: Accountancy: Option to choose length of lettering code
NEW: Accountancy: Chart of accounts ES PCG08-PYME-CAT in catalan language
NEW: Add a button to create a product or a service from an order or an invoice (#26173)
NEW: Add a button to re-encrypt data of a dolcrypt extrafield password
NEW: Add a CLI tool to regenerate all documents
NEW: Add a goto url from smartphone search page
NEW: Add all id prof checker on thirdparty for code compta customer and supplier
NEW: add and list external contributors on ticket public interface
NEW: Add a protection on purgeFiles
NEW: Add a public page to list all open surveys
NEW: Add chart of accounts PCG08-PYME-CAT for ES in catalan language
NEW: add constant to check if qty shipped not greater than qty ordered
NEW: Add context for the movement stock (role toconsume/toproduce) on mrp
Expand All @@ -57,11 +56,8 @@ NEW: Add culum Technical ID in list of details lines of an order (#26164)
NEW: Add custom compute for exports
NEW: Add custom Text on footer total (#26334)
NEW: Add different picto for each type of extrafields (date, string, ...)
NEW: Add edit line on MO (#26122)
NEW: Added notification on closed intervention
NEW: Added of a popup on validation instead of a database fielld to know if the user wants to include subwarehouse
NEW: Added of the field "include_sub_warehouse" in the table "llx_inventory"
NEW: Added total line to third-parties list (#26148)
NEW: Added VAT free & VAT amounts on payment input
NEW: Add ext payment system ID in the payment page with link to Stripe
NEW: Add field TechnicalID in list of users
Expand All @@ -85,7 +81,6 @@ NEW: add parent product column on list
NEW: Add picto in product/service list in object lines (#25511)
NEW: Add possibility to choose separator #21426
NEW: Add preselected update keys attribute to import class and select it by default if filled
NEW: add product barcode on stock exports
NEW: Add recurring behaviour
NEW: add recursive deletion option for child m os (#26102)
NEW: Add refactoring user permission (#26162)
Expand All @@ -95,70 +90,71 @@ NEW: Add the formEditObjectLine hook on commande card and invoice card
NEW: Add the picto phone of thirdparty on the kanban view of projects
NEW: Add the status of partnership to select partnership for emailing
NEW: add Ticket tab on contract
NEW: agenda per user use quarter hour split instead of half hour split
NEW: Agenda: agenda per user use quarter hour split instead of half hour split
NEW: Allow generation of delivery note through REST-API (#26226)
NEW: Allow sync of currency rates with currency layer by default.
NEW: Allow to have products not managed in stocks - SQL Part (#26190)
NEW: Assign contact to a ticket message (#24735)
NEW: Better protection against reserved words
NEW: billing on shipment+reception. Can be done before or after delivery.
NEW: can edit bomline workstation
NEW: Can edit both the Test and Live stripe customer account on payment
NEW: Can include product variants in list of products
NEW: Can manage ODT documents for groups of users.
NEW: Can modify the picto into ModuleBuilder
NEW: Can restore product in stock when deleting the supplier invoice
NEW: Can see the favicon file into setup of properties of a website
NEW: Can switch product batch management to no management. (#21691)
NEW: Can upload/delete ODT template for project and tasks
NEW: Chart of accounts ES PCG08-PYME-CAT in catalan language
NEW: clone skill object (#26526)
NEW: close notification for interventions
NEW: column in table prelevement_lignes for fk_user (#26196)
NEW: CONF allow modify ticket classification even if closed
NEW: conf to display date entry stock exped and sort in date order (#22625)
NEW: create a product from a free line in a document (#22324)
NEW: customize position in complete_head_from_modules (#26406)
NEW: Date d'entree en stock sur les exped au moment de la création
NEW: Date d'entree en stock sur les exped au moment de la création -> Stock date on exped at time of creation
NEW: Date field for shipment export (#25574)
NEW: Date format dayhoursec is using year on 2 char on smartphones
NEW: Default customer, category and product when enable TakePOS (#25031)
NEW: do not add default value in list
NEW: Donations: Generic doc template for donations (#26338)
NEW: drop down for action button show a simple button if only 1 action
NEW: Enhance github_commits_perversion to get more stats on git commits
NEW: Enhance IPN to support payment_intent.succeeded for both card/ban
NEW: Exports: add product barcode on stock exports
NEW: extrafields password accepts 'dolcrypt' algorithm (reversible algo)
NEW: Factorize a lot of code for numbering modules
NEW: filter on from/to period rather than month/year (#26378)
NEW: FontAwesome - Add possibility to select another version
NEW: Form for add object's property on ModuleBuilder
NEW: Can generate SEPA files for salaries (#26541)
NEW: massactions to delete projects
NEW: Generic doc template for donations (#26338)
NEW: Get list evaluation with skills details in user fiche (#26510)
NEW: hidden conf to disable use of dns_get_record (which can become unresponsive) (#26339)
NEW: improved resource data structure
NEW: Include sub warehouse in inventory
NEW: Inventory without virtual products (kits)
NEW: Invoice subtypes for customers and vendors (#26233)
NEW: Intervention: close notification for interventions
NEW: Inventory: include sub warehouse in inventory
NEW: Inventory: inventory without virtual products (kits)
NEW: Invoices: subtypes for customers and vendors (#26233)
NEW: Invoice time from task, make task note better display in invoice line
NEW: lazy load to substitute project variables (#26451)
NEW: LDAP: Active Directory UserAccountControl (#25507)
NEW: Library including math and financial functions (#25035)
NEW: Loan: can upload a file with drag and drop
NEW: Manage rate indirect. (#26449)
NEW: Manufacturing Order: add edit line on MO (#26122)
NEW: memorize model name for PDF hooks
NEW: Menu editor is responsive
NEW: Merge the "Create ..." buttons on contract into one.
NEW: ModuleBuilder: Can modify the picto into ModuleBuilder
NEW: ModuleBuilder: Form for add object's property on ModuleBuilder
NEW: More accurate tooltip on what admin permissions are
NEW: (#24834) new option for hide the footer (#25464)
NEW: (#25044) new option for choose project visibility
NEW: new option for hide the footer of tickets on the public interface
NEW: no need to create invoice supplier object on supplier card for standalone credit note
NEW: Open-Surveys: Add a public page to list all open surveys
NEW: Option to show label, ref+label or only ref of product in TakePOS
NEW: payment full amount detail tooltip
NEW: Payment: Can edit both the Test and Live stripe customer account on payment
NEW: possibility to deselect line when create a recurring invoice + missing to use fk_parent_line
NEW: Projects: List - use select2 multiselect for status
NEW: Projects: massactions to delete projects
NEW: Propagate invoice extrafields into template invoice (#26529)
NEW: remove include_subwarehouse form llx_inventory database table
NEW: resource improvements - data structure (#26285)
Expand All @@ -173,11 +169,13 @@ NEW: show VAT free amount on payment input close #26208 (#26209)
NEW: start and end date for due date filter on invoice list
NEW: Sub total in list (#26165)
NEW: Support html content for combo list of email recipient
NEW: Website: Support of js into the Dolibarr server preview
NEW: TakePOS: add constant to check qty asked is available (#24820)
NEW: TakePOS: add constant to choose contact instead of customer (#24807)
NEW: TakePOS: amount label with or without tax in free product (#24829)
NEW: TakePOS: compatibility with lots and serials (#26426)
NEW: TakePOS: use default customer, category and product when enable TakePOS (#25031)
NEW: Tickets: add and list external contributors on ticket public interface
NEW: Third-Parties: add total line to third-parties list (#26148)
NEW: Tooltips are using ajax by default
NEW: Top menu support picto of modules that are font awesome picto.
NEW: updating by adding massactions for delete projects in societe tab
Expand All @@ -187,6 +185,7 @@ NEW: updating for display Help title when try to delete Don (issue #25314)
NEW: Upgrade in module builder in menu section
NEW: use account address in sepa mandate (#23642)
NEW: VAT rate - Add entity
NEW: Website: Support of js into the Dolibarr server preview
NEW: When an user unset the batch management of products, transformation of each batch stock movement in global stock movement
NEW: PDF Generation for each Human Resource Evaluations.

Expand Down
9 changes: 8 additions & 1 deletion htdocs/adherents/class/adherent.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,17 @@ class Adherent extends CommonObject
public $fullname;

/**
* @var string The civility code, not an integer
* @var string
* @deprecated
* @see $civility_code
*/
public $civility_id;

/**
* @var string The civility code, not an integer (ex: 'MR', 'MME', 'MLE', etc.)
*/
public $civility_code;

public $civility;

/**
Expand Down
26 changes: 5 additions & 21 deletions htdocs/adherents/class/adherent_type.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,6 @@ class AdherentType extends CommonObject
/** @var array Array of members */
public $members = array();

/** @var string string other */
public $other = '';

/**
* @var string description
*/
Expand Down Expand Up @@ -199,7 +196,7 @@ public function getMultiLangs()
*/
public function setMultiLangs($user)
{
global $conf, $langs;
global $langs;

$langs_available = $langs->get_available_languages(DOL_DOCUMENT_ROOT, 0, 2);
$current_lang = $langs->getDefaultLang();
Expand Down Expand Up @@ -316,7 +313,7 @@ public function delMultiLangs($langtodelete, $user)
*/
public function create($user, $notrigger = 0)
{
global $langs, $conf;
global $conf;

$error = 0;

Expand Down Expand Up @@ -379,7 +376,7 @@ public function create($user, $notrigger = 0)
*/
public function update($user, $notrigger = 0)
{
global $langs, $conf, $hookmanager;
global $langs;

$error = 0;

Expand Down Expand Up @@ -417,8 +414,6 @@ public function update($user, $notrigger = 0)
}
}

$action = 'update';

// Actions on extra fields
if (!$error) {
$result = $this->insertExtraFields();
Expand Down Expand Up @@ -492,8 +487,6 @@ public function delete($user)
*/
public function fetch($rowid)
{
global $langs, $conf;

$sql = "SELECT d.rowid, d.libelle as label, d.morphy, d.statut as status, d.duration, d.subscription, d.amount, d.caneditamount, d.mail_valid, d.note as note_public, d.vote";
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d";
$sql .= " WHERE d.rowid = ".(int) $rowid;
Expand Down Expand Up @@ -547,7 +540,7 @@ public function fetch($rowid)
public function liste_array($status = -1)
{
// phpcs:enable
global $conf, $langs;
global $langs;

$adherenttypes = array();

Expand Down Expand Up @@ -585,8 +578,6 @@ public function liste_array($status = -1)
*/
public function amountByType($status = null)
{
global $conf, $langs;

$amountbytype = array();

$sql = "SELECT rowid, amount";
Expand Down Expand Up @@ -627,8 +618,6 @@ public function amountByType($status = null)
*/
public function listMembersForMemberType($excludefilter = '', $mode = 0)
{
global $conf, $user;

$ret = array();

$sql = "SELECT a.rowid";
Expand Down Expand Up @@ -696,7 +685,7 @@ public function getmorphylib($morphy = '')
*/
public function getTooltipContentArray($params)
{
global $conf, $langs, $user;
global $langs;

$langs->load('members');

Expand Down Expand Up @@ -734,8 +723,6 @@ public function getTooltipContentArray($params)
*/
public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $morecss = '', $save_lastsearch_value = -1)
{
global $langs;

$result = '';
$option = '';

Expand Down Expand Up @@ -838,7 +825,6 @@ public function LibStatut($status, $mode = 0)
public function _load_ldap_dn($info, $mode = 0)
{
// phpcs:enable
global $conf;
$dn = '';
if ($mode == 0) {
$dn = getDolGlobalString('LDAP_KEY_MEMBERS_TYPES') . "=".$info[getDolGlobalString('LDAP_KEY_MEMBERS_TYPES')]."," . getDolGlobalString('LDAP_MEMBER_TYPE_DN');
Expand All @@ -863,8 +849,6 @@ public function _load_ldap_dn($info, $mode = 0)
public function _load_ldap_info()
{
// phpcs:enable
global $conf, $langs;

$info = array();

// Object classes
Expand Down
Loading

0 comments on commit e3844b4

Please sign in to comment.