Add phpunit-watcher for improved testing and customization#707
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates the project’s PHPUnit watch workflow by managing spatie/phpunit-watcher via Composer (dev dependency), simplifying the Composer script that runs the watcher, and reorganizing the watcher YAML config for readability.
Changes:
- Add
spatie/phpunit-watchertorequire-devso the watcher is installed/versioned with the project. - Simplify the
test-watcherComposer script to runphpunit-watcher watchdirectly (no global install fallback). - Reorder sections in
phpunit-watcher.ymlfor clearer organization.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
phpunit-watcher.yml |
Reorders configuration sections for readability (no intended behavior changes). |
composer.json |
Adds spatie/phpunit-watcher as a dev dependency and simplifies the test-watcher script. |
.gitignore |
Ignores .phpunit-watcher.yml (but this can unintentionally hide local overrides that take precedence). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 pull request updates the project's test-watching setup to improve reliability and configuration consistency. The main changes involve ensuring the
spatie/phpunit-watcherdependency is managed directly by Composer, simplifying the test watcher script, and reordering settings in thephpunit-watcher.ymlfile for clarity.Dependency management:
spatie/phpunit-watcheras a development dependency incomposer.jsonto ensure it is always available and versioned with the project.Test script simplification:
test-watcherscript incomposer.jsonto directly runphpunit-watcher watch, removing the previous logic that attempted to install it globally if missing.Configuration cleanup:
phpunit-watcher.ymlfor consistency, moving thewatchsection to the end and ensuring notification and PHPUnit settings are clearly organized. No functional changes, but improves readability and maintainability.