diff --git a/.env.example b/.env.example index 11a5547..722f8c1 100644 --- a/.env.example +++ b/.env.example @@ -12,7 +12,7 @@ APP_KEY= MAIL_HOST= MAIL_SMTP_SECURE= -MAIL_PORT= +MAIL_PORT=25 MAIL_USERNAME= MAIL_PASSWORD= diff --git a/CHANGELOG.md b/CHANGELOG.md index 34cbc8f..a960923 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on Keep a Changelog and this project adheres to Semantic Ver ### Changed - The translations in `shared/resources/lang/{en,es}` are split by topic, as the `DemoWeb` and `DemoApi` module templates of quantum/framework 3.1.2 expect: `pages`, `auth`, `account`, `posts`, `comments`, `actions` and `lang`. The texts are unchanged. `common` keeps the keys the framework reads by name: `activate_account`, `reset_password`, `otp`, `pagination` and the field labels the validator reads as `common.`. The email views in `shared/views/email` use the new keys, for example `auth.activate` instead of `common.activate`. A module generated by framework 3.1.2 or newer needs these files; modules generated earlier call the old `common` keys (#216). +- The starter config reads its boolean and integer settings with the framework's `env_bool()` and `env_int()` instead of `env()`, so they hold a real `bool` or `int` instead of the `.env` text: `debug` and `resource_cache` in `shared/config/app.php`, the SMTP `port` in `shared/config/mailer.php` (default `25`) and the Redis `port` in `shared/config/rate_limit.php` (default `6379`). `.env.example` sets `MAIL_PORT=25`, because `env_int()` rejects an empty value. Existing projects keep their config; a project that copies these lines and has an empty `MAIL_PORT` in its `.env` must set it to a number (#212). ## [3.1.1] - 2026-11-03 diff --git a/shared/config/app.php b/shared/config/app.php index 9e2787f..410d7d1 100644 --- a/shared/config/app.php +++ b/shared/config/app.php @@ -45,7 +45,7 @@ * * Enables or disables project debug. */ - 'debug' => env('DEBUG', true), + 'debug' => env_bool('DEBUG', true), /** * --------------------------------------------------------- @@ -54,6 +54,6 @@ * * Enables or disables project resource cache. */ - 'resource_cache' => env('RESOURCE_CACHE', false), + 'resource_cache' => env_bool('RESOURCE_CACHE', false), ]; diff --git a/shared/config/mailer.php b/shared/config/mailer.php index 86f2dc2..d1d662c 100644 --- a/shared/config/mailer.php +++ b/shared/config/mailer.php @@ -21,7 +21,7 @@ 'smtp' => [ 'host' => env('MAIL_HOST'), 'secure' => env('MAIL_SMTP_SECURE'), - 'port' => env('MAIL_PORT'), + 'port' => env_int('MAIL_PORT', 25), 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), ], diff --git a/shared/config/rate_limit.php b/shared/config/rate_limit.php index 5c4774f..1de92c5 100644 --- a/shared/config/rate_limit.php +++ b/shared/config/rate_limit.php @@ -21,7 +21,7 @@ 'redis' => [ 'prefix' => str_replace(' ', '', env('APP_NAME') ?? ''), 'host' => env('REDIS_HOST', '127.0.0.1'), - 'port' => env('REDIS_PORT', 6379), + 'port' => env_int('REDIS_PORT', 6379), 'ttl' => 60, ], ];