Skip to content

Commit

Permalink
Merge pull request #152 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 committed Jan 26, 2024
2 parents 4de8a74 + eb8353f commit c2dc7b6
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 70 deletions.
4 changes: 1 addition & 3 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 @@ -13,9 +14,6 @@ indent_size = 2
[*.md]
indent_size = 2

[*.neon]
indent_style = tab

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

Expand Down
22 changes: 11 additions & 11 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 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:

Expand All @@ -12,9 +12,9 @@ For details, take a look at the following workflow configuration files:

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

Expand All @@ -24,7 +24,7 @@ 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

Expand All @@ -36,7 +36,7 @@ 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.
We use [`maglnet/composer-require-checker`](https://github.com/maglnet/ComposerRequireChecker) to prevent the use of unknown symbols in production code.

Run

Expand All @@ -48,7 +48,7 @@ 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.
We use [`infection/infection`](https://github.com/infection/infection) to ensure a minimum quality of the tests.

Enable `Xdebug` and run

Expand All @@ -60,7 +60,7 @@ to run mutation tests.

## Refactoring

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

Run

Expand All @@ -72,7 +72,7 @@ to automatically refactor code.

## Security Analysis

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

Run

Expand All @@ -84,7 +84,7 @@ to run a security analysis.

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

Expand All @@ -94,7 +94,7 @@ make static-code-analysis

to run a static code analysis.

We are also using the baseline feature of [`vimeo/psalm`](https://psalm.dev/docs/running_psalm/dealing_with_code_issues/#using-a-baseline-file).
We also use the baseline feature of [`vimeo/psalm`](https://psalm.dev/docs/running_psalm/dealing_with_code_issues/#using-a-baseline-file).

Run

Expand All @@ -108,7 +108,7 @@ to regenerate the baseline in [`../psalm-baseline.xml`](../psalm-baseline.xml).

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

Expand Down
6 changes: 4 additions & 2 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2

updates:
- commit-message:
- allow:
- dependency-type: "all"
commit-message:
include: "scope"
prefix: "composer"
directory: "/"
Expand Down
16 changes: 13 additions & 3 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 @@ -23,7 +23,17 @@ branches:
- context: "Static Code Analysis (8.3, locked)"
- context: "Tests (8.3, locked)"
strict: false
restrictions: null
restrictions:

# https://docs.github.com/en/rest/reference/repos#list-branches--parameters

# Note: User, app, and team restrictions are only available for organization-owned repositories.
# Set to null to disable when using this configuration for a repository on a personal account.

apps: []
teams: []
users:
- "ergebnis-bot"

# https://docs.github.com/en/rest/reference/issues#create-a-label
# https://docs.github.com/en/rest/reference/issues#update-a-label
Expand Down Expand Up @@ -73,4 +83,4 @@ repository:

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

topics: "php, package, template"
topics: "laravel, application, template"
29 changes: 18 additions & 11 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -106,6 +108,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -156,13 +160,10 @@ jobs:
- name: "Run ergebnis/composer-normalize"
run: "composer normalize --ansi --dry-run"

- name: "Create cache directory for laravel/pint"
run: "mkdir -p .build/pint/"

- name: "Cache cache directory for laravel/pint"
uses: "actions/cache@v4.0.0"
with:
path: ".build/pint"
path: ".build/pint/"
key: "php-${{ matrix.php-version }}-pint-${{ github.ref_name }}"
restore-keys: |
php-${{ matrix.php-version }}-pint-main
Expand All @@ -176,6 +177,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -223,13 +226,15 @@ jobs:
trust-gpg-keys: "0x033E5F8D801A2F8D"

- name: "Run maglnet/composer-require-checker"
run: ".phive/composer-require-checker check --config-file=$(pwd)/composer-require-checker.json"
run: ".phive/composer-require-checker check --ansi --config-file=$(pwd)/composer-require-checker.json --verbose"

mutation-tests:
name: "Mutation Tests"

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -313,6 +318,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -353,9 +360,6 @@ jobs:
with:
dependencies: "${{ matrix.dependencies }}"

- name: "Create cache directory for rector/rector"
run: "mkdir -p .build/rector/"

- name: "Cache cache directory for rector/rector"
uses: "actions/cache@v4.0.0"
with:
Expand All @@ -373,6 +377,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -421,6 +427,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -473,9 +481,6 @@ jobs:
- name: "Show application information"
run: "./artisan about --ansi"

- name: "Create cache directory for vimeo/psalm"
run: "mkdir -p .build/psalm/"

- name: "Run vimeo/psalm"
run: "vendor/bin/psalm --config=psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4"

Expand All @@ -484,6 +489,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' &&
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

steps:
- name: "Create release"
uses: "ergebnis/.github/actions/github/release/create@1.9.0"
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/renew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:

runs-on: "ubuntu-latest"

timeout-minutes: 5

strategy:
matrix:
php-version:
Expand Down Expand Up @@ -54,20 +56,17 @@ jobs:
with:
dependencies: "${{ matrix.dependencies }}"

- name: "Create cache directory for friendsofphp/php-cs-fixer"
run: "mkdir -p .build/php-cs-fixer"

- name: "Cache cache directory for friendsofphp/php-cs-fixer"
- name: "Cache cache directory for laravel/pint"
uses: "actions/cache@v4.0.0"
with:
path: ".build/php-cs-fixer"
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ github.ref_name }}"
path: ".build/pint/"
key: "php-${{ matrix.php-version }}-pint-${{ github.ref_name }}"
restore-keys: |
php-${{ matrix.php-version }}-php-cs-fixer-main
php-${{ matrix.php-version }}-php-cs-fixer-
php-${{ matrix.php-version }}-pint-main
php-${{ matrix.php-version }}-pint-
- name: "Run friendsofphp/php-cs-fixer"
run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --verbose"
- name: "Run laravel/pint"
run: "vendor/bin/pint --ansi --config=pint.json -v"

- name: "Commit modified files"
uses: "stefanzweifel/git-auto-commit-action@v5.0.0"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/triage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/add-label-based-on-branch-name@1.9.0"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License (MIT)

Copyright (c) 2023 Andreas Möller
Copyright (c) 2017-2024 Andreas Möller

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the _Software_), to deal in the Software without restriction, including without limitation the
Expand Down

0 comments on commit c2dc7b6

Please sign in to comment.