You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use env_bool() and env_int() in the module template configs #617
Use env_bool() and env_int() in the module template configs, so newly generated modules store real booleans and integers. Depends on #615.
Why
The templates store .env text for settings that are not text: 'two_fa' => env('TWO_FA', true) stores the string 'true' or 'false', and the lifetime and port settings store numeric text.
Files
DemoApi/src/config/auth.php.tpl and DemoWeb/src/config/auth.php.tpl: remember_lifetime becomes env_int('REMEMBER_LIFETIME', 2592000) and two_fa becomes env_bool('TWO_FA', true).
DemoApi/src/config/rate_limit.php.tpl: port becomes env_int('REDIS_PORT', 6379).
The other env() values in the templates are text and stay as they are.
Out of scope
Modules that were already generated; they keep their config.
Breaking changes
None. A generated module needs a framework that has env_bool() and env_int(), which is 3.1.2 or newer.
Acceptance criteria
the three templates use the helpers, and a module generated from each still boots and authenticates in the existing template tests
composer test, composer cs:check, composer phpstan and composer rector:check pass
Activity