Skip to content

Conversation

@faizanakram99
Copy link
Contributor

Add check to ensure each file is valid before processing. Without this change filemtime throws an error if the file doesn't exist but is part of cache, which is very common in dev environment.

For production it won't matter since is_file is cached, for some reason is_file is also faster than file_exists. Symfony codebase also prefers is_file over file_exists when checking existence of php file.

Add check to ensure each file is valid before processing. Without this change filemtime throws an error if the file doesn't exist but is part of cache, which is very common in dev environment.

For production it won't matter since is_file is cached, for some reason is_file is also faster than file_exists. Symfony codebase also prefers is_file over file_exists when checking existence of php file.
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.79%. Comparing base (53f9d49) to head (79d0b1b).
⚠️ Report is 126 commits behind head on master.

Files with missing lines Patch % Lines
src/Cache/FilesSnapshot.php 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #772      +/-   ##
============================================
- Coverage     95.72%   94.79%   -0.94%     
- Complexity     1773     1847      +74     
============================================
  Files           154      175      +21     
  Lines          4586     4880     +294     
============================================
+ Hits           4390     4626     +236     
- Misses          196      254      +58     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants