diff --git a/.gitattributes b/.gitattributes index 79ecf3ae..d62bb983 100644 --- a/.gitattributes +++ b/.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 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..01c24919 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @ergebnis-bot @localheinz diff --git a/.github/actions/composer/composer/determine-cache-directory/action.yaml b/.github/actions/composer/composer/determine-cache-directory/action.yaml index a898fdaa..4842e88c 100644 --- a/.github/actions/composer/composer/determine-cache-directory/action.yaml +++ b/.github/actions/composer/composer/determine-cache-directory/action.yaml @@ -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" diff --git a/.github/actions/composer/composer/install/run.sh b/.github/actions/composer/composer/install/run.sh index dddf3039..3cc3df12 100755 --- a/.github/actions/composer/composer/install/run.sh +++ b/.github/actions/composer/composer/install/run.sh @@ -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." diff --git a/.github/dependabot.yml b/.github/dependabot.yaml similarity index 100% rename from .github/dependabot.yml rename to .github/dependabot.yaml diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index 3ad1954e..dac125dd 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -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" @@ -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" @@ -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" @@ -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: diff --git a/.github/workflows/renew.yaml b/.github/workflows/renew.yaml index 40a7f94c..442522d9 100644 --- a/.github/workflows/renew.yaml +++ b/.github/workflows/renew.yaml @@ -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" diff --git a/tools/composer-require-checker b/.phive/composer-require-checker similarity index 100% rename from tools/composer-require-checker rename to .phive/composer-require-checker diff --git a/.php_cs b/.php_cs index fdc1c32d..02742220 100644 --- a/.php_cs +++ b/.php_cs @@ -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'); diff --git a/Makefile b/Makefile index 48bff840..2419e752 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 diff --git a/phive.xml b/phive.xml index a88a0a03..b7a46302 100644 --- a/phive.xml +++ b/phive.xml @@ -1,4 +1,4 @@ - +