Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Synchronize with ergebnis/php-library-template #220

Merged
merged 1 commit into from Oct 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
@@ -1,6 +1,6 @@
/.github/ export-ignore
/.phive/ export-ignore
/test/ export-ignore
/tools/ export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
@@ -0,0 +1 @@
* @ergebnis-bot @localheinz
Expand Up @@ -13,4 +13,4 @@ runs:
steps:
- name: "Determine composer cache directory"
shell: "bash"
run: "echo \"::set-env name=COMPOSER_CACHE_DIR::$(composer config cache-dir)\""
run: "echo \"COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV"
6 changes: 3 additions & 3 deletions .github/actions/composer/composer/install/run.sh
Expand Up @@ -5,19 +5,19 @@ dependencies="${COMPOSER_INSTALL_DEPENDENCIES}"
if [[ ${dependencies} == "lowest" ]]; then
composer update --no-interaction --no-progress --no-suggest --prefer-lowest

exit 0
exit $?
fi

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

exit 0
exit $?
fi

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

exit 0
exit $?
fi

echo "::error::The value for the \"dependencies\" input needs to be one of \"lowest\", \"locked\"', \"highest\"' - got \"${dependencies}\" instead."
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions .github/workflows/integrate.yaml
Expand Up @@ -74,7 +74,7 @@ jobs:
uses: "actions/cache@v2.1.2"
with:
path: ".build/php-cs-fixer"
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ hashFiles('composer.lock') }}"
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ github.sha }}"
restore-keys: "php-${{ matrix.php-version }}-php-cs-fixer-"

- name: "Run friendsofphp/php-cs-fixer"
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
dependencies: "${{ matrix.dependencies }}"

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

static-code-analysis:
name: "Static Code Analysis"
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:
restore-keys: "php-${{ matrix.php-version }}-psalm-"

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

tests:
name: "Tests"
Expand Down Expand Up @@ -286,7 +286,7 @@ jobs:
dependencies: "${{ matrix.dependencies }}"

- name: "Collect code coverage with pcov and phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=test/Unit/phpunit.xml --coverage-clover=.build/logs/clover.xml"
run: "vendor/bin/phpunit --configuration=test/Unit/phpunit.xml --coverage-clover=.build/phpunit/logs/clover.xml"

- name: "Send code coverage report to Codecov.io"
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/renew.yaml
Expand Up @@ -61,7 +61,7 @@ jobs:
uses: "actions/cache@v2.1.2"
with:
path: ".build/php-cs-fixer"
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ hashFiles('composer.lock') }}"
key: "php-${{ matrix.php-version }}-php-cs-fixer-${{ github.sha }}"
restore-keys: "php-${{ matrix.php-version }}-php-cs-fixer-"

- name: "Run friendsofphp/php-cs-fixer"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions .php_cs
Expand Up @@ -29,13 +29,13 @@ $license->save();
$config = PhpCsFixer\Config\Factory::fromRuleSet(new PhpCsFixer\Config\RuleSet\Php71($license->header()));

$config->getFinder()
->ignoreDotFiles(false)
->in(__DIR__)
->exclude([
'.build/',
'.github/',
'.notes/',
])
->ignoreDotFiles(false)
->in(__DIR__)
->name('.php_cs');

$config->setCacheFile(__DIR__ . '/.build/php-cs-fixer/.php_cs.cache');
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -18,7 +18,7 @@ coding-standards: vendor ## Normalizes composer.json with ergebnis/composer-norm

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

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

.PHONY: static-code-analysis-baseline
static-code-analysis-baseline: vendor ## Generates a baseline for static code analysis with phpstan/phpstan and vimeo/psalm
Expand Down
2 changes: 1 addition & 1 deletion phive.xml
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="composer-require-checker" version="^2.1.0" installed="2.1.0" location="./tools/composer-require-checker" copy="true"/>
<phar name="composer-require-checker" version="^2.1.0" installed="2.1.0" location="./.phive/composer-require-checker" copy="true"/>
</phive>