generated from ergebnis/php-package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from ergebnis/feature/synchronize
Enhancement: Synchronize with `ergebnis/php-package-template`
- Loading branch information
Showing
12 changed files
with
188 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
# CONTRIBUTING | ||
|
||
We are using [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/renew.yaml`](workflows/renew.yaml) | ||
- [`workflows/triage.yaml`](workflows/triage.yaml) | ||
|
||
## Coding Standards | ||
|
||
We are using [`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. | ||
|
||
If you do not have `yamllint` installed yet, run | ||
|
||
```sh | ||
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. | ||
|
||
Run | ||
|
||
```sh | ||
make coding-standards | ||
``` | ||
|
||
to automatically fix coding standard violations. | ||
|
||
## Dependency Analysis | ||
|
||
We are using [`maglnet/composer-require-checker`](https://github.com/maglnet/ComposerRequireChecker) to prevent the use of unknown symbols in production code. | ||
|
||
Run | ||
|
||
```sh | ||
make dependency-analysis | ||
``` | ||
|
||
to run a dependency analysis. | ||
|
||
## 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. | ||
|
||
## 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 [`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 | ||
``` | ||
|
||
to run a static code analysis. | ||
|
||
We are also using the baseline features of [`phpstan/phpstan`](https://phpstan.org/user-guide/baseline) and [`vimeo/psalm`](https://psalm.dev/docs/running_psalm/dealing_with_code_issues/#using-a-baseline-file). | ||
|
||
Run | ||
|
||
```sh | ||
make static-code-analysis-baseline | ||
``` | ||
|
||
to regenerate the baselines in [`../phpstan-baseline.neon`](../phpstan-baseline.neon) and [`../psalm-baseline.xml`](../psalm-baseline.xml). | ||
|
||
:exclamation: Ideally, the baselines should shrink over time. | ||
|
||
## Tests | ||
|
||
We are using [`phpunit/phpunit`](https://github.com/sebastianbergmann/phpunit) to drive the development. | ||
|
||
Run | ||
|
||
```sh | ||
make tests | ||
``` | ||
|
||
to run all the tests. | ||
|
||
## Extra lazy? | ||
|
||
Run | ||
|
||
```sh | ||
make | ||
``` | ||
|
||
to automatically refactor code, enforce coding standards, run a static code analysis, and run tests! | ||
|
||
## Help | ||
|
||
:bulb: Run | ||
|
||
```sh | ||
make help | ||
``` | ||
|
||
to display a list of available targets with corresponding descriptions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ jobs: | |
|
||
runs-on: "ubuntu-latest" | ||
|
||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: "Create release" | ||
uses: "ergebnis/.github/actions/github/release/[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,8 @@ jobs: | |
|
||
runs-on: "ubuntu-latest" | ||
|
||
timeout-minutes: 5 | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,8 @@ jobs: | |
|
||
runs-on: "ubuntu-latest" | ||
|
||
timeout-minutes: 5 | ||
|
||
steps: | ||
- name: "Add labels based on branch name" | ||
uses: "ergebnis/.github/actions/github/pull-request/[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phive xmlns="https://phar.io/phive"> | ||
<phar name="composer-require-checker" version="^4.6.0" installed="4.6.0" location="./.phive/composer-require-checker" copy="false"/> | ||
<phar name="composer-require-checker" version="^4.7.0" installed="4.7.0" location="./.phive/composer-require-checker" copy="false"/> | ||
</phive> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,26 +113,36 @@ $json = Json\Json::fromFile(__DIR__ . '/contains-json.json'); // instance of Jso | |
## Changelog | ||
Please have a look at [`CHANGELOG.md`](CHANGELOG.md). | ||
The maintainers of this package record notable changes to this project in a [changelog](CHANGELOG.md). | ||
## Contributing | ||
Please have a look at [`CONTRIBUTING.md`](.github/CONTRIBUTING.md). | ||
The maintainers of this package suggest following the [contribution guide](.github/CONTRIBUTING.md). | ||
## Code of Conduct | ||
Please have a look at [`CODE_OF_CONDUCT.md`](https://github.com/ergebnis/.github/blob/main/CODE_OF_CONDUCT.md). | ||
The maintainers of this package ask contributors to follow the [code of conduct](https://github.com/ergebnis/.github/blob/main/CODE_OF_CONDUCT.md). | ||
## General Support Policy | ||
The maintainers of this package provide limited support. | ||
You can support the maintenance of this package by [sponsoring @localheinz](https://github.com/sponsors/localheinz) or [requesting an invoice for services related to this package](mailto:[email protected]?subject=ergebnis/json:%20Requesting%20invoice%20for%20services). | ||
## PHP Version Support Policy | ||
This package supports PHP versions with [active support](https://www.php.net/supported-versions.php). | ||
The maintainers of this package add support for a PHP version following its initial release and drop support for a PHP version when it has reached its end of active support. | ||
## Security Policy | ||
Please have a look at [`SECURITY.md`](.github/SECURITY.md). | ||
This package has a [security policy](.github/SECURITY.md). | ||
## License | ||
This package is licensed using the MIT License. | ||
Please have a look at [`LICENSE.md`](LICENSE.md). | ||
This package uses the [MIT license](LICENSE.md). | ||
## Curious what I am up to? | ||
## Social | ||
Follow me on [Twitter](https://twitter.com/intent/follow?screen_name=localheinz)! | ||
Follow [@localheinz](https://twitter.com/intent/follow?screen_name=localheinz) and [@ergebnis](https://twitter.com/intent/follow?screen_name=ergebnis) on Twitter. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters