Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Synchronize with ergebnis/php-package-template #691

Merged
merged 1 commit into from Jan 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Expand Up @@ -10,6 +10,9 @@ trim_trailing_whitespace = true
[*.json]
indent_size = 2

[*.md]
indent_size = 2

[*.neon]
indent_style = tab

Expand Down
4 changes: 4 additions & 0 deletions .gitattributes
Expand Up @@ -5,7 +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 …
@@ -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
54 changes: 45 additions & 9 deletions .github/CONTRIBUTING.md
Expand Up @@ -5,8 +5,8 @@ We are using [GitHub Actions](https://github.com/features/actions) as a continuo
For details, take a look at the following workflow configuration files:

- [`workflows/integrate.yaml`](workflows/integrate.yaml)
- [`workflows/prune.yaml`](workflows/prune.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 +20,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 +30,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,19 +42,43 @@ 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.

## 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.

Run

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

to run a static code analysis.
Expand All @@ -64,7 +88,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 @@ -78,17 +102,29 @@ We are using [`phpunit/phpunit`](https://github.com/sebastianbergmann/phpunit) t
Run

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

to run all the tests.

## Mutation Tests

We are using [`infection/infection`](https://github.com/infection/infection) to ensure a minimum quality of the tests.

Enable `Xdebug` and run

```sh
make mutation-tests
```

to run mutation tests.

## Extra lazy?

Run

```sh
$ make
make
```

to enforce coding standards, run a static code analysis, and run tests!
Expand All @@ -98,7 +134,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.
34 changes: 19 additions & 15 deletions .github/settings.yml
Expand Up @@ -13,21 +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)"
- "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 @@ -79,6 +81,8 @@ repository:
default_branch: "main"
delete_branch_on_merge: true
description: ":notebook: Provides a configuration factory and multiple rule sets for friendsofphp/php-cs-fixer."
enable_automated_security_fixes: true
enable_vulnerability_alerts: true
has_downloads: true
has_issues: true
has_pages: false
Expand Down