Skip to content

Add Path::file() - #27

Merged
Baptouuuu merged 2 commits into
developfrom
file-paths
Aug 1, 2026
Merged

Add Path::file()#27
Baptouuuu merged 2 commits into
developfrom
file-paths

Conversation

@Baptouuuu

Copy link
Copy Markdown
Member

By default paths are treated as url paths meaning it cannot contains characters as ? or # as they represent queries and fragments.

But this is problematic when using this package to represent file paths, such as in innmind/filesystem, where a file name should be able to contain these characters.

To allow this while not breaking compatibility this adds a new ::file() constructor to differentiate them.

@Baptouuuu Baptouuuu self-assigned this Aug 1, 2026
@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.83673% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.51%. Comparing base (0274685) to head (21c8d99).

Files with missing lines Patch % Lines
src/Path.php 85.18% 4 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop      #27      +/-   ##
=============================================
- Coverage      98.59%   98.51%   -0.08%     
- Complexity       522      536      +14     
=============================================
  Files             33       33              
  Lines           1779     1818      +39     
=============================================
+ Hits            1754     1791      +37     
- Misses            25       27       +2     

☔ View full report in Codecov by Harness.
📢 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.

@Baptouuuu
Baptouuuu merged commit 3bcf926 into develop Aug 1, 2026
20 of 22 checks passed
@Baptouuuu
Baptouuuu deleted the file-paths branch August 1, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant