Use mnapoli/silly-php-di which allows for using a dependency injection
container and for separating commands into separate classes and files.o
Refs: OD-20
- Renamed `generate-build-file` to `init` as it's initialising a new
project.
- Renamed `run` to `generate` as it's generating the configuration
files.
Add a data transfer object that stores the source file name, the file
name to generate and an optional path to create for each file to
generate.
As I'm using a `readonly` class for the DTO, this required updating PHP
to 8.2.
nix develop --command php bin/build-configs run
Allow for declaring extra databases that should be created when the
project is first started. This is done by adding an `extra_databases`
key to `database`, containing a list of database names.
```yaml
database:
type: mariadb
version: 10
extra_databases:
- tinhat
- freshcover
```
Some projects don't use a docroot/web/public directory so this needs be
able to be set to `null`. As I can't do this with Twig's `is not
defined` test, I'll need to remove the default `web` value and add it to
the build.yaml file for the appropriate projects.
If I can get this to work in the future, I'll re-add `web` as the
default value as that's the default and most common option.