Skip to content

Commit c5b7f47

Browse files
authored
Merge pull request #273 from ergebnis/feature/synchronize
Enhancement: Synchronize with ergebnis/php-library-template
2 parents 92d7b57 + e349282 commit c5b7f47

File tree

14 files changed

+390
-677
lines changed

14 files changed

+390
-677
lines changed

.gitattributes

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
/.github/ export-ignore
2+
/.phive/ export-ignore
23
/test/ export-ignore
3-
/tools/ export-ignore
44
/.editorconfig export-ignore
55
/.gitattributes export-ignore
66
/.gitignore export-ignore
77
/.php_cs export-ignore
88
/composer-require-checker.json export-ignore
99
/Makefile export-ignore
10-
/phive.xml export-ignore
1110
/phpstan-baseline.neon export-ignore
1211
/phpstan.neon export-ignore
1312
/psalm-baseline.xml export-ignore

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @ergebnis-bot @localheinz

.github/actions/composer/composer/determine-cache-directory/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ runs:
1313
steps:
1414
- name: "Determine composer cache directory"
1515
shell: "bash"
16-
run: "echo \"::set-env name=COMPOSER_CACHE_DIR::$(composer config cache-dir)\""
16+
run: "echo \"COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV"

.github/actions/composer/composer/install/run.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
dependencies="${COMPOSER_INSTALL_DEPENDENCIES}"
44

55
if [[ ${dependencies} == "lowest" ]]; then
6-
composer update --no-interaction --no-progress --no-suggest --prefer-lowest
6+
composer update --no-interaction --no-progress --prefer-lowest
77

8-
exit 0
8+
exit $?
99
fi
1010

1111
if [[ ${dependencies} == "locked" ]]; then
12-
composer install --no-interaction --no-progress --no-suggest
12+
composer install --no-interaction --no-progress
1313

14-
exit 0
14+
exit $?
1515
fi
1616

1717
if [[ ${dependencies} == "highest" ]]; then
18-
composer update --no-interaction --no-progress --no-suggest
18+
composer update --no-interaction --no-progress
1919

20-
exit 0
20+
exit $?
2121
fi
2222

2323
echo "::error::The value for the \"dependencies\" input needs to be one of \"lowest\", \"locked\"', \"highest\"' - got \"${dependencies}\" instead."

.github/workflows/integrate.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: "actions/checkout@v2.3.3"
3232

3333
- name: "Lint YAML files"
34-
uses: "ibiqlik/action-yamllint@v2"
34+
uses: "ibiqlik/action-yamllint@v2.0.0"
3535
with:
3636
config_file: ".yamllint.yaml"
3737
file_or_dir: "."
@@ -72,7 +72,7 @@ jobs:
7272
uses: "actions/cache@v2.1.2"
7373
with:
7474
path: ".build/php-cs-fixer"
75-
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ hashFiles('composer.lock') }}"
75+
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ github.sha }}"
7676
restore-keys: "php-${{ matrix.php-version }}-php-cs-fixer-"
7777

7878
- name: "Run friendsofphp/php-cs-fixer"
@@ -118,7 +118,7 @@ jobs:
118118
dependencies: "${{ matrix.dependencies }}"
119119

120120
- name: "Run maglnet/composer-require-checker"
121-
run: "tools/composer-require-checker check --config-file=$(pwd)/composer-require-checker.json"
121+
run: ".phive/composer-require-checker check --config-file=$(pwd)/composer-require-checker.json"
122122

123123
static-code-analysis:
124124
name: "Static Code Analysis"
@@ -183,7 +183,7 @@ jobs:
183183
restore-keys: "php-${{ matrix.php-version }}-psalm-"
184184

185185
- name: "Run vimeo/psalm"
186-
run: "vendor/bin/psalm --config=psalm.xml --diff --diff-methods --shepherd --show-info=false --stats --threads=4"
186+
run: "vendor/bin/psalm --config=psalm.xml --diff --shepherd --show-info=false --stats --threads=4"
187187

188188
tests:
189189
name: "Tests"

.github/workflows/renew.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
uses: "actions/cache@v2.1.2"
6262
with:
6363
path: ".build/php-cs-fixer"
64-
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ hashFiles('composer.lock') }}"
64+
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ github.sha }}"
6565
restore-keys: "php-${{ matrix.php-version }}-php-cs-fixer-"
6666

6767
- name: "Run friendsofphp/php-cs-fixer"
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="composer-require-checker" version="^2.1.0" installed="2.1.0" location="./tools/composer-require-checker" copy="true"/>
3+
<phar name="composer-require-checker" version="^2.1.0" installed="2.1.0" location="./.phive/composer-require-checker" copy="true"/>
44
</phive>

.php_cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ $license->save();
2929
$config = PhpCsFixer\Config\Factory::fromRuleSet(new PhpCsFixer\Config\RuleSet\Php71($license->header()));
3030

3131
$config->getFinder()
32-
->ignoreDotFiles(false)
33-
->in(__DIR__)
3432
->exclude([
3533
'.build/',
3634
'.github/',
3735
'.notes/',
3836
])
37+
->ignoreDotFiles(false)
38+
->in(__DIR__)
3939
->name('.php_cs');
4040

4141
$config->setCacheFile(__DIR__ . '/.build/php-cs-fixer/.php_cs.cache');

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ coding-standards: vendor ## Normalizes composer.json with ergebnis/composer-norm
1010

1111
.PHONY: dependency-analysis
1212
dependency-analysis: vendor ## Runs a dependency analysis with maglnet/composer-require-checker
13-
tools/composer-require-checker check --config-file=$(shell pwd)/composer-require-checker.json
13+
.phive/composer-require-checker check --config-file=$(shell pwd)/composer-require-checker.json
1414

1515
.PHONY: help
1616
help: ## Displays this list of targets with descriptions
@@ -21,7 +21,7 @@ static-code-analysis: vendor ## Runs a static code analysis with phpstan/phpstan
2121
mkdir -p .build/phpstan
2222
vendor/bin/phpstan analyse --configuration=phpstan.neon --memory-limit=-1
2323
mkdir -p .build/psalm
24-
vendor/bin/psalm --config=psalm.xml --diff --diff-methods --show-info=false --stats --threads=4
24+
vendor/bin/psalm --config=psalm.xml --diff --show-info=false --stats --threads=4
2525

2626
.PHONY: static-code-analysis-baseline
2727
static-code-analysis-baseline: vendor ## Generates a baseline for static code analysis with phpstan/phpstan and vimeo/psalm
@@ -40,4 +40,4 @@ tests: vendor ## Runs auto-review, unit, and integration tests with phpunit/phpu
4040

4141
vendor: composer.json composer.lock
4242
composer validate --strict
43-
composer install --no-interaction --no-progress --no-suggest
43+
composer install --no-interaction --no-progress

composer.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"php": "^7.2"
2020
},
2121
"require-dev": {
22-
"ergebnis/composer-normalize": "^2.9.0",
22+
"ergebnis/composer-normalize": "^2.10.0",
2323
"ergebnis/license": "^1.1.0",
2424
"ergebnis/php-cs-fixer-config": "^2.5.2",
2525
"ergebnis/phpstan-rules": "~0.15.3",
@@ -40,6 +40,12 @@
4040
"preferred-install": "dist",
4141
"sort-packages": true
4242
},
43+
"extra": {
44+
"composer-normalize": {
45+
"indent-size": 2,
46+
"indent-style": "space"
47+
}
48+
},
4349
"autoload": {
4450
"psr-4": {
4551
"Ergebnis\\Http\\": "src/"

0 commit comments

Comments
 (0)