mirror of
https://github.com/pestphp/pest.git
synced 2026-12-06 15:52:16 +01:00
feat(tia): let a project leave paths out of read capture (#2030)
* feat(tia): let a project leave paths out of read capture * Verify TIA watch fallbacks and refresh snapshots --------- Co-authored-by: Sylvain Valienne <2300259+sylouuu@users.noreply.github.com> Co-authored-by: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com>
This commit is contained in:
@@ -115,4 +115,17 @@ final class Configuration
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<string>|null $patterns Project-relative globs to exclude, or null to disable read capture. Use watch() for excluded files that an existing watch pattern does not cover.
|
||||
* @return $this
|
||||
*/
|
||||
public function withoutReadCapture(?array $patterns = null): self
|
||||
{
|
||||
/** @var WatchPatterns $watchPatterns */
|
||||
$watchPatterns = Container::getInstance()->get(WatchPatterns::class);
|
||||
$watchPatterns->excludeReads($patterns);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user