Commit graph

18 commits

Author SHA1 Message Date
Frédéric FRANCE
0b974869ba
Add opensurveysondage phpunit test (#39522)
* FIX pre-commit PHPStan hook errors on commits with no file in scope

phpstan.neon.dist only analyzes htdocs/ and scripts/, but the
pre-commit wrapper passed every staged file straight to phpstan
regardless of path. A commit touching only files outside that scope
(e.g. test/phpunit/) made phpstan exit with "No files found to
analyse", failing the hook for reasons unrelated to the change being
committed. Filter to htdocs/ and scripts/ first, and skip cleanly
when nothing remains.

* NEW: Add phpunit test for Opensurveysondage class

Add a CRUD test (create/fetch/update/delete) for the Opensurveysondage
class, which had no test coverage yet.

Note: create()'s return value is not used to identify the created
record - Opensurveysondage::create() returns $this->id, but this
class never sets $this->id (the real primary key is the caller-
supplied $this->id_sondage string), so the return value carries no
information. The test uses errors/re-fetch to check success instead.

* NEW: Auto-activate module opensurvey in OpensurveysondageTest if needed

Activate module opensurvey in setUpBeforeClass() when it is not
already enabled, so the test does not depend on the environment's
module configuration.

Note: this activation is real and persists after the test run - it
is not undone by the transaction rollback in tearDownAfterClass().
Activating a module re-runs its SQL install scripts (CREATE/ALTER
TABLE), which causes an implicit commit in MySQL/InnoDB, same as an
admin enabling it from Setup > Modules would do.
2026-08-14 14:57:48 +02:00
Laurent Destailleur
a38192682c CI 2026-05-22 12:17:17 +02:00
MDW
23e2541e55
Qual: Fix PHPStan neon files indentation (#38337) 2026-05-22 08:13:17 +02:00
MDW
24bba6caa9
Qual: Fix PHPStan for ldap, pgsql, odtphp (#38246)
# Qual: Fix PHPStan for ldap, pgsql, odtphp

- Adjust typing in ldap and pgsql class to fix PHPStan notices;
- Exclude all files for odtphp from analysis (external lib);
- Update PHPStan baseline.
2026-05-18 03:01:50 +02:00
Laurent Destailleur
d6db92d323 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2026-04-27 14:43:34 +02:00
Laurent Destailleur
8aa00a8908 Clean code. Add comment on fields. Use the correct rounding param. 2026-04-27 14:13:45 +02:00
Laurent Destailleur
448bd21195 Fix phpstan 2026-02-10 16:09:20 +01:00
Laurent Destailleur
0ccc9c2802 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2026-01-28 16:23:07 +01:00
Laurent Destailleur
d2eee5491c Fix phpstan 2025-12-28 03:12:44 +01:00
Frédéric FRANCE
e33376d10e
align config files 2025-12-20 09:30:54 +01:00
ldestailleur
f5ae12fb4d Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-22 15:31:37 +02:00
ldestailleur
b9a2c81bfe Removed useless exclude 2025-08-22 15:31:11 +02:00
ldestailleur
0f69530cb4 Fix phpstan rules 2025-08-10 03:52:56 +02:00
ldestailleur
aa0e5c57a0 Fix CI 2025-08-10 03:49:12 +02:00
ldestailleur
7cbe50d926 More complete phpstan rule 2025-08-10 03:35:30 +02:00
ldestailleur
60a16da101 Set mx nb of process for phpstan apstats 2025-04-02 22:46:15 +02:00
ldestailleur
2020e902e0 Fix php conf file 2025-04-02 22:31:27 +02:00
Laurent Destailleur (aka Eldy)
c06a474651 Rename and move conf file 2024-11-28 11:54:55 +01:00