Skip to content

Commit

Permalink
Merge pull request #1786 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 Jun 19, 2023
2 parents 8515aaa + dc01a15 commit 69cde68
Show file tree
Hide file tree
Showing 18 changed files with 101 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
@@ -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
Expand Up @@ -140,7 +140,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
5 changes: 5 additions & 0 deletions .github/FUNDING.yaml
@@ -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"
6 changes: 0 additions & 6 deletions .github/FUNDING.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/SECURITY.md
@@ -0,0 +1,17 @@
# Security Policy

## Supported Versions

The following versions of `ergebnis/symfony-application-template` have active support:

- `x.y.z`

## Unsupported Versions

The following versions of `ergebnis/symfony-application-template` have reached their end of life:

- `x.y.z`

## 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.
2 changes: 2 additions & 0 deletions .github/settings.yml
Expand Up @@ -72,11 +72,13 @@ repository:
description: ":octocat: + :musical_score: Provides a GitHub template repository for a Symfony application, using GitHub Actions."
enable_automated_security_fixes: true
enable_vulnerability_alerts: true
has_discussions: false
has_downloads: true
has_issues: true
has_pages: false
has_projects: false
has_wiki: false
is_template: false
name: "symfony-application-template"
private: false

Expand Down
73 changes: 52 additions & 21 deletions .github/workflows/integrate.yaml
Expand Up @@ -24,13 +24,13 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3.3.0"
uses: "actions/checkout@v3.5.3"

- name: "Set up PHP"
uses: "shivammathur/setup-php@2.25.4"
with:
coverage: "xdebug"
extensions: "none, ctype, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
Expand All @@ -39,6 +39,9 @@ jobs:
- name: "Set up problem matchers for phpunit/phpunit"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\""

- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"

- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.8.0"

Expand Down Expand Up @@ -80,7 +83,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3.3.0"
uses: "actions/checkout@v3.5.3"

- name: "Lint YAML files"
uses: "ibiqlik/action-yamllint@v3.1.1"
Expand All @@ -93,7 +96,7 @@ jobs:
uses: "shivammathur/setup-php@2.25.4"
with:
coverage: "none"
extensions: "none, ctype, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
Expand Down Expand Up @@ -124,7 +127,7 @@ jobs:
run: "vendor/bin/config-transformer --ansi --dry-run config"

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

- name: "Cache cache directory for friendsofphp/php-cs-fixer"
uses: "actions/cache@v3.3.1"
Expand All @@ -137,8 +140,6 @@ jobs:
- name: "Run friendsofphp/php-cs-fixer"
run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --dry-run --verbose"
env:
PHP_CS_FIXER_IGNORE_ENV: 1

dependency-analysis:
name: "Dependency Analysis"
Expand All @@ -155,19 +156,22 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3.3.0"
uses: "actions/checkout@v3.5.3"

- name: "Set up PHP"
uses: "shivammathur/setup-php@2.25.4"
with:
coverage: "none"
extensions: "none, ctype, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"
tools: "phive"

- name: "Set up problem matchers for PHP"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""

- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"

- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.8.0"

Expand Down Expand Up @@ -209,18 +213,21 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3.3.0"
uses: "actions/checkout@v3.5.3"

- name: "Set up PHP"
uses: "shivammathur/setup-php@2.25.4"
with:
coverage: "xdebug"
extensions: "none, ctype, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""

- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"

- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.8.0"

Expand Down Expand Up @@ -262,18 +269,21 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3.3.0"
uses: "actions/checkout@v3.5.3"

- name: "Set up PHP"
uses: "shivammathur/setup-php@2.25.4"
with:
coverage: "none"
extensions: "none, ctype, dom, iconv, intl, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, iconv, intl, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""

- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"

- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.8.0"

Expand All @@ -290,7 +300,7 @@ jobs:
dependencies: "${{ matrix.dependencies }}"

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

- name: "Cache cache directory for rector/rector"
uses: "actions/cache@v3.3.1"
Expand Down Expand Up @@ -319,13 +329,13 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3.3.0"
uses: "actions/checkout@v3.5.3"

- name: "Set up PHP"
uses: "shivammathur/setup-php@2.25.4"
with:
coverage: "none"
extensions: "none, ctype, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
Expand All @@ -334,6 +344,21 @@ jobs:
- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"

- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.8.0"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v3.3.1"
with:
path: "${{ env.COMPOSER_CACHE_DIR }}"
key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-"

- name: "Install ${{ matrix.dependencies }} dependencies with composer"
uses: "ergebnis/.github/actions/composer/install@1.8.0"
with:
dependencies: "${{ matrix.dependencies }}"

- name: "Check installed packages for security vulnerability advisories"
run: "composer audit --ansi"

Expand All @@ -355,7 +380,7 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3.3.0"
uses: "actions/checkout@v3.5.3"

- name: "Set up PHP"
uses: "shivammathur/setup-php@2.25.4"
Expand All @@ -367,6 +392,9 @@ jobs:
- name: "Set up problem matchers for PHP"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\""

- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"

- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.8.0"

Expand All @@ -389,7 +417,7 @@ jobs:
run: "bin/console cache:warmup --ansi"

- name: "Create cache directory for vimeo/psalm"
run: "mkdir -p .build/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 @@ -415,7 +443,7 @@ jobs:
uses: "shivammathur/setup-php@2.25.4"
with:
coverage: "none"
extensions: "none, ctype, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Determine composer cache directory"
Expand Down Expand Up @@ -477,13 +505,13 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3.3.0"
uses: "actions/checkout@v3.5.3"

- name: "Set up PHP"
uses: "shivammathur/setup-php@2.25.4"
with:
coverage: "none"
extensions: "none, ctype, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
Expand All @@ -492,6 +520,9 @@ jobs:
- name: "Set up problem matchers for phpunit/phpunit"
run: "echo \"::add-matcher::${{ runner.tool_cache }}/phpunit.json\""

- name: "Validate composer.json and composer.lock"
run: "composer validate --ansi --strict"

- name: "Determine composer cache directory"
uses: "ergebnis/.github/actions/composer/determine-cache-directory@1.8.0"

Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/renew.yaml
Expand Up @@ -22,15 +22,15 @@ jobs:

steps:
- name: "Checkout"
uses: "actions/checkout@v3.3.0"
uses: "actions/checkout@v3.5.3"
with:
token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"

- name: "Set up PHP"
uses: "shivammathur/setup-php@2.25.4"
with:
coverage: "none"
extensions: "none, ctype, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
extensions: "none, ctype, curl, dom, iconv, json, mbstring, pdo, pdo_pgsql, phar, simplexml, tokenizer, xml, xmlwriter"
php-version: "${{ matrix.php-version }}"

- name: "Set up problem matchers for PHP"
Expand Down Expand Up @@ -68,8 +68,6 @@ jobs:
- name: "Run friendsofphp/php-cs-fixer"
run: "vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --verbose"
env:
PHP_CS_FIXER_IGNORE_ENV: 1

- name: "Commit modified files"
uses: "stefanzweifel/git-auto-commit-action@v4.16.0"
Expand Down
2 changes: 1 addition & 1 deletion .phive/phars.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="composer-require-checker" version="^4.5.0" installed="4.5.0" location="./.phive/composer-require-checker" copy="false"/>
<phar name="composer-require-checker" version="^4.6.0" installed="4.6.0" location="./.phive/composer-require-checker" copy="false"/>
</phive>
6 changes: 5 additions & 1 deletion README.md
@@ -1,7 +1,7 @@
# symfony-application-template

[![Integrate](https://github.com/ergebnis/symfony-application-template/workflows/Integrate/badge.svg)](https://github.com/ergebnis/symfony-application-template/actions)
[![Prune](https://github.com/ergebnis/symfony-application-template/workflows/Prune/badge.svg)](https://github.com/ergebnis/symfony-application-template/actions)
[![Merge](https://github.com/ergebnis/symfony-application-template/workflows/Merge/badge.svg)](https://github.com/ergebnis/symfony-application-template/actions)
[![Release](https://github.com/ergebnis/symfony-application-template/workflows/Release/badge.svg)](https://github.com/ergebnis/symfony-application-template/actions)
[![Renew](https://github.com/ergebnis/symfony-application-template/workflows/Renew/badge.svg)](https://github.com/ergebnis/symfony-application-template/actions)

Expand All @@ -20,6 +20,10 @@ Please have a look at [`CONTRIBUTING.md`](.github/CONTRIBUTING.md).

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

## Security Policy

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

## License

This application is licensed using the MIT License.
Expand Down
18 changes: 1 addition & 17 deletions composer-require-checker.json
Expand Up @@ -2,21 +2,5 @@
"scan-files": [
"bin/console"
],
"symbol-whitelist": [
"array",
"bool",
"callable",
"false",
"float",
"int",
"iterable",
"null",
"object",
"parent",
"self",
"static",
"string",
"true",
"void"
]
"symbol-whitelist": []
}
5 changes: 5 additions & 0 deletions rector.php
Expand Up @@ -13,6 +13,7 @@

use Rector\Config;
use Rector\Core;
use Rector\PHPUnit;

return static function (Config\RectorConfig $rectorConfig): void {
$rectorConfig->cacheDirectory(__DIR__ . '/.build/rector/');
Expand All @@ -25,4 +26,8 @@
]);

$rectorConfig->phpVersion(Core\ValueObject\PhpVersion::PHP_82);

$rectorConfig->sets([
PHPUnit\Set\PHPUnitSetList::PHPUNIT_100,
]);
};

0 comments on commit 69cde68

Please sign in to comment.