Parsing YAML is hard. Unless we want to add a dependency to a proper YAML parser I think we're better off using INI files. For example with the current YAML implementation, something like the weblog directory in the provided config :
weblog_dir: "/path/to/your/weblog/directory"
would fail because the double quotes are not properly trimmed from the value.
Comments at the end of a line like this would also fail :
author_name: "John Doe" # This is not my actual name
I also refactored the null coalescing operators to null coalescing assignments for better readability, this is available since PHP 7.4 so I think it's safe to use.
Parsing YAML is hard. Unless we want to add a dependency to a proper YAML parser I think we're better off using INI files. For example with the current YAML implementation, something like the weblog directory in the provided config :
would fail because the double quotes are not properly trimmed from the value.
Comments at the end of a line like this would also fail :
I also refactored the null coalescing operators to null coalescing assignments for better readability, this is available since PHP 7.4 so I think it's safe to use.