-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix(setup-checks): Ensure URL with webroot works #47883
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
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 Note
if ($removeWebroot) { | ||
$segments = parse_url($url); | ||
$port = isset($segments['port']) ? (':' . $segments['port']) : ''; | ||
return $segments['scheme'] . '://' . $segments['host'] . $port; |
Check notice
Code scanning / Psalm
PossiblyUndefinedArrayOffset Note
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 <opensource@fthiessen.de> Co-authored-by: Daniel <mail@danielkesselberg.de> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
… path Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
832d41e
to
be1cd7a
Compare
Summary
We basically mock the way
URLGenerator::getAbsoluteURL
works, so we must make sure that the URL might already contain the webroot. BecausebaseURL
andcliURL
also contain the webroot we need to remove the webroot from the URL first.Checklist