Skip to content

3.0.0

Latest

Choose a tag to compare

@utopia-php-monorepo utopia-php-monorepo released this 07 Oct 17:02
· 1 commit to main since this release

Breaking changes

Input that 2.x accepted can now fail or parse differently:

  • Typed loader (Config::load)
    • A non-public schema property throws Load, where it used to throw a raw Error.
    • An absent optional key keeps the property's declared default. With no default, a nullable property becomes null. Otherwise Load is thrown, where 2.x left the property uninitialised.
  • Parser\PHP rejects contents that don't start with <?php and throws Parse. Before, any text ahead of the tag was printed.
  • Parser\Dotenv
    • An unquoted # starts a comment only at the start of a value or after whitespace, so pa#ss and https://x.com/a#b stay whole.
    • A leading export is dropped from the key.

The registry (Config::setParam() / getParam(), restored in 2.1.0) is unchanged.

Commits

  • refactor(config): parse without regular expressions
  • test(config): keep the loader fixtures in the shape under test
  • docs(config): make the README examples run and state the schema rules
  • fix(config): read unquoted # and export lines as dotenv does
  • fix(config): refuse PHP config without a leading open tag
  • fix(config): keep the typed loader inside its Load contract

Changes: appwrite/appwrite@config/2.1.0...config/3.0.0