Skip to content

Commit

Permalink
Merge pull request #52 from localheinz/feature/normalize
Browse files Browse the repository at this point in the history
Enhancement: Use ergebnis/composer-normalize to normalize composer.json
  • Loading branch information
localheinz committed Jun 18, 2020
2 parents 3eab34f + ff7a391 commit 049bad4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
14 changes: 13 additions & 1 deletion .github/CONTRIBUTING.md
Expand Up @@ -7,6 +7,18 @@ For details, take a look at the following workflow configuration files:
- [`workflows/integrate.yaml`](workflows/integrate.yaml)
- [`workflows/release.yaml`](workflows/release.yaml)

## Coding Standards

We are using [`ergebnis/composer-normalize`](https://github.com/ergebnis/composer-normalize) to normalize `composer.json`.

Run

```
$ make coding-standards
```

to automatically fix coding standard violations.

## Tests

We are using [`phpunit/phpunit`](https://github.com/sebastianbergmann/phpunit) to drive the development.
Expand All @@ -27,7 +39,7 @@ Run
$ make
```

to run tests!
to enforce coding standards and run tests!

## Help

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/integrate.yaml
Expand Up @@ -32,6 +32,11 @@ jobs:
- name: "Validate composer.json and composer.lock"
run: "composer validate --strict"

- name: "Run ergebnis/composer-normalize"
uses: "docker://ergebnis/composer-normalize-action:0.8.0"
with:
args: "--dry-run"

tests:
name: "Tests"

Expand Down
6 changes: 5 additions & 1 deletion Makefile
@@ -1,5 +1,9 @@
.PHONY: it
it: tests ## Runs the tests target
it: coding-standards tests ## Runs the coding-standards and tests target

.PHONY: coding-standards
coding-standards: vendor ## Normalizes composer.json with ergebnis/composer-normalize
docker run --interactive --rm --tty --workdir=/app --volume ${PWD}:/app ergebnis/composer-normalize-action:0.8.0

.PHONY: help
help: ## Displays this list of targets with descriptions
Expand Down
16 changes: 8 additions & 8 deletions composer.json
Expand Up @@ -13,6 +13,14 @@
"require": {
"php": "^5.4 || ^7.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8"
},
"config": {
"platform": {
"php": "5.4.45"
}
},
"autoload": {
"psr-4": {
"Tree\\": "src/"
Expand All @@ -22,13 +30,5 @@
"psr-4": {
"Tree\\Test\\": "tests/"
}
},
"config": {
"platform": {
"php": "5.4.45"
}
},
"require-dev": {
"phpunit/phpunit": "^4.8"
}
}

0 comments on commit 049bad4

Please sign in to comment.