Skip to content

Conversation

@MGatner
Copy link
Member

@MGatner MGatner commented May 4, 2021

Description
This is "stage one" for some bugfixes in URI resolution. This changes the internal removeDotSegments() method to static and fixes a logic bug (ltrim() could never leave a single slash).

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • n/a User guide updated
  • Conforms to style guide

This was referenced May 4, 2021
@lonnieezell
Copy link
Member

What's the purpose of making removeDotSegments() static? That's a BC break since it was a public method.

@MGatner
Copy link
Member Author

MGatner commented May 5, 2021

It's marked as an @internal method, so we should be safe to change it. I haven't actually looked to see if it was mentioned in the User Guide. I made it static so IncomingRequest could use it (see #4646) because the version of this same method there was a) inconsistent and b) duplicating functionality.

@MGatner MGatner requested a review from lonnieezell May 5, 2021 13:20
Copy link
Member

@lonnieezell lonnieezell left a comment

Choose a reason for hiding this comment

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

I missed that it was marked internal. While technically still a BC break, when so marked it's a "use at your own risk" feature.

@MGatner
Copy link
Member Author

MGatner commented May 5, 2021

Agreed! I did check and we don't mention it anywhere in the User Guide, also it looks like the API Docs are smart enough to leave off @internal methods so it does not appear here either: https://codeigniter4.github.io/api/classes/CodeIgniter.HTTP.URI.html

@MGatner MGatner merged commit a4edd89 into codeigniter4:develop May 5, 2021
@MGatner MGatner deleted the uri-dots branch May 5, 2021 13:44
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