Migrate to Pest, Add Rector, and Improve CI #29
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces major testing and automation improvements by replacing PHPUnit with Pest, integrating Rector for automated refactoring, and enhancing CI/CD workflows. The changes aim to improve maintainability, enforce better coding practices, and streamline test execution.
Key Changes
1. Migration to Pest for Testing
composer.json
dependencies:phpunit/phpunit
pestphp/pest
(supports PHP 8.1+).: void
).2. Added Rector for Automated Refactoring
rector.php
configuration file:test:refactor
: Runs Rector in dry-run mode.refactor
: Applies Rector transformations.3. Improved CI/CD Pipeline
.github/workflows/fix-php-code-style-issues.yml
(code style checks now integrated intocomposer test
)..github/workflows/laravel.yml
:coverage: xdebug
).composer test
:PHPStan analyse
step.coverage-report
output directory to.gitignore
.4. Composer Enhancements
composer.json
:5. Type Safety and Code Quality Improvements
handle(): void
,rules(): array
).sprintf()
for dynamic query placeholders in controllers.: void
return type hints inroutes/api.php
.6. PHPUnit Coverage Reporting
phpunit.xml
:Why These Changes?
Potential Breaking Changes
Testing & Validation
composer test
to verify tests and code quality.