Skip to content

Commit

Permalink
Enhancement: Synchronize with ergebnis/php-package-template
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed May 2, 2023
1 parent dec8231 commit 0a8b92d
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-file-size
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

* @ergebnis-bot @localheinz
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Run
make
```

to enforce coding standards, run a static code analysis, and run tests!
to automatically refactor code, enforce coding standards, run a static code analysis, and run tests!

## Help

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 `ergebnis/composer-normalize` have active support:

- `^2.30.2`

## Unsupported Versions

The following versions of `ergebnis/composer-normalize` have reached their end of life:

- `<=2.30.2`

## Reporting a Vulnerability

If you believe that you have found a security vulnerability, please send an email to `[email protected]`. Ensure to include all details required to understand the severity of the issue.
1 change: 1 addition & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ repository:
description: ":musical_note: Provides a composer plugin for normalizing composer.json."
enable_automated_security_fixes: true
enable_vulnerability_alerts: true
has_discussions: false
has_downloads: true
has_issues: true
has_pages: false
Expand Down
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ code-coverage: vendor ## Collects coverage from running unit and integration tes
coding-standards: phive vendor ## Lints YAML files with yamllint, normalizes composer.json with ergebnis/composer-normalize, and fixes code style issues with friendsofphp/php-cs-fixer
yamllint -c .yamllint.yaml --strict .
.phive/composer-normalize
mkdir -p .build/php-cs-fixer
mkdir -p .build/php-cs-fixer/
vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --diff --verbose

.PHONY: dependency-analysis
Expand All @@ -25,7 +25,7 @@ help: ## Displays this list of targets with descriptions

.PHONY: mutation-tests
mutation-tests: vendor ## Runs mutation tests with infection/infection
mkdir -p .build/infection
mkdir -p .build/infection/
vendor/bin/infection --configuration=infection.json

.PHONY: phar
Expand All @@ -40,11 +40,12 @@ phar: phive vendor ## Builds a phar with humbug/box

.PHONY: phive
phive: .phive ## Installs dependencies with phive
mkdir -p .build/phive
mkdir -p .build/phive/
PHIVE_HOME=.build/phive phive install --trust-gpg-keys 0xC00543248C87FB13,0x033E5F8D801A2F8D,0x2DF45277AEF09A2F

.PHONY: refactoring
refactoring: vendor ## Runs automated refactoring with rector/rector
mkdir -p .build/rector/
vendor/bin/rector process --config=rector.php

.PHONY: schema
Expand All @@ -58,19 +59,19 @@ security-analysis: vendor ## Runs a security analysis with composer

.PHONY: static-code-analysis
static-code-analysis: vendor ## Runs a static code analysis with vimeo/psalm
mkdir -p .build/psalm
mkdir -p .build/psalm/
vendor/bin/psalm --config=psalm.xml --clear-cache
vendor/bin/psalm --config=psalm.xml --show-info=false --stats --threads=4

.PHONY: static-code-analysis-baseline
static-code-analysis-baseline: vendor ## Generates a baseline for static code analysis with vimeo/psalm
mkdir -p .build/psalm
mkdir -p .build/psalm/
vendor/bin/psalm --config=psalm.xml --clear-cache
vendor/bin/psalm --config=psalm.xml --set-baseline=psalm-baseline.xml

.PHONY: tests
tests: vendor ## Runs unit and integration tests with phpunit/phpunit
mkdir -p .build/phpunit
mkdir -p .build/phpunit/
vendor/bin/phpunit --configuration=test/phpunit.xml --testsuite=unit
vendor/bin/phpunit --configuration=test/phpunit.xml --testsuite=integration

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,10 @@ Please have a look at [`CONTRIBUTING.md`](.github/CONTRIBUTING.md).

Please have a look at [`CODE_OF_CONDUCT.md`](https://github.com/ergebnis/.github/blob/main/CODE_OF_CONDUCT.md).

## Security Policy

Please have a look at [`SECURITY.md`](.github/SECURITY.md).

## License

This package is licensed using the MIT License.
Expand Down
15 changes: 0 additions & 15 deletions composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
{
"symbol-whitelist": [
"array",
"bool",
"callable",
"false",
"float",
"int",
"iterable",
"null",
"object",
"parent",
"self",
"static",
"string",
"true",
"void",
"Composer\\Command\\BaseCommand",
"Composer\\Composer",
"Composer\\Console\\Application",
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"homepage": "https://github.com/ergebnis/composer-normalize",
"support": {
"issues": "https://github.com/ergebnis/composer-normalize/issues",
"source": "https://github.com/ergebnis/composer-normalize"
"source": "https://github.com/ergebnis/composer-normalize",
"security": "https://github.com/ergebnis/composer-normalize/blob/main/.github/SECURITY.md"
},
"require": {
"php": "~8.0.0 || ~8.1.0 || ~8.2.0",
Expand Down

0 comments on commit 0a8b92d

Please sign in to comment.