From 356b6127d348f6f818bf48784866a014fe1f96cf Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 5 Oct 2025 22:33:50 +0200 Subject: [PATCH 1/3] Better check if default_timezone is set --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 31b5e374e..3c9f9c66e 100644 --- a/boot.php +++ b/boot.php @@ -662,7 +662,7 @@ function sys_boot(): bool { @include('.htpreconfig.php'); } - if (array_key_exists('default_timezone', get_defined_vars())) { + if (isset($default_timezone)) { App::$config['system']['timezone'] = $default_timezone; } From ab0e5e3eee5226aa7555a483298a93bf6f3f33e0 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 5 Oct 2025 21:38:16 +0200 Subject: [PATCH 2/3] CI: Add pretest CI step and run PHPStan The idea is to avoid the more expensive phpunit tests if a set of simpler checks fail. These should check the code without actually running it. For now we only run PHPStan, but this may expand in the future. --- .gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 54e111f87..a1681c283 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,5 @@ stages: + - pretest - test - deploy @@ -100,6 +101,12 @@ before_script: paths: - tests/results/ +phpstan: + image: php:8.1 + stage: pretest + script: + - touch .htconfig.php + - vendor/bin/phpstan --memory-limit=512M # PHP8.1 with MySQL 8.0 php8.1_mysql8.0.22: From fc87ef282ea1ab7c4db6cc398156892bac218403 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sun, 5 Oct 2025 22:55:53 +0200 Subject: [PATCH 3/3] CI: Upgrade to postgres 13 Postgres 12 has been EOL for almost a year! --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1681c283..ecac69d7c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -125,11 +125,11 @@ php8.1_mariadb10.6: <<: *job_definition_mysql <<: *artifacts_template -# PHP8.1 with PostgreSQL 12 -php8.1_postgres12: +# PHP8.1 with PostgreSQL 13 +php8.1_postgres13: image: php:8.1 services: - - postgres:12-alpine + - postgres:13-alpine <<: *job_definition_postgres <<: *artifacts_template