Skip to content

Commit 52a216a

Browse files
authored
dev: php-tuf#398 Add DDEV config and developer documentation (php-tuf#399)
1 parent 8190efc commit 52a216a

4 files changed

Lines changed: 49 additions & 0 deletions

File tree

.ddev/config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
type: php
2+
docroot: ""

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@
2525
*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=4
2626
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=4
2727
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
28+
29+
# Exclude local development tools from packaging.
30+
/.ddev export-ignore

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ fixtures/**/client
22
fixtures/**/server
33

44
/vendor/
5+
/var
56
.idea
67
composer.lock
78
.DS_Store

DEVELOP.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Developing PHP-TUF
2+
==================
3+
4+
This project uses [DDEV](https://ddev.com) to standardize its local development environment. To get started, make sure that you have the [latest release](https://github.com/ddev/ddev/releases) of DDEV [installed](https://ddev.com/get-started/).
5+
6+
## Initial setup
7+
8+
```
9+
ddev start
10+
ddev composer install
11+
```
12+
13+
## Running tests
14+
15+
```
16+
ddev composer fixtures
17+
ddev composer test
18+
```
19+
20+
To run a single test use PHPUnit's `--filter` option:
21+
```
22+
ddev exec phpunit ./tests --debug --filter=testEmptyStructuresAreEncodedAsObjects
23+
```
24+
25+
### Checking code coverage
26+
27+
```
28+
ddev xdebug
29+
ddev composer coverage
30+
```
31+
32+
## Linting and fixing
33+
34+
Linting for syntax, then style:
35+
```
36+
ddev composer lint
37+
ddev composer phpcs
38+
```
39+
40+
Fixing style errors that can be automatically fixed:
41+
```
42+
ddev composer phpcbf
43+
```

0 commit comments

Comments
 (0)