-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix(setup-checks): Ensure URL with webroot works #47883
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
Conversation
|
/backport to stable30 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
d00f9ee to
6d21907
Compare
This comment was marked as resolved.
This comment was marked as resolved.
6d21907 to
f64d762
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
2b256a7 to
70d47cf
Compare
|
Too many forward slashes for me 🙈 |
|
/backport to stable29 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Psalm found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
4efd11a to
18d3b4f
Compare
come-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think fixing the wrong type in the phpdoc should fix psalm errors.
Nice job 👍
|
phpunit tests also need to be adapted to change from getSystemValue to getSystemValueString |
| if ($removeWebroot) { | ||
| $segments = parse_url($url); | ||
| $port = isset($segments['port']) ? (':' . $segments['port']) : ''; | ||
| return $segments['scheme'] . '://' . $segments['host'] . $port; |
Check notice
Code scanning / Psalm
PossiblyUndefinedArrayOffset
| if ($removeWebroot) { | ||
| $segments = parse_url($url); | ||
| $port = isset($segments['port']) ? (':' . $segments['port']) : ''; | ||
| return $segments['scheme'] . '://' . $segments['host'] . $port; |
Check notice
Code scanning / Psalm
PossiblyUndefinedArrayOffset
We basically mock the way `URLGenerator::getAbsoluteURL` works, so we must make sure that the URL might already contain the webroot. Because `baseURL` and `cliURL` also contain the webroot we need to remove the webroot from the URL first. Co-authored-by: Ferdinand Thiessen <[email protected]> Co-authored-by: Daniel <[email protected]> Signed-off-by: Ferdinand Thiessen <[email protected]>
… path Co-authored-by: Ferdinand Thiessen <[email protected]> Co-authored-by: Côme Chilliet <[email protected]> Signed-off-by: Ferdinand Thiessen <[email protected]>
832d41e to
be1cd7a
Compare
Summary
We basically mock the way
URLGenerator::getAbsoluteURLworks, so we must make sure that the URL might already contain the webroot. BecausebaseURLandcliURLalso contain the webroot we need to remove the webroot from the URL first.Checklist