Commit graph

136 commits

Author SHA1 Message Date
Oliver Davies 356b97cbde refactor(docker-compose): simplify the build
...stage

Hard-code more of these values as they're the same for all projects.
2023-05-02 22:55:30 +01:00
Oliver Davies 33103417de refactor: use the Config DTO to output the project
...name
2023-04-25 14:56:45 +01:00
Oliver Davies 3e1ced3aff refactor: rename variable 2023-04-25 00:43:50 +01:00
Oliver Davies a294d94449 refactor: rename class 2023-04-25 00:41:45 +01:00
Oliver Davies d19fcbdede refactor: use Illuminate Pipelines 2023-04-25 00:32:26 +01:00
Oliver Davies 830c37c681 fix: add missing managed text 2023-04-24 23:00:25 +01:00
Oliver Davies 2afdf43cd2 feat: add and enable pre-push Git hooks 2023-04-24 22:54:34 +01:00
Oliver Davies c419332bad fix: incorrect directory name 2023-04-24 20:30:34 +01:00
Oliver Davies 2a9d4ca7b4 feat(justfile): add start and stop recipes 2023-04-24 20:26:34 +01:00
Oliver Davies fc87a82688 fix: only add if CI config is generated 2023-04-24 19:41:23 +01:00
Oliver Davies 8db64458b1 refactor(*): change to a Symfony Console app 2023-04-24 01:05:07 +01:00
Oliver Davies 4af661bad4 fix(phpcs): Drupal standard missing if standards
...are empty
2023-04-23 20:47:08 +01:00
Oliver Davies e715496e76 feat(phpstan): include baseline file 2023-04-23 20:15:08 +01:00
Oliver Davies a947001772 fix(phpcs): duplicate Drupal rule 2023-04-23 20:14:04 +01:00
Oliver Davies c6fe47aff2 feat(phpcs): run in CI 2023-04-23 19:19:04 +01:00
Oliver Davies 315890165c fix(phpstan): increase memory limit 2023-04-23 19:18:49 +01:00
Oliver Davies e67a7180a7 feat(phpcs): add rule overrides 2023-04-23 17:37:27 +01:00
Oliver Davies d1be2d631b fix(phpcs): incorrect rule formatting 2023-04-23 17:20:21 +01:00
Oliver Davies 3b0fc2c8a0 fix(phpcs): incorrect rule formatting 2023-04-23 17:16:32 +01:00
Oliver Davies 642b479934 fix(phpstan): correct key 2023-04-21 23:22:17 +01:00
Oliver Davies d9cdc2bac6 fix(phpstan): ignore test files by default 2023-04-21 23:14:56 +01:00
Oliver Davies 82889f1fa9 chore: update managed text 2023-04-21 22:36:31 +01:00
Oliver Davies a6e7e7bf57 refactor: split commands into separate classes
This reverts commit d701f0e2a3.
2023-04-21 22:34:01 +01:00
Oliver Davies d701f0e2a3 refactor: split commands into separate classes
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
2023-04-21 22:24:19 +01:00
Oliver Davies 0165029423 feat: run PHPStan in CI if enabled 2023-04-21 21:30:57 +01:00
Oliver Davies 5ee6810c95 feat: only create PHPStan file if it's set
Only create a `phpstan.neon.dist` file if the `php.phpstan` object is
set within the project's `build.yaml` file.
2023-04-21 12:39:05 +01:00
Oliver Davies 27ce1dc100 chore: rename commands
- Renamed `generate-build-file` to `init` as it's initialising a new
  project.
- Renamed `run` to `generate` as it's generating the configuration
  files.
2023-04-21 11:51:28 +01:00
Oliver Davies 02c8b41194 feat: generate GitHub Actions configuration
Generate a GitHub Actions workflow file if a project is opted-in for
this feature.

Refs: OD-29
2023-04-21 01:39:43 +01:00
Oliver Davies 4bf72b59e3 refactor: extract functions 2023-04-20 22:42:39 +01:00
Oliver Davies ac1e0dc2c8 refactor: add a TemplateFile DTO
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
2023-04-20 22:31:15 +01:00
Oliver Davies bd3e77254b chore: delete unneeded files 2023-04-20 21:25:34 +01:00
Oliver Davies fb63a6c245 feat: opt-in to the new database credentials
Allow for changing the default database name, username and password from
`drupal` to `app` by enabling the
`experimental.useNewDatabaseCredentials` feature flag in a project's
`build.yaml` file.

Refs: OD-27
2023-04-16 21:21:40 +01:00
Oliver Davies bb4f630bd5 refactor: re-order defaults 2023-04-16 20:42:53 +01:00
Oliver Davies 8256fc0a81 fix: PHPStan errors 2023-04-16 20:06:52 +01:00
Oliver Davies 96fba34f4a fix(phpunit): not strict about output during tests 2023-04-12 23:05:29 +01:00
Oliver Davies 53765e6048 fix(phpunit): XML parse error 2023-04-12 22:49:45 +01:00
Oliver Davies 1819fa9a97 refactor(justfile): split onto multiple lines 2023-04-12 22:45:56 +01:00
Oliver Davies 1303656f4a fix(justfile): remove hard-coded service name
Add the service name as a parameter and include it from the `phpunit`
recipe.
2023-04-12 22:36:27 +01:00
Oliver Davies 5c6e25a660 feat(justfile): add phpunit recipe
Add a `phpunit` recipe for running PHPUnit tests, with a `test` alias
that could later be used for running Pest in PHP projects or Jest in a
node project.
2023-04-12 22:21:46 +01:00
Oliver Davies d45d0d6616 refactor(justfile): add a run recipe 2023-04-12 22:20:19 +01:00
Oliver Davies 9657ad693e fix: XML error
> XML declaration allowed only at the start of the document
2023-04-11 00:36:02 +01:00
Oliver Davies e3a93065de fix: drupal.docroot can be null 2023-04-07 20:55:23 +01:00
Oliver Davies a97264d99c feat: validate drupal.docroot
Refs: OD-18
2023-04-07 20:39:34 +01:00
Oliver Davies e30929e69c refactor: serialise and validate a configuration
...data object
2023-04-07 20:03:52 +01:00
Oliver Davies a6ff416012 feat: display a list of generated files
Refs: OD-1
2023-04-07 10:29:41 +01:00
Oliver Davies 4d034d9ba2 feat: allow for adding extra databases
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
```
2023-04-07 08:40:42 +01:00
Oliver Davies 692151d26c fix: Docker Compose YAML error
Implement the fix from
https://github.com/docker/compose/issues/10411#issuecomment-1488019350.

Refs: OD-12
2023-04-07 01:21:07 +01:00
Oliver Davies 410717bb6b feat(fractal): add more justfile recipes
Add `justfile` recipes to build a production version of Fractal and
sync it to an S3 bucket.
2023-04-01 20:27:15 +01:00
Oliver Davies 9cc2f181ee feat: add hadolint configuration 2023-04-01 20:27:15 +01:00
Oliver Davies 31bf4af68d fix: allow for no docroot for Drupal projects
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.
2023-04-01 20:27:15 +01:00