Skip to content

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

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

Merged
merged 1 commit into from
Dec 4, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
Expand All @@ -10,6 +11,9 @@ trim_trailing_whitespace = true
[*.json]
indent_size = 2

[*.md]
indent_size = 2

[*.{yaml,yml}]
indent_size = 2

Expand Down
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs.dist export-ignore
/.php-cs-fixer.php export-ignore
/.yamllint.yaml export-ignore
/Makefile export-ignore
/phive.xml export-ignore
/phpunit.xml export-ignore
/psalm.xml export-ignore
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
* @localheinz
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

* @ergebnis-bot @localheinz
20 changes: 10 additions & 10 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Expand Down
39 changes: 26 additions & 13 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,70 @@
# CONTRIBUTING
# Contributing

We are using [GitHub Actions](https://github.com/features/actions) as a continuous integration system.
We use [GitHub Actions](https://github.com/features/actions) as a continuous integration system.

For details, take a look at the following workflow configuration files:

- [`workflows/integrate.yaml`](workflows/integrate.yaml)
- [`workflows/merge.yaml`](workflows/merge.yaml)
- [`workflows/release.yaml`](workflows/release.yaml)
- [`workflows/triage.yaml`](workflows/triage.yaml)

## Backward-Compatibility Analysis

We use [`roave/backward-compatibility-check`](https://github.com/Roave/BackwardCompatibilityCheck) to prevent breaking backwards-compatibility.

Run

```sh
make backward-compatibility-analysis
```

to run a backward-compatibility analysis.

## Coding Standards

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

We are using [`yamllint`](https://github.com/adrienverge/yamllint) to enforce coding standards in YAML files.
We use [`yamllint`](https://github.com/adrienverge/yamllint) to enforce coding standards in YAML files.

If you do not have `yamllint` installed yet, run

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

to install `yamllint`.

We are using [`friendsofphp/php-cs-fixer`](https://github.com/FriendsOfPHP/PHP-CS-Fixer) to enforce coding standards in PHP files.
We use [`friendsofphp/php-cs-fixer`](https://github.com/FriendsOfPHP/PHP-CS-Fixer) to enforce coding standards in PHP files.

Run

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

to automatically fix coding standard violations.

## Static Code Analysis

We are using [`vimeo/psalm`](https://github.com/vimeo/psalm) to statically analyze the code.
We use [`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.

## Tests

We are using [`phpunit/phpunit`](https://github.com/sebastianbergmann/phpunit) to drive the development.
We use [`phpunit/phpunit`](https://github.com/sebastianbergmann/phpunit) to drive the development.

Run

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

to run all the tests.
Expand All @@ -61,7 +74,7 @@ to run all the tests.
Run

```sh
$ make
make
```

to enforce coding standards, run a static code analysis, and run tests!
Expand All @@ -71,7 +84,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.
5 changes: 5 additions & 0 deletions .github/FUNDING.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository

github:
- "ergebnis"
- "localheinz"
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#### Expected Result

*
-

#### Actual Result

*
-
5 changes: 2 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
This PR
This pull request

* [x]
* [ ]
- [x]

Follows #.
Related to #.
Expand Down
17 changes: 17 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Security Policy

## Supported Versions

The following versions of `localheinz/diff` have active support:

- `^1.1.0`

## Unsupported Versions

The following versions of `localheinz/diff` have reached their end of life:

- `<1.1.0`

## Reporting a Vulnerability

If you believe that you have found a security vulnerability, please send an email to `am@localheinz.com`. Ensure to include all details required to understand the severity of the issue.
32 changes: 32 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2

updates:
- allow:
- dependency-type: "development"
commit-message:
include: "scope"
prefix: "composer"
directory: "/"
ignore:
- dependency-name: "phpunit/phpunit"
- dependency-name: "symfony/process"
labels:
- "dependency"
open-pull-requests-limit: 10
package-ecosystem: "composer"
schedule:
interval: "weekly"
versioning-strategy: "increase"

- commit-message:
include: "scope"
prefix: "github-actions"
directory: "/"
labels:
- "dependency"
open-pull-requests-limit: 10
package-ecosystem: "github-actions"
schedule:
interval: "weekly"
15 changes: 0 additions & 15 deletions .github/dependabot.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes

changelog:
exclude:
authors:
- "dependabot"
48 changes: 25 additions & 23 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://github.com/probot/settings
# https://github.com/repository-settings/app

branches:
- name: "main"
Expand All @@ -13,19 +13,21 @@ branches:
require_code_owner_reviews: true
required_approving_review_count: 1
required_status_checks:
contexts:
- "Code Coverage (7.4, highest)"
- "Coding Standards (7.1)"
- "Tests (7.1, highest)"
- "Tests (7.1, lowest)"
- "Tests (7.2, highest)"
- "Tests (7.2, lowest)"
- "Tests (7.3, highest)"
- "Tests (7.3, lowest)"
- "Tests (7.4, highest)"
- "Tests (7.4, lowest)"
- "Tests (8.0, highest)"
- "Tests (8.0, lowest)"
checks:
- context: "Backward-Compatibility Analysis (7.4, locked)"
- context: "Code Coverage (7.4, locked)"
- context: "Coding Standards (7.4, locked)"
- context: "Static Code Analysis (7.4, locked)"
- context: "Tests (7.1, highest)"
- context: "Tests (7.1, lowest)"
- context: "Tests (7.2, highest)"
- context: "Tests (7.2, lowest)"
- context: "Tests (7.3, highest)"
- context: "Tests (7.3, lowest)"
- context: "Tests (7.4, highest)"
- context: "Tests (7.4, lowest)"
- context: "Tests (8.0, highest)"
- context: "Tests (8.0, lowest)"
strict: false
restrictions: null

Expand All @@ -45,10 +47,6 @@ labels:
color: "0e8a16"
description: ""

- name: "merge"
color: "6f42c1"
description: ""

- name: "question"
color: "cc317c"
description: ""
Expand All @@ -57,10 +55,6 @@ labels:
color: "ee0701"
description: ""

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

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

repository:
Expand All @@ -71,10 +65,18 @@ repository:
default_branch: "main"
delete_branch_on_merge: true
description: ":fork_and_knife: Fork of sebastian/diff for use with ergebnis/composer-normalize."
enable_automated_security_fixes: true
enable_vulnerability_alerts: true
has_discussions: false
has_downloads: true
has_issues: false
has_issues: true
has_pages: false
has_projects: false
has_wiki: false
is_template: false
name: "diff"
private: false

# https://docs.github.com/en/rest/reference/repos#replace-all-repository-topics

topics: "php, diff"
Loading
Loading