Skip to content

Conversation

@riku22
Copy link
Contributor

@riku22 riku22 commented Nov 18, 2025

In Windows environments, when $_SERVER['SCRIPT_NAME'] is a filename without a parent directory, such as /index.php, Flight::request()->base returns only a yen symbol. This issue will be fixed.

* As this is my first pull request to this repository, I would appreciate it if you could point out any issues.

@n0nag0n
Copy link
Collaborator

n0nag0n commented Nov 20, 2025

Hey there! Thanks for contributing!

I ran the workflows and it looks like all of them are failing the PHP Unit tests. The thing for you to check is when you're testing this to make sure it works locally. You can test it with composer test or composer test-coverage. This will at least checked your current version of PHP.

The thing I'm wondering about is more why you have slash characters being converted to Yen characters. Part of me is wondering if you have a weird version of PHP or something? I've never heard of that before and I've used/built things with Flight on Windows before without the issues you were talking about.

…en symbol in Windows environments without a parent directory.
@riku22 riku22 changed the title Change the calling order of dirname in Flight::request()->base. Fixed an issue where Flight::request()->base would display only a yen symbol in Windows environments without a parent directory Nov 20, 2025
@riku22
Copy link
Contributor Author

riku22 commented Nov 20, 2025

Hello.

I apologize for the inconvenience caused by my oversight.

I have updated the pull request title and comments; I would appreciate it if you could review them.

Copy link
Collaborator

@n0nag0n n0nag0n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is odd behavior for sure. It looks safe how you've implemented it and all unit tests are passing now so I think we're good to merge this in, thanks!

@n0nag0n n0nag0n merged commit d32e090 into flightphp:master Nov 21, 2025
6 checks passed
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