Skip to content

Document the Environment typed readers #153

Open

Description

@armanist

Summary

Document the typed readers of the Environment package once they ship (quantum-php/framework#614, #615, #616).

Why

Values from .env are text, and the docs do not say so. Anyone writing a config file needs to know that env('DEBUG') is the string 'false', and that env_bool() and env_int() exist.

Pages

  • v3.0/packages/environment/contracts.md: the contract of getBool() and getInt(), including the rules and the exception for text that is not a whole number.
  • v3.0/packages/environment/helpers.md: env_bool() and env_int(), next to env().
  • v3.0/packages/environment/usage.md: an example of a config file that converts at the source, using only names that exist in the code.
  • v3.0/packages/environment/architecture.md and overview.md: the new EnvironmentInterface and the traits, when the refactor has shipped.
  • v3.0/upgrade-guide.md: a short note that nothing breaks and that new config files should use the helpers.

Acceptance criteria

  • every name in the examples exists in the released code
  • each fact is stated once at its home page and linked elsewhere
  • internal links and anchors resolve
  • the pull request goes into staging and is published with the next documentation release

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions