Skip to content

Commit

Permalink
Some phpunti related fixer-ups.
Browse files Browse the repository at this point in the history
  • Loading branch information
simesy committed Apr 15, 2024
1 parent 9415878 commit 54cec15
Show file tree
Hide file tree
Showing 8 changed files with 357 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .ddev/commands/host/phpunit
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

ddev composer run phpunit
ddev exec composer run-script phpunit
4 changes: 2 additions & 2 deletions .ddev/commands/host/static
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

ddev composer run phpcs
ddev composer run phpstan
ddev composer run phpcs -- ./web/*/custom
ddev composer run phpstan -- ./web/*/custom
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ code, check out the video below.

You should be able to install locally with [DDEV](https://ddev.com/)
or [Lando](https://lando.dev/). Anhy instructions with `ddev|lando ...` you should modify
to use your preferred. If it only shows `ddev` we are still working on the lando bit.
to use your preferred. If it only shows `ddev` we are waiting the next version of Lando.

## Backend

Expand Down Expand Up @@ -72,6 +72,18 @@ OSX, but note these are optimised for our local cypress experience and if we
can't predict if it will run for you on your machine. Read the code here
`./ddev/commands/host/cypress`.

# Contrib

You can work on contrib modules in this repo. For example if you check out a
contrib module repo, you could run tests on the module.

```
ddev composer run-script phpcs -- ./web/modules/contrib/foo_module
ddev composer run-script phpcbf -- ./web/modules/contrib/foo_module
ddev composer run-script phpstan -- ./web/modules/contrib/foo_module
# phpunit tba
```

## Building from scratch

This site is open source but our production database isn't, so we provide the
Expand Down
11 changes: 7 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"drupal/gin": "^3.0@rc",
"drupal/gin_login": "^2.0",
"drupal/gin_toolbar": "^1.0@rc",
"drupal/group_member_role": "*",
"drupal/honeypot": "^2.1",
"drupal/layout_section_classes": "^1.5",
"drupal/linkit": "^6.1",
Expand All @@ -35,7 +36,8 @@
"drupal/twig_remove_html_comments": "^1.0@beta",
"drupal/webform": "^6.2",
"drush/drush": "^12",
"platformsh/config-reader": "^2.4"
"platformsh/config-reader": "^2.4",
"weitzman/drupal-test-traits": "^2.2"
},
"require-dev": {
"drupal/coder": "^8.3",
Expand Down Expand Up @@ -64,9 +66,10 @@
"sort-packages": true
},
"scripts": {
"phpstan": "vendor/bin/phpstan --memory-limit=256M --no-progress",
"phpcs": "vendor/bin/phpcs --standard=phpcs.xml ./web/*/custom",
"phpcbf": "vendor/bin/phpcbf --standard=phpcs.xml ./web/*/custom"
"phpstan": "vendor/bin/phpstan analyse --memory-limit=256M",
"phpcs": "vendor/bin/phpcs --standard=phpcs.xml",
"phpcbf": "vendor/bin/phpcbf --standard=phpcs.xml",
"phpunit": "vendor/bin/phpunit"
},
"extra": {
"drupal-scaffold": {
Expand Down
Loading

0 comments on commit 54cec15

Please sign in to comment.