diff --git a/.editorconfig b/.editorconfig index 5fa814e..ed8a7f0 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,11 +10,15 @@ 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] +indent_size = 2 trim_trailing_whitespace = false diff --git a/.gitattributes b/.gitattributes index f88905f..bb79878 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,5 +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 b0e73c0..6864325 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,7 +1,7 @@ -| Q | A -| ---------------------------| --------------- -| ua-generic-request version | x.y.z -| PHP version | x.y.z +| Q | A | +|-----------------|------------| +| project version | x.y.z | +| PHP version | x.y.z | + +#### Steps required to reproduce the problem + +1. +2. +3. + +#### Expected Result + +* + +#### Actual Result + +* diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e881fa7..bbb60f8 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: @@ -21,6 +23,9 @@ updates: # dependency name) patterns: - "*" + # update-types: + # - "minor" + # - "patch" # exclude-patterns: # - "gc_ruboconfig" @@ -76,6 +81,9 @@ updates: # dependency name) patterns: - "*" + # update-types: + # - "minor" + # - "patch" # exclude-patterns: # - "gc_ruboconfig" diff --git a/.github/labels.yml b/.github/labels.yml index ce6dba1..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/ua-generic-request +# other Labels #- color: 5319e7 # name: "new useragents" # description: "" diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 1a953c4..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/ua-generic-request + # other Labels #- title: "**📦 new Useragents:**" # labels: # - "new useragents" diff --git a/.github/workflows/cleanup-caches.yml b/.github/workflows/cleanup-caches.yml index 928254c..91426be 100644 --- a/.github/workflows/cleanup-caches.yml +++ b/.github/workflows/cleanup-caches.yml @@ -1,4 +1,9 @@ +# https://help.github.com/en/categories/automating-your-workflow-with-github-actions + +# file-version: 1.0 + name: "Cleanup caches by a branch" + on: pull_request: types: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c4b4c97..2f4333e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -9,6 +9,11 @@ # the `language` matrix defined below to confirm you have the correct set of # supported CodeQL languages. # + +# https://help.github.com/en/categories/automating-your-workflow-with-github-actions + +# file-version: 1.0 + name: "CodeQL" on: diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 3f4e472..20ce1a9 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/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index ee87fd1..724b78e 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -5,6 +5,10 @@ # Source repository: https://github.com/actions/dependency-review-action # Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement +# https://help.github.com/en/categories/automating-your-workflow-with-github-actions + +# file-version: 1.0 + name: "Dependency Review" on: diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index bbce963..cdec03c 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -1,5 +1,7 @@ # https://help.github.com/en/categories/automating-your-workflow-with-github-actions +# file-version: 1.0 + name: "Sync labels in the declarative way" on: diff --git a/.github/workflows/lock-closed-issues.yml b/.github/workflows/lock-closed-issues.yml index baef386..bdfd090 100644 --- a/.github/workflows/lock-closed-issues.yml +++ b/.github/workflows/lock-closed-issues.yml @@ -1,4 +1,8 @@ -name: Lock closed issue +# https://help.github.com/en/categories/automating-your-workflow-with-github-actions + +# file-version: 1.0 + +name: "Lock closed issue" on: issues: diff --git a/.github/workflows/reactions.yml b/.github/workflows/reactions.yml index 4085517..f7bfacd 100644 --- a/.github/workflows/reactions.yml +++ b/.github/workflows/reactions.yml @@ -1,6 +1,8 @@ # https://help.github.com/en/categories/automating-your-workflow-with-github-actions -name: 'Reaction Comments' +# file-version: 1.0 + +name: "Reaction Comments" on: issue_comment: diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index ccdb8e2..a9902de 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -1,5 +1,7 @@ # https://help.github.com/en/categories/automating-your-workflow-with-github-actions +# file-version: 1.0 + name: "Release Drafter" on: diff --git a/.gitignore b/.gitignore index 7ac7073..521720d 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,9 @@ tests/temp/*.ini infection-*.log rewrite*.php .reports/ +node_modules/ +.build/ +package-lock.json +.reports *.bak +*.txt diff --git a/README.md b/README.md index 9a64fbd..e41dfe0 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ ## Code Status [![codecov](https://codecov.io/gh/mimmi20/ua-generic-request/branch/master/graph/badge.svg)](https://codecov.io/gh/mimmi20/ua-generic-request) -[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/mimmi20/ua-generic-request.svg)](http://isitmaintained.com/project/mimmi20/ua-generic-request "Average time to resolve an issue") -[![Percentage of issues still open](http://isitmaintained.com/badge/open/mimmi20/ua-generic-request.svg)](http://isitmaintained.com/project/mimmi20/ua-generic-request "Percentage of issues still open") +[![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/mimmi20/ua-generic-request.svg)](https://isitmaintained.com/project/mimmi20/ua-generic-request "Average time to resolve an issue") +[![Percentage of issues still open](https://isitmaintained.com/badge/open/mimmi20/ua-generic-request.svg)](https://isitmaintained.com/project/mimmi20/ua-generic-request "Percentage of issues still open") ## Requirements