Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle directories in url_stat() #9

Merged
merged 5 commits into from
Aug 14, 2024
Merged

Handle directories in url_stat() #9

merged 5 commits into from
Aug 14, 2024

Conversation

Crell
Copy link
Contributor

@Crell Crell commented Aug 13, 2024

There's two bugs here to fix.

  1. parse_url() cannot handle foo:// style strings. It just returns false. So in that case we need to manually parse the string. (This is arguably a core bug, but there's already an Internals thread about how to replace parse_url() with something that sucks less.)
  2. Filesystem::fileSize() chokes on a directory, which makes url_stat() fail on directories.

This patch fixes both, and causes my test cases to work in my app. However! The new test I added here still fails with a visibility error. I cannot get my CLI debugger connected properly on this app and cannot run Pest tests directly from IntelliJ (just PHPUnit), so I cannot reasonably debug further myself.

@elazar elazar merged commit 355caf9 into elazar:master Aug 14, 2024
4 checks passed
@Crell Crell deleted the path-fix branch August 14, 2024 15:58
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.

3 participants