Skip to content

refactor: drop support for Config\App::$proxyIPs = '' - #7621

Merged
kenjis merged 6 commits into
codeigniter4:4.4from
kenjis:remove-Request-proxyIPs
Jun 28, 2023
Merged

kenjis merged 6 commits into
codeigniter4:4.4from
kenjis:remove-Request-proxyIPs

Conversation

@kenjis

@kenjis kenjis commented Jun 26, 2023

Copy link
Copy Markdown
Member

Needs #7620

Description

  • remove Request::$proxyIPs
  • drop support for Config\App::$proxyIPs = '' (old Config file)

Checklist:

  • Securely signed commits
  • [] Component(s) with PHPDoc blocks, only if necessary or adds value
  • [] Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added the refactor Pull requests that refactor code label Jun 26, 2023
@kenjis
kenjis marked this pull request as draft June 26, 2023 06:41
@kenjis kenjis changed the title refactor: remove Request::$proxyIPs refactor: remove deprecated Request::$proxyIPs Jun 26, 2023
@kenjis
kenjis force-pushed the remove-Request-proxyIPs branch 2 times, most recently from 1575718 to 93c507f Compare June 26, 2023 11:30
@kenjis
kenjis marked this pull request as ready for review June 26, 2023 11:30
@michalsn

Copy link
Copy Markdown
Member

Any context? We have a lot of code marked as deprecated. Why are we removing this exact thing now? Are we going to remove more on the way to 4.4?

@datamweb

Copy link
Copy Markdown
Contributor

We have a lot of code marked as deprecated.

I believe it would be a good guide for developers if the exact deprecation version is provided. In addition, the accumulation of notifications is prevented.

@deprecated [<Semantic Version>] [<description>]

more info here.

@kenjis

kenjis commented Jun 26, 2023

Copy link
Copy Markdown
Member Author

Oh, removing Request::$proxyIPs is a breaking change?

@kenjis
kenjis force-pushed the remove-Request-proxyIPs branch from f41074d to e9d9026 Compare June 26, 2023 22:14
@kenjis kenjis changed the title refactor: remove deprecated Request::$proxyIPs refactor: drop support for Config\App::$proxyIPs = '' Jun 26, 2023
@kenjis

kenjis commented Jun 26, 2023

Copy link
Copy Markdown
Member Author

@michalsn Reverted Request::$proxyIPs.
When a dev extends Request and use $proxyIPs in it, and if we remove it, the extended Request would break.

Are we going to remove more on the way to 4.4?

I would like to remove deprecated properties in app/Config/*.

@kenjis kenjis added the 4.4 label Jun 27, 2023
@michalsn

Copy link
Copy Markdown
Member

When it comes to removing deprecated config variables (and code in general), it would be great if we could announce such changes one version ahead of doing this. But if others have nothing against then I'm fine with removing these in 4.4.

It would be nice if we could add a date for removing deprecated code when we mark it as deprecated. For example, if we deprecate something in the 4.4.0 release, the description would say that it will be removed in 4.6.0. This would be more transparent and show developers how much time they have to make permanent changes.

Honestly, I see no issue with removing Request::$proxyIPs. We don't use it anymore internally, so if someone use it in it's own version of the class it will become public property in the worst-case scenario (with no proper declaration). Or am I missing something?

@kenjis

kenjis commented Jun 27, 2023

Copy link
Copy Markdown
Member Author

Honestly, I see no issue with removing Request::$proxyIPs. We don't use it anymore internally, so if someone use it in it's own version of the class it will become public property in the worst-case scenario (with no proper declaration). Or am I missing something?

Dynamic properties cause errors in PHP 8.2.

@kenjis

kenjis commented Jun 27, 2023

Copy link
Copy Markdown
Member Author

If we don't mind removing the deprecated items other than Config items, I want to remove them after changing the Backward Compatibility Notes.

It would be nice to give notice of the removal in one previous version, but it would be a hassle for us to do so.

If we set a rule that we will remove deprecated items in the next next version, I think it would be easier to do so.

@michalsn

Copy link
Copy Markdown
Member

BC notes seem a bit outdated.

If we set a rule that we will remove deprecated items in the next next version, I think it would be easier to do so.

Sounds good.

@kenjis
kenjis merged commit 40409b3 into codeigniter4:4.4 Jun 28, 2023
@kenjis
kenjis deleted the remove-Request-proxyIPs branch June 28, 2023 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Pull requests that refactor code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants