File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 2424 "symfony/yaml" : " ^4.0|^5.0" ,
2525 "yosymfony/resource-watcher" : " ^2.0"
2626 },
27+ "conflict" : {
28+ "yosymfony/resource-watcher" : " <2.0"
29+ },
2730 "require-dev" : {
2831 "phpunit/phpunit" : " ^8.0"
2932 },
Original file line number Diff line number Diff line change 55use Clue \React \Stdio \Stdio ;
66use React \EventLoop \Factory ;
77use React \Stream \ThroughStream ;
8- use Symfony \Component \Finder \Finder ;
98use Spatie \PhpUnitWatcher \Screens \Phpunit ;
10- use Yosymfony \ResourceWatcher \ResourceWatcher ;
9+ use Symfony \Component \Finder \Finder ;
10+ use Yosymfony \ResourceWatcher \Crc32ContentHash ;
1111use Yosymfony \ResourceWatcher \ResourceCacheMemory ;
12+ use Yosymfony \ResourceWatcher \ResourceWatcher ;
1213
1314class Watcher
1415{
@@ -39,18 +40,14 @@ public function startWatching()
3940 {
4041 $ this ->terminal ->displayScreen (new Phpunit ($ this ->options ), false );
4142
42- $ watcher = new ResourceWatcher (new ResourceCacheMemory ());
43-
44- $ watcher ->setFinder ($ this ->finder );
43+ $ watcher = new ResourceWatcher (new ResourceCacheMemory (), $ this ->finder , new Crc32ContentHash ());
4544
4645 $ this ->loop ->addPeriodicTimer (1 / 4 , function () use ($ watcher ) {
4746 if (! $ this ->terminal ->isDisplayingScreen (Phpunit::class)) {
4847 return ;
4948 }
5049
51- $ watcher ->findChanges ();
52-
53- if ($ watcher ->hasChanges ()) {
50+ if ($ watcher ->findChanges ()->hasChanges ()) {
5451 $ this ->terminal ->refreshScreen ();
5552 }
5653 });
You can’t perform that action at this time.
0 commit comments