From 630e23683f89472e51909ae32b94535a4ca84482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Sat, 19 Aug 2023 20:42:39 +0200 Subject: [PATCH] update config for dependebot Fixes #524 --- .editorconfig | 12 +++++++++-- .gitattributes | 6 ++++++ .github/CONTRIBUTING.md | 3 --- .github/ISSUE_TEMPLATE.md | 8 +++---- .github/dependabot.yml | 22 +++++++++++++------- .github/labels.yml | 4 +++- .github/release-drafter.yml | 5 ++++- .github/workflows/continuous-integration.yml | 12 +++++++++-- .gitignore | 7 +++++++ .mega-linter.yml | 4 ---- .php-cs-fixer.php | 2 +- LICENSE.md | 2 +- README.md | 4 ++-- codecov.yml | 2 +- rector.php | 2 -- 15 files changed, 64 insertions(+), 31 deletions(-) diff --git a/.editorconfig b/.editorconfig index 5fa814e..39de8ae 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,3 +1,8 @@ +; This file is for unifying the coding style for different editors and IDEs. +; More information at http://editorconfig.org + +; file-version: 1.0 + root = true [*] @@ -5,10 +10,13 @@ charset = utf-8 end_of_line = lf insert_final_newline = true indent_style = space -indent_size = 2 +indent_size = 4 trim_trailing_whitespace = true -[{*.php,*.xml}] +[*.{js,ts,json,json5,yml}] +indent_size = 2 + +[composer.json] indent_size = 4 [*.md] diff --git a/.gitattributes b/.gitattributes index a5c687b..153bd7b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,10 +1,15 @@ +; file-version: 1.0 + # text files * text=auto *.markdown text eol=lf *.md text eol=lf *.js text eol=lf +*.ts text eol=lf *.css text eol=lf +*.scss text eol=lf *.json text eol=lf +*.json5 text eol=lf *.lock text eol=lf *.html text eol=lf *.php text eol=lf @@ -41,6 +46,7 @@ phpstan.neon export-ignore text eol=lf phpunit.xml export-ignore text eol=lf psalm.xml export-ignore text eol=lf rector.php export-ignore text eol=lf +/test export-ignore /tests export-ignore /tools export-ignore /.github export-ignore diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 7acf742..904f610 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -6,12 +6,9 @@ For details, take a look at the following workflow configuration files: - [`workflows/continuous-integration.yaml`](workflows/continuous-integration.yaml) - [`workflows/lock-closed-issues.yaml`](workflows/lock-closed-issues.yaml) -- [`workflows/stale.yaml`](workflows/stale.yaml) ## Coding Standards -We are using [`ergebnis/composer-normalize`](https://github.com/ergebnis/composer-normalize) to normalize `composer.json`. - We are using [`friendsofphp/php-cs-fixer`](https://github.com/FriendsOfPHP/PHP-CS-Fixer) and [`squizlabs/php_codesniffer`](https://github.com/squizlabs/PHP_CodeSniffer) to enforce coding standards in PHP files. Run diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 1788742..efbefe9 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,12 +1,12 @@ #### Steps required to reproduce the problem -1. -2. -3. +1. +2. +3. #### Expected Result -* +* #### Actual Result diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8c68625..bca3f7c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,7 @@ # https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates +# file-version: 1.0 + version: 2 updates: @@ -18,6 +20,9 @@ updates: # dependency name) patterns: - "*" + update-types: + - "minor" + - "patch" # exclude-patterns: # - "gc_ruboconfig" @@ -41,13 +46,13 @@ updates: include: "scope" prefix: "composer" -# ignore: -# - dependency-name: infection/infection -# versions: -# - ">= 0" -# - dependency-name: phpunit/phpunit -# versions: -# - ">= 0" + # ignore: + # - dependency-name: slevomat/coding-standard + # versions: + # - ">= 0" + # - dependency-name: phpunit/phpunit + # versions: + # - ">= 0" - package-ecosystem: "github-actions" @@ -64,6 +69,9 @@ updates: # dependency name) patterns: - "*" + update-types: + - "minor" + - "patch" # exclude-patterns: # - "gc_ruboconfig" diff --git a/.github/labels.yml b/.github/labels.yml index 329ec90..0ea151b 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -1,4 +1,6 @@ --- +# file-version: 1.0 + # Default GitHub labels - color: "ee0701" name: "bug" @@ -63,7 +65,7 @@ name: "patch" description: "Patch" -# other Labels to mimmi20/template +# other Labels #- color: 5319e7 # name: "new useragents" # description: "" diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index cc3b2a7..703e36b 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,3 +1,6 @@ +--- +# file-version: 1.0 + template: | ## What’s Changed @@ -74,7 +77,7 @@ categories: - title: "**📦 Documentation:**" labels: - "documentation" - # other Labels to mimmi20/template + # other Labels #- title: "**📦 new Useragents:**" # labels: # - "new useragents" diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 43dfcd8..655f70c 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -1,5 +1,7 @@ # https://help.github.com/en/categories/automating-your-workflow-with-github-actions +# file-version: 1.0 + name: "Continuous Integration" on: @@ -34,7 +36,9 @@ jobs: # name: "Check composer dependencies" # # runs-on: "${{ matrix.operating-system }}" +# # timeout-minutes: 10 +# # continue-on-error: false # # needs: "ci" @@ -88,7 +92,9 @@ jobs: # needs: "ci" # # runs-on: "${{ matrix.operating-system }}" +# # timeout-minutes: 10 +# # continue-on-error: false # # strategy: @@ -135,7 +141,7 @@ jobs: # composer-options: "--optimize-autoloader --prefer-dist --prefer-stable -v" # # - name: "Run unit tests with phpunit/phpunit" -# run: "vendor/bin/phpunit -c phpunit.xml --no-coverage" +# run: "vendor/bin/phpunit -c phpunit.xml --no-coverage --display-warnings --display-deprecations" # # code-coverage: # name: "Code Coverage with PHPUnit" @@ -143,7 +149,9 @@ jobs: # needs: "tests" # # runs-on: "${{ matrix.operating-system }}" +# # timeout-minutes: 10 +# # continue-on-error: false # # strategy: @@ -192,7 +200,7 @@ jobs: # run: "mkdir -p .build/coverage" # # - name: "Collect code coverage with Xdebug and phpunit/phpunit" -# run: "vendor/bin/phpunit -c phpunit.xml --coverage-clover=.build/coverage/clover.xml --coverage-text --coverage-xml=.build/coverage/coverage-xml --log-junit=.build/coverage/phpunit.junit.xml" +# run: "vendor/bin/phpunit -c phpunit.xml --coverage-clover=.build/coverage/clover.xml --coverage-text --coverage-xml=.build/coverage/coverage-xml --log-junit=.build/coverage/phpunit.junit.xml --display-warnings --display-deprecations" # # - name: "Upload coverage to Codecov" # uses: "codecov/codecov-action@v3.1.4" diff --git a/.gitignore b/.gitignore index 7cd3a41..521720d 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,13 @@ tests/temp/*.ini .php-cs-fixer.cache .phplint-cache .phpunit.result.cache +.phpcs.cache infection-*.log rewrite*.php .reports/ +node_modules/ +.build/ +package-lock.json +.reports +*.bak +*.txt diff --git a/.mega-linter.yml b/.mega-linter.yml index bf0e5db..735139f 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -6,16 +6,12 @@ FILTER_REGEX_EXCLUDE: (vendor/) ENABLE: - EDITORCONFIG - MARKDOWN - - PHP - YAML DISABLE: - SPELL #- COPYPASTE DISABLE_LINTERS: - MARKDOWN_MARKDOWN_TABLE_FORMATTER - - PHP_PSALM - - PHP_PHPCS - - PHP_PHPSTAN - YAML_V8R EDITORCONFIG_EDITORCONFIG_CHECKER_FILTER_REGEX_EXCLUDE: "(\\.idea|\\.editorconfig|\\.github|\\.phpunit\\.result\\.cache|LICENSE)" JSON_PRETTIER_FILTER_REGEX_EXCLUDE: "(composer\\.json)" diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 6765889..02b3e81 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -13,7 +13,7 @@ $header = <<<'EOF' This file is part of the mimmi20/template package. - Copyright (c) 2020-2021, Thomas Mueller + Copyright (c) 2020-2023, Thomas Mueller For the full copyright and license information, please view the LICENSE file that was distributed with this source code. diff --git a/LICENSE.md b/LICENSE.md index abfe6dc..9ec6c57 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ # The MIT License (MIT) -Copyright (c) 2020-2022 Thomas Müller +Copyright (c) 2020-2023 Thomas Müller Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the _Software_), to deal in the Software without restriction, including without limitation the diff --git a/README.md b/README.md index 19b1bf6..5c99fcf 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ ## Code Status [![codecov](https://codecov.io/gh/mimmi20/template/branch/master/graph/badge.svg)](https://codecov.io/gh/mimmi20/template) -[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/mimmi20/template.svg)](http://isitmaintained.com/project/mimmi20/template "Average time to resolve an issue") -[![Percentage of issues still open](http://isitmaintained.com/badge/open/mimmi20/template.svg)](http://isitmaintained.com/project/mimmi20/template "Percentage of issues still open") +[![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/mimmi20/template.svg)](https://isitmaintained.com/project/mimmi20/template "Average time to resolve an issue") +[![Percentage of issues still open](https://isitmaintained.com/badge/open/mimmi20/template.svg)](https://isitmaintained.com/project/mimmi20/template "Percentage of issues still open") [![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fmimmi20%2Ftemplate%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/mimmi20/template/master) ## Requirements diff --git a/codecov.yml b/codecov.yml index 7c8674d..65d180e 100644 --- a/codecov.yml +++ b/codecov.yml @@ -17,4 +17,4 @@ comment: behavior: default require_changes: false # if true: only post the comment if coverage changes require_base: false # [yes :: must have a base report to post] - require_head: false # [yes :: must have a head report to post] + require_head: false # [yes :: must have a head report to post] diff --git a/rector.php b/rector.php index dd1293e..cdccbb1 100644 --- a/rector.php +++ b/rector.php @@ -15,7 +15,6 @@ use Rector\DeadCode\Rector\If_\RemoveDeadInstanceOfRector; use Rector\DeadCode\Rector\StaticCall\RemoveParentCallWithoutParentRector; use Rector\Php71\Rector\FuncCall\CountOnNullRector; -use Rector\Php80\Rector\FunctionLike\UnionTypesRector; use Rector\Php81\Rector\Array_\FirstClassCallableRector; use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector; use Rector\PHPUnit\Set\PHPUnitSetList; @@ -39,7 +38,6 @@ $rectorConfig->skip( [ - UnionTypesRector::class, NullToStrictStringFuncCallArgRector::class, RemoveDeadInstanceOfRector::class, FirstClassCallableRector::class,