-
Notifications
You must be signed in to change notification settings - Fork 107
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
Preserve full page path in App::url() method #2095
Conversation
are you sure, isn't
please point to an exact commit/PR and/or is something wrong with #2065? |
At the moment i see only the dropping of App::$page in this commit as a problem in case of routing NOT using php routingyou are right about returning /index.php is the default behaviour of nearly every webserver but there is a directive configuration for every webserver:
A standard Atk4 App using App::$urlBuildingPage and App::$urlBuildingExt can be set the correct return of App::url even for non standard configuration using php routingIf you put in front of Atk for example https://github.com/nikic/FastRoute will manage the application routing. Excepted results: Actual results: ConclusionI think the best option is not dropping it , but leave full control of default Index returning from building url, remove the needs of extend the App only to override one line in |
so
AFAK the only issue is with php internal webserver as But I agree, badly configured Apache/nginx should still be supported. -> as both major webserver name it "index", the property should be named with "index" too -> what is your opinion on empty string to be the default?
-> needs phpunit test |
LGTM |
i think default must be page=
i think the correct default value is |
i think is needed, i proceed adding functional test with App::url no behat or webserver only checking excepted output. What do you think? |
8f8e522
to
9e52b6d
Compare
9e52b6d
to
27d9cb4
Compare
@mvorisek, I may have gone a bit overboard with the test cases, but during the process, I discovered some unexpected behavior that didn't give me enough confidence to close the PR. As a result, I've refactored the entire Additionally, I believe I've resolved an issue where, under certain conditions, the URL returned was missing the relative path. i see the demos are broken due to recent changes in Control::set method |
I belive that is because of a new release of phpstan :) - please fix it first in a separate PR
then please split this PR to contain minimal fix + minimal "directory index" feature + minimal tests once that is done, submit another refactoring PR incl. |
Sure
for sure, trying to test the results of the previous App::url gives inconsistent response, but for sake of testing i can checkout the develop branch and add only unit tests and we can discuss the inconsistency in every cases |
21abb66
to
1d3df06
Compare
4dbb4bd
to
8d7cab6
Compare
f9c4c42
to
3469b9e
Compare
3469b9e
to
2176b1a
Compare
12f8616
to
bbf9782
Compare
No description provided.