Commit ee6f13e
Adjust settings for composer repository (#8)
* add data structure contracts and tests
* feat: Add and configure PHP quality and testing libraries
- Added `friendsofphp/php-cs-fixer` for code style fixing.
- Added `nunomaduro/phpinsights` for code quality and insights.
- Updated `phpunit/phpunit` to version 10.5 for unit testing.
- Added `squizlabs/php_codesniffer` for code style checking.
- Added `mockery/mockery` for mocking objects in unit tests.
- Added `enlightn/security-checker` for checking security vulnerabilities in dependencies.
Configured these libraries to ensure code quality, consistency, and security.
### Changes Introduced
1. **Code Style Fixing**:
- Added `friendsofphp/php-cs-fixer` (^3.58) to automatically fix PHP code to follow defined coding standards.
2. **Code Quality Insights**:
- Added `nunomaduro/phpinsights` (^2.11) to provide code quality and performance insights.
3. **Unit Testing**:
- Updated `phpunit/phpunit` to version ^10.5 to ensure robust and comprehensive testing of the codebase.
4. **Code Style Checking**:
- Added `squizlabs/php_codesniffer` (^3.10) to detect violations of defined coding standards.
5. **Mocking in Unit Tests**:
- Added `mockery/mockery` (^1.6) to provide an expressive and flexible API for mocking objects in unit tests.
6. **Security Vulnerability Checking**:
- Added `enlightn/security-checker` (^2.0) to scan for known security vulnerabilities in project dependencies.
### Usage
- **Code Style Fixing**:
```sh
vendor/bin/php-cs-fixer fix
```
- **Code Quality Insights**:
```sh
vendor/bin/phpinsights
```
- **Unit Testing**:
```sh
vendor/bin/phpunit
```
- **Code Style Checking**:
```sh
vendor/bin/phpcs
```
- **Mocking in Unit Tests**:
- Use Mockery within your PHPUnit tests to create mocks and set expectations.
- **Security Vulnerability Checking**:
```sh
vendor/bin/security-checker security:check
```
### Benefits
- Ensures consistent code style across the project.
- Provides actionable insights to improve code quality.
- Enhances testing capabilities with updated PHPUnit and Mockery.
- Ensures project dependencies are free from known security vulnerabilities.
### Notes
- Ensure that the required binaries are executable in your environment.
- Integrate these tools into your CI/CD pipeline for automated checks.
* resolve style PSR
* add Translate README to Brazilian Portuguese
* update ci
* Update composer.json to exclude unnecessary files and directories for package distribution
* adjust lock composer
* adjust lock composer
* adjust .env.example
* update .env.example
* Add .phpcs-cache to .gitignore and remove from version control
* update url repository in composer file
* add git attributed file
* remove file exclud reference
* Adjust settings for composer
---------
Co-authored-by: Walmir Silva <walmir.silva@growthdev.com.br>1 parent 8171245 commit ee6f13e
3 files changed
+21
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 40 | + | |
| 41 | + | |
65 | 42 | | |
66 | 43 | | |
67 | 44 | | |
| |||
0 commit comments