This repository was archived by the owner on Aug 20, 2025. It is now read-only.
Replace fswatch with spatie/file-system-watcher (#1)#16
Draft
herpaderpaldent wants to merge 1 commit into
Draft
Conversation
* Update PHP version requirement to 8.1 * Remove ReactPHP dependencies and replace with Symfony Process component * Replace fswatch dependency with spatie/file-system-watcher package (which uses inotify) * Add Termwind for pretty output when watching files, instead of using the default Pest console output which is not very readable on a terminal that supports ANSI colors
Contributor
|
@herpaderpaldent what would you think about using https://github.com/thecodeholic/php-file-watcher? It looks like that would be a native PHP solution without requiring an external dependency like fswatch or node & chokidar. It would be nice be able to run this on a php Docker container without needing to install Node, etc. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
DRAFT: Replace
fswatchWhat do you think about this?
How about replacing fswatch with spatie/file-system-watcher? I know from discord that this has been a topic for quite some time. I'd be more then happy to outline the changes and challenges and functionality but before i do so, i'd like to gather some feedback.
Description (made by whatthediff.ai)
Motivation
if you search through the discourse you'll see many problems caused by
fswatchf.e. it's not available on package managers for Windows. On Linux Systems the watcher plugin doesn't run at all even withfswatchinstalled. I was under the impression the move away fromfswatchwas on the bucket list for some time. @owenvoke might add to this?Installation
In your project, you should have the JavaScript package chokidar installed. You can install it via npm
or Yarn
usage
you may specify a folder/file to test only. Upon saving the test will executed again.
Anything to consider? Code Style? Anything?