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

Prepare 2.0.0 #22

Merged
merged 33 commits into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
22877de
working on 2.0
ericsizemore Mar 31, 2024
790a1b6
temp. workflow changes
ericsizemore Mar 31, 2024
61a52c5
Update CoverageCheckCommandTest.php
ericsizemore Mar 31, 2024
d95d5f8
Update Utils.php
ericsizemore Mar 31, 2024
96b94a2
Update CoverageCheckCommandTest.php
ericsizemore Mar 31, 2024
1285e33
Update CoverageCheckCommandTest.php
ericsizemore Mar 31, 2024
dc61286
new features, more cleanup
ericsizemore Mar 31, 2024
5799dcf
Update CHANGELOG.md
ericsizemore Mar 31, 2024
ff773a7
some CS related fixes, new parseXml util function
ericsizemore Apr 2, 2024
c0a13a0
PHPStan changes
ericsizemore Apr 2, 2024
65b3075
more phpstan related changes
ericsizemore Apr 2, 2024
3cdeba2
adding explanation for certain ignored phpstan errors/etc.
ericsizemore Apr 2, 2024
13abe9c
cs fixes, small optimizations
ericsizemore Apr 3, 2024
7afaecf
Removing phpstan-symfony, other small changes
ericsizemore Apr 3, 2024
4324762
update readme, revert calculation change
ericsizemore Apr 4, 2024
70682fb
fix docblocks, misc. code changes
ericsizemore Apr 4, 2024
b9f9b91
Update composer.json
ericsizemore Apr 5, 2024
8ac00e8
start preparing for release
ericsizemore Apr 6, 2024
a2f4442
Update workflows
ericsizemore Apr 6, 2024
07664b8
c'mon windows..
ericsizemore Apr 6, 2024
70049f7
:/
ericsizemore Apr 6, 2024
a6c2f78
Update tests.yml
ericsizemore Apr 6, 2024
fabf261
Attempt testing against PHP 8.4, other small changes
ericsizemore Apr 9, 2024
947c9ae
Can PHPStan run on 8.4? :)
ericsizemore Apr 9, 2024
c4de15d
Update main.yml - that would be a no
ericsizemore Apr 9, 2024
b23d7b5
bump PHP requirement, unit test changes, doc changes, etc.
ericsizemore Apr 16, 2024
cfa441e
remove php 8.1 from workflows
ericsizemore Apr 16, 2024
bc82e83
update to --show-files table format
ericsizemore Apr 19, 2024
9d54a51
update readme, cs
ericsizemore Apr 19, 2024
c94c237
Update README.md
ericsizemore Apr 19, 2024
425aeb2
adds code of conduct, issue&pr templates
ericsizemore Apr 21, 2024
649cc4a
work toward release
ericsizemore Apr 21, 2024
538ee29
Merge branch 'master' into 2.x-dev
ericsizemore Apr 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Bug Report
description: Existing feature does not behave as expected.
labels: [ "bug", "unverified" ]
body:
- type: markdown
attributes:
value: |
Before reporting a bug, make sure PHPUnit Coverage Check is up-to-date and the problem is/was not reported already.
- type: textarea
id: problem-description
attributes:
label: Problem description
description: Please describe the problem you have encountered
validations:
required: true
- type: textarea
id: reproducer
attributes:
label: Reproducer
description: |
Please provide the clover file and CLI command that should be run to reproduce the problem.
If relevant, provide the expected output, the actual output and/or the error that occurred, if any.
Please use markdown syntax for the clover file contents, or provide a link to a remote clover file.
validations:
required: true
- type: input
id: version
attributes:
label: Library Version
description: Which version of PHPUnit Coverage Check is being run? (in X.Y.Z format)
validations:
required: true
- type: input
id: php-version
attributes:
label: PHP version
description: Which PHP version is PHPUnit Coverage Check being run on?
validations:
required: true
- type: dropdown
id: run-method
attributes:
label: How do you run PHPUnit Coverage Check?
multiple: false
options:
- Composer package
- Manual installation
- Phar binary
validations:
required: true
- type: checkboxes
id: terms
attributes:
label: Contribution Checks
options:
- label: I have verified whether this problem has already been reported.
required: false
- label: I am familiar with ["Bug or Feature?"](https://github.com/ericsizemore/phpunit-coverage-check/discussions/21)
required: false
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/2-feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Feature Request
description: I have a suggestion for a new feature (and possibly want to implement it).
labels: [ "enhancement", "unverified" ]
body:
- type: markdown
attributes:
value: |
Before requesting a new feature, make sure your version of PHPUnit Coverage Check is up-to-date.
> [!NOTE]
> While it is not required to first create a [discussion](https://github.com/ericsizemore/phpunit-coverage-check/discussions/categories/ideas) before creating a request, it is preferable.
By first using [discussions](https://github.com/ericsizemore/phpunit-coverage-check/discussions/categories/ideas) to discuss a feature request or idea, it allows the scope of the request to be fleshed out and established before the actual issue is created.
- type: textarea
id: feature-request
attributes:
label: Feature Request
description: Please describe the feature you would like to see implemented.
validations:
required: true
- type: input
id: discussion-reference
attributes:
label: Link to the discussion where the feature request was discussed, if any.
placeholder: "https://github.com/ericsizemore/phpunit-coverage-check/discussions/<ID>"
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Contribution Checks
options:
- label: I have verified whether this feature request was already discussed.
required: false
- label: I am familiar with ["Bug or Feature?"](https://github.com/ericsizemore/phpunit-coverage-check/discussions/21)
required: false
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Support question?
url: https://github.com/ericsizemore/phpunit-coverage-check/discussions/categories/q-a
about: If you have any questions about configuring or using PHPUnit Coverage Check, please open a new Q&A discussion.
27 changes: 27 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Pull Request
<!--
PR title needs to be prefixed with a conventional commit type
(chore,ci,deprecate,docs,feat,fix,refactor,revert)
It should also be brief and descriptive for a good changelog entry
examples: "feat: add new command" or "fix: remove unused imports"
-->

## Proposed Changes
<!-- Describe what the changes are and link to a Discussion or Issue if one exists -->

## Readiness Checklist

### Author/Contributor

- [ ] You have read [CONTRIBUTING](https://github.com/ericsizemore/phpunit-coverage-check/blob/master/CONTRIBUTING.md)
- [ ] If documentation is needed for this change, has that been included in this pull request
- [ ] run `composer run-script test` and ensure you have test coverage for the lines you are introducing
- [ ] run `composer run-script phpstan` and fix any issues that you have introduced
- [ ] run `composer run-script cs:check` and fix any issues that you have introduced

### Reviewer

- [ ] Label as either `fix`, `documentation`, or `enhancement`
- [ ] Additionally label as `verified` or `unverified`
30 changes: 19 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,41 @@ name: PHPStan
on:
workflow_dispatch:
push:
branches: [ master ]
branches:
- "master"
pull_request:
branches: [ master ]
branches:
- "master"

# Is it overkill to run PHPStan using different PHP versions? Probably :)
jobs:
phpstan:
name: PHPStan Static Analysis ${{ matrix.php }}
runs-on: ubuntu-latest
name: "PHPStan Static Analysis ${{ matrix.php-version }}, ${{ matrix.operating-system }}"
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
php: [ '8.1', '8.2', '8.3' ]
php-version:
- "8.2"
- "8.3"
operating-system:
- "ubuntu-latest"
- "windows-latest"
steps:
- uses: actions/checkout@v4

- name: Install PHP ${{ matrix.php }}
- name: "Install PHP ${{ matrix.php-version }}"
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
php-version: "${{ matrix.php-version }}"
extensions: mbstring
tools: composer:v2

- name: Validate composer.json and composer.lock
- name: "Validate composer.json and composer.lock"
run: composer validate --strict

- name: Cache Composer packages
- name: "Cache Composer packages"
id: composer-cache
shell: bash
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
Expand All @@ -40,8 +48,8 @@ jobs:
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
- name: "Install dependencies"
run: composer install --prefer-dist --no-progress

- name: Run PHPStan
- name: "Run PHPStan"
run: composer run-script phpstan
36 changes: 22 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,44 @@ name: Tests

on:
push:
branches: [ master ]
branches:
- "master"
pull_request:
branches: [ master ]
branches:
- "master"

jobs:
test:
name: Run Unit Tests ${{ matrix.php }}
runs-on: ubuntu-latest
name: "Run Unit Tests ${{ matrix.php-version }}, ${{ matrix.operating-system }}"
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
php: [ '8.1', '8.2', '8.3', '8.4' ]
php-version:
- "8.2"
- "8.3"
- "8.4"
operating-system:
- "ubuntu-latest"
- "windows-latest"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 10

- name: Install PHP ${{ matrix.php }}
- name: "Install PHP ${{ matrix.php-version }}"
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
extensions: mbstring,
coverage: xdebug,
php-version: "${{ matrix.php-version }}"
extensions: mbstring
coverage: xdebug
tools: composer:v2

- name: Validate composer.json and composer.lock
- name: "Validate composer.json and composer.lock"
run: composer validate --strict

- name: Cache Composer packages
- name: "Cache Composer packages"
id: composer-cache
shell: bash
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
Expand All @@ -41,13 +50,12 @@ jobs:
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
- name: "Install dependencies"
run: composer install --prefer-dist --no-progress

- name: Run test suite
- name: "Run test suite"
run: composer run-script test

- uses: sudo-bot/action-scrutinizer@latest
with:
cli-args: "--format=php-clover build/logs/clover.xml"

36 changes: 21 additions & 15 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

declare(strict_types=1);

$currentYear = \date('Y');

$header = <<<EOF
$header = <<<'EOF'
This file is part of PHPUnit Coverage Check.
(c) Eric Sizemore <admin@secondversion.com>
Expand All @@ -21,12 +19,10 @@
->setRules([
'@PER-CS' => true,
'@PSR12' => true,
'@PHP81Migration' => true,
'@PHP82Migration' => true,
'array_syntax' => ['syntax' => 'short'],
'php_unit_internal_class' => ['types' => ['normal', 'final']],
'php_unit_namespaced' => true,
'php_unit_expectation' => true,
'php_unit_set_up_tear_down_visibility' => true,
'phpdoc_align' => true,
'phpdoc_indent' => true,
'phpdoc_inline_tag_normalizer' => true,
Expand All @@ -48,7 +44,6 @@
'phpdoc_var_without_name' => true,
'phpdoc_no_useless_inheritdoc' => true,
'align_multiline_comment' => true,
'phpdoc_add_missing_param_annotation' => ['only_untyped' => true],
'binary_operator_spaces' => [
'operators' => [
'*=' => 'align_single_space_minimal',
Expand All @@ -59,14 +54,19 @@
'=>' => 'align_single_space_minimal',
],
],
'heredoc_to_nowdoc' => true,
'ordered_imports' => ['imports_order' => ['class', 'function', 'const',]],
'no_unused_imports' => true,
'single_import_per_statement' => true,
'declare_equal_normalize' => ['space' => 'none'],
'declare_parentheses' => true,
'declare_strict_types' => true,
'global_namespace_import' => ['import_classes' => true, 'import_constants' => true, 'import_functions' => true],
'heredoc_to_nowdoc' => true,
'fully_qualified_strict_types' => true,
'ordered_imports' => ['imports_order' => ['class', 'function', 'const',]],
'no_leading_import_slash' => true,
'no_unneeded_import_alias' => true,
'no_unused_imports' => true,
'single_import_per_statement' => true,
'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced', 'strict' => true],
'native_constant_invocation' => ['fix_built_in' => false, 'include' => ['DIRECTORY_SEPARATOR', 'PHP_INT_SIZE', 'PHP_SAPI', 'PHP_VERSION_ID'], 'scope' => 'namespaced', 'strict' => true],
'declare_equal_normalize' => ['space' => 'none'],
'declare_parentheses' => true,
'declare_strict_types' => true,
//'global_namespace_import' => ['import_classes' => true, 'import_constants' => true, 'import_functions' => true],
'header_comment' => ['comment_type' => 'PHPDoc', 'header' => $header, 'separate' => 'top'],
'ordered_class_elements' => [
'order' => [
Expand All @@ -76,15 +76,21 @@
'constant_protected',
'constant_private',
'property_public',
'property_public_static',
'property_protected',
'property_protected_static',
'property_private',
'property_private_static',
'construct',
'destruct',
'magic',
'phpunit',
'method_public',
'method_public_static',
'method_protected',
'method_protected_static',
'method_private',
'method_private_static',
],
'sort_algorithm' => 'alpha',
],
Expand Down
Loading
Loading