Skip to content

Commit

Permalink
Merge pull request #585 from ergebnis/feature/synchronize
Browse files Browse the repository at this point in the history
Enhancement: Synchronize with `ergebnis/php-package-template`
  • Loading branch information
localheinz authored Feb 10, 2023
2 parents cf6228c + e764256 commit 0b52b5f
Show file tree
Hide file tree
Showing 20 changed files with 338 additions and 110 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ trim_trailing_whitespace = true
[*.json]
indent_size = 2

[*.md]
indent_size = 2

[*.neon]
indent_style = tab

Expand Down
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.php export-ignore
/.yamllint.yaml export-ignore
/composer-require-checker.json export-ignore
/composer.lock export-ignore
/infection.json export-ignore
/Makefile export-ignore
/psalm-baseline.xml export-ignore
/psalm.xml export-ignore
/rector.php export-ignore
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-file-size

* @ergebnis-bot @localheinz
45 changes: 34 additions & 11 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ For details, take a look at the following workflow configuration files:

- [`workflows/integrate.yaml`](workflows/integrate.yaml)
- [`workflows/merge.yaml`](workflows/merge.yaml)
- [`workflows/prune.yaml`](workflows/prune.yaml)
- [`workflows/release.yaml`](workflows/release.yaml)
- [`workflows/renew.yaml`](workflows/renew.yaml)
- [`workflows/triage.yaml`](workflows/triage.yaml)
Expand All @@ -20,7 +19,7 @@ We are using [`yamllint`](https://github.com/adrienverge/yamllint) to enforce co
If you do not have `yamllint` installed yet, run

```sh
$ brew install yamllint
brew install yamllint
```

to install `yamllint`.
Expand All @@ -30,7 +29,7 @@ We are using [`friendsofphp/php-cs-fixer`](https://github.com/FriendsOfPHP/PHP-C
Run

```sh
$ make coding-standards
make coding-standards
```

to automatically fix coding standard violations.
Expand All @@ -42,7 +41,7 @@ We are using [`maglnet/composer-require-checker`](https://github.com/maglnet/Com
Run

```sh
$ make dependency-analysis
make dependency-analysis
```

to run a dependency analysis.
Expand All @@ -54,19 +53,43 @@ We are using [`infection/infection`](https://github.com/infection/infection) to
Enable `Xdebug` and run

```sh
$ make mutation-tests
make mutation-tests
```

to run mutation tests.

## Refactoring

We are using [`rector/rector`](https://github.com/rectorphp/rector) to automatically refactor code.

Run

```sh
make refactoring
```

to automatically refactor code.

## Security Analysis

We are using [`composer`](https://github.com/composer/composer) to run a security analysis.

Run

```sh
make security-analysis
```

to run a security analysis.

## Static Code Analysis

We are using [`vimeo/psalm`](https://github.com/vimeo/psalm) to statically analyze the code.
We are using [`phpstan/phpstan`](https://github.com/phpstan/phpstan) and [`vimeo/psalm`](https://github.com/vimeo/psalm) to statically analyze the code.

Run

```sh
$ make static-code-analysis
make static-code-analysis
```

to run a static code analysis.
Expand All @@ -76,7 +99,7 @@ We are also using the baseline feature of [`vimeo/psalm`](https://psalm.dev/docs
Run

```sh
$ make static-code-analysis-baseline
make static-code-analysis-baseline
```

to regenerate the baseline in [`../psalm-baseline.xml`](../psalm-baseline.xml).
Expand All @@ -90,7 +113,7 @@ We are using [`phpunit/phpunit`](https://github.com/sebastianbergmann/phpunit) t
Run

```sh
$ make tests
make tests
```

to run all the tests.
Expand All @@ -100,7 +123,7 @@ to run all the tests.
Run

```sh
$ make
make
```

to enforce coding standards, run a static code analysis, and run tests!
Expand All @@ -110,7 +133,7 @@ to enforce coding standards, run a static code analysis, and run tests!
:bulb: Run

```sh
$ make help
make help
```

to display a list of available targets with corresponding descriptions.
39 changes: 19 additions & 20 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,23 @@ branches:
require_code_owner_reviews: true
required_approving_review_count: 1
required_status_checks:
contexts:
- "Code Coverage (8.0, locked)"
- "Coding Standards (8.0, locked)"
- "Dependency Analysis (8.0, locked)"
- "Mutation Tests (8.0, locked)"
- "Security (8.0, locked)"
- "Static Code Analysis (8.0, locked)"
- "Tests (8.0, highest)"
- "Tests (8.0, locked)"
- "Tests (8.0, lowest)"
- "Tests (8.1, highest)"
- "Tests (8.1, locked)"
- "Tests (8.1, lowest)"
- "Tests (8.2, highest)"
- "Tests (8.2, locked)"
- "Tests (8.2, lowest)"
checks:
- context: "Code Coverage (8.0, locked)"
- context: "Coding Standards (8.0, locked)"
- context: "Dependency Analysis (8.0, locked)"
- context: "Mutation Tests (8.0, locked)"
- context: "Refactoring (8.0, locked)"
- context: "Security Analysis (8.0, locked)"
- context: "Static Code Analysis (8.0, locked)"
- context: "Tests (8.0, highest)"
- context: "Tests (8.0, locked)"
- context: "Tests (8.0, lowest)"
- context: "Tests (8.1, highest)"
- context: "Tests (8.1, locked)"
- context: "Tests (8.1, lowest)"
- context: "Tests (8.2, highest)"
- context: "Tests (8.2, locked)"
- context: "Tests (8.2, lowest)"
strict: false
restrictions:

Expand Down Expand Up @@ -66,10 +67,6 @@ labels:
color: "ee0701"
description: ""

- name: "stale"
color: "eeeeee"
description: ""

# https://docs.github.com/en/rest/reference/repos#update-a-repository

repository:
Expand All @@ -80,6 +77,8 @@ repository:
default_branch: "main"
delete_branch_on_merge: true
description: ":briefcase: Provides an abstraction of an open-source license."
enable_automated_security_fixes: true
enable_vulnerability_alerts: true
has_downloads: true
has_issues: true
has_pages: false
Expand Down
Loading

0 comments on commit 0b52b5f

Please sign in to comment.