dolibarr/htdocs/core/modules
Frédéric FRANCE 1cafc092df
pdf logo header mutualization (#39503)
* FIX: Restore PHPUnit 11 compatibility in CommonClassTest

onNotSuccessfulTest() overrode PHPUnit\Framework\TestCase's method with
an incompatible return type (void vs never), and the assertMatchesRegularExpression
back-compat shim for PHPUnit <8 now illegally overrides that method, which
PHPUnit 11 declares final. Both faults made every test extending
CommonClassTest fatal immediately on this environment's PHPUnit 11.5.55.
Pre-existing breakage, unrelated to the PDF mutualization work in this
branch — fixed here because Task 1's plan requires a passing
BuildDocTest.php baseline before any implementer is dispatched.

* NEW: Mutualize PDF header logo block into pdf_writeLogoOrCompanyName() (sponge, einstein, azur, muscadet)

* NEW: Mutualize PDF header logo block into pdf_writeLogoOrCompanyName() (cornas, standard, cyan, octopus, strato)

* FIX: Resolve $logodir before calling pdf_writeLogoOrCompanyName() in cornas, standard, cyan, octopus, strato

* NEW: Mutualize PDF header logo block into pdf_writeLogoOrCompanyName() (eratosthene, eagle_proforma, standard_asset)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* NEW: Mutualize PDF header logo block into pdf_writeLogoOrCompanyName() (aurore, zenith)

* FIX: Complete PHPUnit 11 compatibility fix in CommonClassTest::onNotSuccessfulTest

The prior compatibility fix (f29129aae43) resolved the two class-load
fatals but left onNotSuccessfulTest() calling getName()/getDataSetAsString(),
neither of which exists on PHPUnit 11's TestCase (renamed to name() and
dataSetAsStringWithData()/dataSetAsString()). The undefined-method error
was silently absorbed by PHPUnit's own exception handling, so every test
failure across the suite still ran and reported correctly, but the
method's entire diagnostic block (log tail, backtrace, DB info dump) never
executed. Verified with a throwaway reproduction test before and after:
the diagnostic ##[group] output was empty before this fix and complete
after it.

Found during the final whole-branch review of the PDF logo-block
mutualization branch; unrelated to that refactor but touches the same
file already modified by the earlier compatibility commit.

* FIX: Drop unneeded by-ref $pdf and rename $ltrdirection to $align in pdf_writeLogoOrCompanyName()

TCPDF objects are handles, so passing $pdf by reference bought nothing
and was inconsistent with every sibling function in this file
(pdf_pagehead, pdf_watermark, pdf_bank, pdf_pagefoot, ...), all of which
take $pdf by value. $ltrdirection was also a misnomer: three of the 14
callers pass the literal 'L' and one passes 'J' (justify) - none of those
is a text direction, it's an alignment. Renaming is call-site-transparent
(all 14 callers use positional arguments).

Found during the final whole-branch review of the PDF logo-block
mutualization branch.

* NEW: Document pdf_writeLogoOrCompanyName() helper in ChangeLog

Per repo convention (CLAUDE.md: "Always update ChangeLog for
significant changes"). Flagged during the final whole-branch review
of the PDF logo-block mutualization branch: a new reusable pdf_lib.php
function is part of the surface third-party PDF document-model modules
build against.

* restore commonclasstest

* fix

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2026-08-19 02:37:18 +02:00
..
accountancy Document metadata anonymisation (followup of PR #38116) (#38120) 2026-05-07 17:52:55 +02:00
action Qual: Fix 'SqlInjection' notices (#39224) 2026-07-20 02:51:54 +02:00
asset pdf logo header mutualization (#39503) 2026-08-19 02:37:18 +02:00
bank FIX|Fix #34947 PDF top margin breaks layout in multiple templates (#35919) 2026-07-20 00:09:32 +02:00
barcode Qual: Fix 'SqlInjection' notices (#39232) 2026-08-01 23:54:52 +02:00
bom Qual: Fix 'SqlInjection' notices (#39231) 2026-07-20 15:28:15 +02:00
cheque Qual: Fix 'SqlInjection' notices (#39231) 2026-07-20 15:28:15 +02:00
commande pdf logo header mutualization (#39503) 2026-08-19 02:37:18 +02:00
contract pdf logo header mutualization (#39503) 2026-08-19 02:37:18 +02:00
delivery Qual: Fix 'SqlInjection' notices (#39231) 2026-07-20 15:28:15 +02:00
dons Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into 24.0 2026-08-14 15:54:52 +02:00
expedition Qual: Fix 'SqlInjection' notices (#39231) 2026-07-20 15:28:15 +02:00
expensereport Fix: Update type hints in PDF modules (#39226) 2026-07-24 04:13:07 +02:00
export Automated merge from 23.0 to develop 2026-07-15 02:06:09 +02:00
facture pdf logo header mutualization (#39503) 2026-08-19 02:37:18 +02:00
fichinter Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
holiday fix CI in v23 (#39439) 2026-08-11 02:13:43 +02:00
hrm Fix: Update type hints in PDF modules (#39226) 2026-07-24 04:13:07 +02:00
import Qual: Remove SQL injection suppressions from Phan baseline (#39450) 2026-08-11 02:21:54 +02:00
mailings Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
member Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
movement Document metadata anonymisation (followup of PR #38116) (#38120) 2026-05-07 17:52:55 +02:00
mrp Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
oauth Fix redirect after oauth 2026-05-30 01:44:23 +02:00
openid_connect NEW: Add OIDC user auto-creation and fix login bugs (#37314) 2026-02-28 15:37:48 +01:00
payment Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
printing Merge 2026-06-12 19:25:23 +02:00
printsheet Document metadata anonymisation (followup of PR #38116) (#38120) 2026-05-07 17:52:55 +02:00
product pdf logo header mutualization (#39503) 2026-08-19 02:37:18 +02:00
product_batch Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
project Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
propale pdf logo header mutualization (#39503) 2026-08-19 02:37:18 +02:00
rapport Qual: Fix 'SqlInjection' notices (#39225) 2026-07-20 02:52:07 +02:00
reception Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
salaries Qual: Fix phan notices (#37837) 2026-04-13 12:50:23 +02:00
security NEW: #0 Resolve password generator/validator classes via modules_parts['models'] (#39486) 2026-08-14 16:19:48 +02:00
societe Qual: Fix 'SqlInjection' notices (#39232) 2026-08-01 23:54:52 +02:00
stock FIX|Fix #34947 PDF top margin breaks layout in multiple templates (#35919) 2026-07-20 00:09:32 +02:00
stocktransfer pdf logo header mutualization (#39503) 2026-08-19 02:37:18 +02:00
supplier_invoice Clean code 2026-08-07 14:26:51 +02:00
supplier_order pdf logo header mutualization (#39503) 2026-08-19 02:37:18 +02:00
supplier_payment Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
supplier_proposal pdf logo header mutualization (#39503) 2026-08-19 02:37:18 +02:00
syslog Qual: Fix phan notices (#39354) 2026-08-04 16:40:20 +02:00
takepos Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
ticket Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
user
usergroup Qual: Fix PHPStan messages (#38053) 2026-05-07 14:20:03 +02:00
workstation Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
DolibarrModules.class.php Qual: Remove unnecessary quotes around integer values in SQL queries (#39290) 2026-07-27 12:59:14 +02:00
modAccounting.class.php Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-07-18 16:17:03 +02:00
modAdherent.class.php Qual: Fix 'SqlInjection' notices (#39222) 2026-07-20 02:51:25 +02:00
modAgenda.class.php Qual: Fix 'SqlInjection' notices (#39220) 2026-07-20 02:51:00 +02:00
modAi.class.php New: granular right for AI Assistant usage (#38312) 2026-06-11 09:33:14 +02:00
modApi.class.php Fix editing api key must follow same permissions than editing password. 2026-08-07 18:41:23 +02:00
modAsset.class.php Move module asset to stable (#36983) 2026-01-25 14:13:09 +01:00
modBanque.class.php NEW - Various payments - Add extrafield (#38260) 2026-05-18 03:27:35 +02:00
modBarcode.class.php Debug v23 2025-11-27 00:05:04 +01:00
modBlockedLog.class.php Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into develop 2026-07-18 16:17:03 +02:00
modBom.class.php Qual: Fix 'SqlInjection' notices (#39228) 2026-07-20 15:26:30 +02:00
modBookCal.class.php Clean coe 2026-03-30 11:38:39 +02:00
modBookmark.class.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
modCategorie.class.php Automated merge from 23.0 to develop 2026-07-15 02:06:09 +02:00
modClickToDial.class.php Fix with php-cs-fixer 2023-12-04 12:07:31 +01:00
modCollab.class.php Debug v23 2025-11-12 16:02:03 +01:00
modCommande.class.php Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
modComptabilite.class.php Clean code by using the ACCOUNTING_MODE var for both modules 2025-04-03 16:41:41 +02:00
modContrat.class.php Remove deprecated columns price_ht and remise from llx_contratdet (#33616) 2025-03-29 17:25:00 +01:00
modCron.class.php
modDataPolicy.class.php clean code and fix phpstan (#37831) 2026-04-12 11:59:56 +02:00
modDav.class.php clean code (#38826) 2026-06-15 14:57:01 +02:00
modDebugBar.class.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
modDocumentGeneration.class.php Fix with php-cs-fixer 2023-12-04 12:07:31 +01:00
modDon.class.php fix phpstan 2025-01-07 18:54:08 +01:00
modDynamicPrices.class.php Qual: Update comments from French to English (#37097) 2026-02-08 15:29:53 +01:00
modECM.class.php clean code (#35545) 2025-09-29 20:41:32 +02:00
modEmailCollector.class.php Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
modEventOrganization.class.php Qual: Fix 'SqlInjection' notices (#39224) 2026-07-20 02:51:54 +02:00
modExpedition.class.php Qual: Fix 'SqlInjection' notices (#39232) 2026-08-01 23:54:52 +02:00
modExpenseReport.class.php fix CI in v23 (#39439) 2026-08-11 02:13:43 +02:00
modExport.class.php Fix with php-cs-fixer 2023-12-04 12:07:31 +01:00
modExternalRss.class.php Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
modFacture.class.php fix CI in v23 (#39439) 2026-08-11 02:13:43 +02:00
modFckeditor.class.php Update codespell-dict.txt (#29644) 2024-05-10 12:34:08 +02:00
modFicheinter.class.php fix CI in v23 (#39439) 2026-08-11 02:13:43 +02:00
modFournisseur.class.php fix CI in v23 (#39439) 2026-08-11 02:13:43 +02:00
modFTP.class.php clean code and fix phpstan (#37831) 2026-04-12 11:59:56 +02:00
modGeoIPMaxmind.class.php Fix picto of modules 2025-11-02 14:26:46 +01:00
modGravatar.class.php Fix picto of modules 2025-11-02 14:26:46 +01:00
modHoliday.class.php fix CI in v23 (#39439) 2026-08-11 02:13:43 +02:00
modHRM.class.php Clean coe 2026-03-30 11:38:39 +02:00
modImport.class.php NEW The upgrade process can be done by creating a file upgrade.unlock 2023-02-02 12:58:12 +01:00
modIncoterm.class.php Qual: Fix spelling (#31515) 2024-10-23 20:23:07 +02:00
modIntracommreport.class.php Clean permissions 2025-11-12 12:55:21 +01:00
modKnowledgeManagement.class.php Qual: Fix 'SqlInjection' notices (#39228) 2026-07-20 15:26:30 +02:00
modLabel.class.php Qual: Spelling htdocs/core (#27491) 2024-01-13 19:48:20 +01:00
modLdap.class.php clean code and fix phpstan (#37831) 2026-04-12 11:59:56 +02:00
modLoan.class.php clean code and fix phpstan (#37831) 2026-04-12 11:59:56 +02:00
modMailing.class.php fix CI in v23 (#39439) 2026-08-11 02:13:43 +02:00
modMailmanSpip.class.php Fix bad property 2024-05-17 12:39:25 +02:00
modMargin.class.php Look and feel v24 - Open margin en account summary of thirdparty in 2026-03-14 17:56:40 +01:00
modModuleBuilder.class.php Debug AI module 2024-01-27 02:04:43 +01:00
modMrp.class.php Qual: Fix 'SqlInjection' notices (#39228) 2026-07-20 15:26:30 +02:00
modMultiCurrency.class.php Clean code 2025-11-18 12:03:23 +01:00
modNotification.class.php Fix with php-cs-fixer 2023-12-04 12:07:31 +01:00
modOauth.class.php Qual: Translate French comments to English ("niveau") (#37041) 2026-01-31 20:28:26 +01:00
modOpenSurvey.class.php Debug v22 2025-05-05 17:09:24 +02:00
modPartnership.class.php Qual: Fix 'SqlInjection' notices (#39232) 2026-08-01 23:54:52 +02:00
modPaymentByBankTransfer.class.php Automated merge from 23.0 to develop 2026-07-15 02:06:09 +02:00
modPaypal.class.php Fix ci 2026-01-24 12:43:14 +01:00
modPrelevement.class.php fix CI in v23 (#39439) 2026-08-11 02:13:43 +02:00
modPrinting.class.php Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into 2026-03-20 16:43:40 +01:00
modProduct.class.php Qual: Fix 'SqlInjection' notices (#39219) 2026-07-20 02:50:44 +02:00
modProductBatch.class.php avoid fatal errors (#37856) 2026-04-14 02:55:19 +02:00
modProjet.class.php Qual: Fix 'SqlInjection' notices (#39219) 2026-07-20 02:50:44 +02:00
modPropale.class.php fix CI in v23 (#39439) 2026-08-11 02:13:43 +02:00
modQuickMemo.class.php Doc 2026-06-19 15:04:58 +02:00
modReceiptPrinter.class.php Qual: Translate French comments to English ("niveau") (#37041) 2026-01-31 20:28:26 +01:00
modReception.class.php Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into 24.0 2026-08-13 17:16:49 +02:00
modRecruitment.class.php Qual: Fix 'SqlInjection' notices (#39232) 2026-08-01 23:54:52 +02:00
modResource.class.php Qual: Fix 'SqlInjection' notices (#39228) 2026-07-20 15:26:30 +02:00
modSalaries.class.php fix phpstan (#37823) 2026-04-11 17:40:53 +02:00
modService.class.php Qual: Fix 'SqlInjection' notices (#39230) 2026-07-20 15:28:26 +02:00
modSocialNetworks.class.php Fix tabs must appears only on setup of module 2024-08-13 23:34:21 +02:00
modSociete.class.php fix CI in v23 (#39439) 2026-08-11 02:13:43 +02:00
modStock.class.php fix CI in v23 (#39439) 2026-08-11 02:13:43 +02:00
modStockTransfer.class.php Qual: Fix PHPStan notices (#37967) 2026-04-23 14:57:54 +02:00
modStripe.class.php Fix CI 2025-12-07 16:34:33 +01:00
modSubtotals.class.php FIX install crash when loading subtotals module (#38244) 2026-05-18 03:03:11 +02:00
modSupplierInvoice.class.php Qual: Fix 'SqlInjection' notices (#39224) 2026-07-20 02:51:54 +02:00
modSupplierOrder.class.php Qual: Fix 'SqlInjection' notices (#39222) 2026-07-20 02:51:25 +02:00
modSupplierProposal.class.php Merge branch '23.0' of git@github.com:Dolibarr/dolibarr.git into 24.0 2026-08-13 17:16:49 +02:00
modSyslog.class.php Fix with php-cs-fixer 2023-12-04 12:07:31 +01:00
modTakePos.class.php Doc 2026-06-06 00:52:09 +02:00
modTax.class.php clean code and fix phpstan (#37831) 2026-04-12 11:59:56 +02:00
modTicket.class.php Fix option to show statistics pages in menu. 2026-07-09 23:37:45 +02:00
modUser.class.php Qual: Fix 'SqlInjection' notices (#39228) 2026-07-20 15:26:30 +02:00
modVariants.class.php translate french doc to english (#37064) 2026-02-04 14:49:13 +01:00
modWebhook.class.php Clean coe 2026-03-30 11:38:39 +02:00
modWebPortal.class.php Debug v23 2025-11-12 15:03:31 +01:00
modWebServices.class.php Fix with php-cs-fixer 2023-12-04 12:07:31 +01:00
modWebsite.class.php
modWorkflow.class.php Debug v23 2025-12-06 03:27:49 +01:00
modWorkstation.class.php Qual: Fix 'SqlInjection' notices (#39232) 2026-08-01 23:54:52 +02:00
modZapier.class.php Clean coe 2026-03-30 11:38:39 +02:00