Skip to content

Commit 95d033f

Browse files
committed
chore: Update configuration files and scripts for improved development and testing
- Added coverage output file to .gitignore to prevent tracking of coverage data. - Enhanced .php-cs-fixer configuration with additional rules and parallel processing support. - Updated composer.json to require PHP 8.1 and added new development dependencies for Symfony and PHPStan. - Modified Makefile to include new targets for Rector and PHPStan analysis. - Improved Docker setup by adding coverage data volume and updating commands in docker-compose.yml. - Refined PHPUnit configuration for better test organization and coverage reporting. - Added new scripts for coverage percentage extraction and improved README documentation for clarity. - Introduced new issue templates for better user support and bug reporting.
1 parent 9497d57 commit 95d033f

35 files changed

Lines changed: 1180 additions & 818 deletions

.cursor/mcp.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mcpServers": {
3+
"engram": {
4+
"command": "engram",
5+
"args": ["mcp"]
6+
}
7+
}
8+
}

.github/CODEOWNERS

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
# Code Owners for Composer Update Helper
2-
# These users will be automatically requested for review when someone opens a pull request
3-
4-
# Default owner for everything in the repo
1+
# CODEOWNERS for ComposerUpdateHelper
2+
# Default owner for everything in the repository
53
* @HecFranco
64

75
# GitHub Actions workflows
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: "🐞 Bug report"
3+
about: Something is broken?
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
<!--
11+
- Please do not report an issue for a version of `composer-update-helper` that is no longer supported. Currently supported versions are listed here: https://github.com/nowo-tech/ComposerUpdateHelper#version-information
12+
- Please fill in this template according to your issue.
13+
- Please keep the table shown below at the top of your issue.
14+
- You can retrieve `composer-update-helper` version by running `composer info | grep "composer-update-helper"`.
15+
- You can retrieve PHP version by running `php -v`.
16+
- Please post code as text (using proper markup). Do not post screenshots of code.
17+
- Please remove this comment before submitting your issue.
18+
-->
19+
20+
| Q | A
21+
| ----------------------------| -----------------------
22+
| `ComposerUpdateHelper` version | x.y.z
23+
| PHP version | x.y.z
24+
| Database | MySQL / PostgreSQL / SQLite / Other
25+
26+
#### Summary
27+
28+
<!-- Provide a summary describing the problem you are experiencing. -->
29+
30+
#### Current behavior
31+
32+
<!-- What is the current (buggy) behavior? -->
33+
34+
#### How to reproduce
35+
36+
<!-- Provide steps to reproduce the bug. -->
37+
38+
#### Expected behavior
39+
40+
<!-- What was the expected (correct) behavior? -->
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: "🎉 Feature Request"
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
<!-- Provide a summary of the feature you would like to see implemented. -->
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: "❓ Support Question"
3+
about: You have a question about this bundle or need help?
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Fixes # (issue number)
1818
- [ ] I have added tests that prove my fix is effective or that my feature works
1919
- [ ] New and existing unit tests pass locally with my changes
2020
- [ ] I have updated the documentation accordingly
21-
- [ ] I have updated the CHANGELOG.md if applicable
21+
- [ ] I have updated `docs/CHANGELOG.md` if applicable
2222

2323
## Testing
2424

@@ -27,6 +27,8 @@ Please describe the tests you ran to verify your changes:
2727
```bash
2828
composer test
2929
composer cs-check
30+
composer phpstan
31+
composer rector-dry
3032
```
3133

3234
## Screenshots (if applicable)

.github/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
| Version | Supported |
66
| ------- | ------------------ |
7-
| 1.x | :white_check_mark: |
7+
| 2.x | :white_check_mark: |
88

99
## Reporting a Vulnerability
1010

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: [ubuntu-latest]
18-
php: ['7.4', '8.0', '8.1', '8.2', '8.3']
18+
php: ['8.1', '8.2', '8.3', '8.4']
1919

2020
steps:
2121
- name: Checkout code
@@ -171,6 +171,12 @@ jobs:
171171
- name: Check code style
172172
run: composer cs-check
173173

174+
- name: Run PHPStan
175+
run: composer phpstan
176+
177+
- name: Run Rector (dry-run)
178+
run: composer rector-dry
179+
174180
coverage:
175181
name: Code Coverage
176182
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Thumbs.db
2020
.phpunit.cache/
2121
coverage/
2222
coverage.xml
23+
/coverage-php.txt
2324

2425
# PHP-CS-Fixer
2526
.php-cs-fixer.cache

.php-cs-fixer.dist.php

Lines changed: 82 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -2,79 +2,99 @@
22

33
declare(strict_types=1);
44

5-
$finder = PhpCsFixer\Finder::create()
6-
->in(__DIR__ . '/src')
7-
->in(__DIR__ . '/tests')
8-
->name('*.php');
5+
/**
6+
* PHP-CS-Fixer configuration (PSR-12 + Symfony canonical).
7+
* Standard for Nowo bundles. Run: make cs-check | make cs-fix
8+
*/
9+
use PhpCsFixer\Config;
10+
use PhpCsFixer\Finder;
11+
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
912

10-
return (new PhpCsFixer\Config())
13+
return (new Config())
14+
->setParallelConfig(ParallelConfigFactory::detect())
1115
->setRiskyAllowed(true)
1216
->setRules([
1317
'@PSR12' => true,
14-
'@PHP74Migration' => true,
15-
'array_syntax' => ['syntax' => 'short'],
16-
'binary_operator_spaces' => true,
17-
'blank_line_after_opening_tag' => true,
18-
'blank_line_before_statement' => [
19-
'statements' => ['return', 'throw', 'try'],
18+
'@Symfony' => true,
19+
'@Symfony:risky' => true,
20+
'declare_strict_types' => true,
21+
'ordered_imports' => [
22+
'imports_order' => ['class', 'function', 'const'],
23+
'sort_algorithm' => 'alpha',
2024
],
21-
'cast_spaces' => true,
22-
'class_attributes_separation' => [
23-
'elements' => ['method' => 'one'],
25+
'single_import_per_statement' => true,
26+
'no_unused_imports' => true,
27+
'no_leading_import_slash' => true,
28+
'single_line_after_imports' => true,
29+
'array_syntax' => ['syntax' => 'short'],
30+
'trailing_comma_in_multiline' => [
31+
'elements' => ['arguments', 'arrays', 'match'],
2432
],
2533
'concat_space' => ['spacing' => 'one'],
26-
'declare_strict_types' => true,
27-
'fully_qualified_strict_types' => true,
28-
'function_typehint_space' => true,
29-
'include' => true,
30-
'lowercase_cast' => true,
31-
'modernize_types_casting' => true,
32-
'native_function_casing' => true,
33-
'new_with_braces' => true,
34-
'no_blank_lines_after_class_opening' => true,
35-
'no_blank_lines_after_phpdoc' => true,
36-
'no_empty_comment' => true,
37-
'no_empty_phpdoc' => true,
38-
'no_empty_statement' => true,
39-
'no_extra_blank_lines' => true,
40-
'no_leading_import_slash' => true,
41-
'no_leading_namespace_whitespace' => true,
42-
'no_mixed_echo_print' => true,
43-
'no_multiline_whitespace_around_double_arrow' => true,
44-
'no_null_property_initialization' => true,
45-
'no_short_bool_cast' => true,
46-
'no_spaces_around_offset' => true,
47-
'no_trailing_comma_in_singleline' => true,
48-
'no_unneeded_control_parentheses' => true,
49-
'no_unused_imports' => true,
34+
'binary_operator_spaces' => [
35+
'default' => 'single_space',
36+
'operators' => [
37+
'=>' => 'align_single_space_minimal',
38+
'=' => 'align_single_space_minimal',
39+
],
40+
],
41+
'method_argument_space' => [
42+
'on_multiline' => 'ensure_fully_multiline',
43+
],
44+
'no_extra_blank_lines' => [
45+
'tokens' => ['extra', 'throw', 'use'],
46+
],
47+
'no_trailing_whitespace' => true,
48+
'no_whitespace_in_blank_line' => true,
49+
'single_blank_line_at_eof' => true,
50+
'blank_line_after_opening_tag' => true,
5051
'no_useless_else' => true,
5152
'no_useless_return' => true,
52-
'no_whitespace_before_comma_in_array' => true,
53-
'no_whitespace_in_blank_line' => true,
54-
'object_operator_without_whitespace' => true,
55-
'ordered_imports' => ['sort_algorithm' => 'alpha'],
56-
'phpdoc_align' => true,
57-
'phpdoc_indent' => true,
58-
'phpdoc_no_access' => true,
59-
'phpdoc_no_package' => true,
53+
'simplified_if_return' => true,
54+
'single_line_throw' => true,
55+
'no_superfluous_elseif' => true,
56+
'switch_continue_to_break' => true,
6057
'phpdoc_order' => true,
61-
'phpdoc_scalar' => true,
6258
'phpdoc_separation' => true,
6359
'phpdoc_single_line_var_spacing' => true,
6460
'phpdoc_trim' => true,
65-
'phpdoc_types' => true,
66-
'phpdoc_var_without_name' => true,
67-
'return_type_declaration' => true,
68-
'self_accessor' => true,
69-
'short_scalar_cast' => true,
70-
'single_quote' => true,
71-
'space_after_semicolon' => true,
72-
'standardize_not_equals' => true,
73-
'ternary_operator_spaces' => true,
74-
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
75-
'trim_array_spaces' => true,
76-
'unary_operator_spaces' => true,
77-
'whitespace_after_comma_in_array' => true,
61+
'phpdoc_trim_consecutive_blank_line_separation' => true,
62+
'phpdoc_types_order' => [
63+
'null_adjustment' => 'always_last',
64+
'sort_algorithm' => 'alpha',
65+
],
66+
'no_superfluous_phpdoc_tags' => [
67+
'allow_mixed' => true,
68+
'remove_inheritdoc' => false,
69+
],
70+
'phpdoc_align' => [
71+
'align' => 'left',
72+
'tags' => ['param', 'property', 'return', 'throws', 'type', 'var'],
73+
],
74+
'phpdoc_no_empty_return' => false,
75+
'phpdoc_add_missing_param_annotation' => false,
76+
'no_null_property_initialization' => true,
77+
'single_line_comment_style' => ['comment_types' => ['hash']],
78+
'yoda_style' => [
79+
'equal' => false,
80+
'identical' => false,
81+
'less_and_greater' => false,
82+
],
83+
'modernize_types_casting' => true,
84+
'no_short_bool_cast' => true,
85+
'explicit_string_variable' => true,
86+
'fully_qualified_strict_types' => true,
87+
'global_namespace_import' => [
88+
'import_classes' => true,
89+
'import_constants' => true,
90+
'import_functions' => true,
91+
],
7892
])
79-
->setFinder($finder);
80-
93+
->setFinder(
94+
(new Finder())
95+
->in(__DIR__ . '/src')
96+
->in(__DIR__ . '/tests')
97+
->exclude(['vendor', 'var', 'coverage', '.phpunit.cache'])
98+
->notPath('namespace-stubs.php')
99+
->name('*.php')
100+
);

0 commit comments

Comments
 (0)