Documentation about env var substitution in Bolt config is not correct

Open
#1,211 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
php
Domain
documentation

Research direction

Start with the dynamic-values-for-config-settings section on the linked Bolt 5.0 configuration page and compare its claims with the referenced src/Kernel.php implementation. Confirm which environment-variable behavior exists, then update the documentation so its Twig and configuration examples match the supported functionality.

Written by the indexing model from the issue text.

Description

As far as I can see https://docs.boltcms.io/5.0/configuration/introduction#dynamic-values-for-config-settings suggests non-existing functionality -- I've seen 2 questions about it on slack recently.

I'd suggest at least removing the part that speaks about usage in pages via twig from the docs, and maybe even the whole paragraph.

As far as I can see (by looking at Kernel.php) it might be possible to access a setting defined in config.yml from inside the symfony container using bolt.<your_var_name> if you are using $container->getParamter(), but the use of $config in code or twig is the Bolt config, and that one doesn't support env var substitution.

Dominant language
PHP
Stars
45
Forks
189
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bolt/docs

All issues in bolt/docs

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.