Skip to content

Commit d42cba3

Browse files
committed
Enhancement: Synchronize with ergebnis/php-library-template
1 parent 92d7b57 commit d42cba3

File tree

12 files changed

+24
-20
lines changed

12 files changed

+24
-20
lines changed

.gitattributes

+1-2
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

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @ergebnis-bot @localheinz

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

+1-1
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

+6-6
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

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: "actions/[email protected]"
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/[email protected]"
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
uses: "actions/[email protected]"
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.

.php_cs

+2-2
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

+3-3
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

phpstan.neon

+4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ includes:
33

44
parameters:
55
checkMissingIterableValueType: false
6+
67
inferPrivatePropertyTypeFromConstructor: true
8+
79
level: max
10+
811
paths:
912
- src/
1013
- test/
14+
1115
tmpDir: .build/phpstan/

psalm-baseline.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="3.14.2@3538fe1955d47f6ee926c0769d71af6db08aa488">
2+
<files psalm-version="3.18.2@19aa905f7c3c7350569999a93c40ae91ae4e1626">
33
<file src="test/Unit/Method/Rfc/Rfc3648Test.php">
44
<RedundantCondition occurrences="1">
55
<code>assertSame</code>

tools/composer-require-checker

-481 KB
Binary file not shown.

0 commit comments

Comments
 (0)