Welcome Guest, Not a member yet? Register   Sign In
Remove deprecated Request->getMethod($upper)
#1

Team, I would like to send a PR to delete @deprecated

Github OutgoingRequest

But this will cause errors in the CLI tests, CURL.. Because since ancient times, methods could be uppercase/lowercase. Now 99% of methods have capital letters (POST, GET,..) Should I delete such mentions and tests? Or is there another option?
Plus I saw that routing also relies on get/post writing. It would be worth fixing this as well
Simple CI 4 project for beginners codeigniter-expenses
Reply
#2

(This post was last modified: 11-04-2023, 06:07 PM by kenjis.)

I would also like to remove the deprecated features.
However, I expect the impact to be significant.
I want to avoid breaking existing applications as much as possible.

It was deprecated in v4.0.5.
https://codeigniter4.github.io/CodeIgnit...etheader-s

FYI
The HTTP method names are case-sensitive, and it is not "get" but "GET".
Quote:The method token is case-sensitive because it might be used as a gateway to object-based systems with case-sensitive method names. By convention, standardized methods are defined in all-uppercase US-ASCII letters.
https://www.rfc-editor.org/rfc/rfc9110#name-overview
Reply
#3

What actions?
I know that GET/POST is preferable. Do I need to rewrite the code everywhere for this? Or is PR not needed?
A lot is waiting for get/post now. In this case, the framework will remain with "over 9000" deprecated lines.
Simple CI 4 project for beginners codeigniter-expenses
Reply
#4

GET/POST is correct. get/post is just wrong.

One by one. Remove $upper functionality in getMethod($upper) first.
Breaking changes are inevitable, but it will not disappear without removal.
Reply
#5

I deleted it and that's why I'm asking questions. After removal, you need to fix tests and system files everywhere. And I'm confused, is it worth continuing?
Simple CI 4 project for beginners codeigniter-expenses
Reply
#6

I sent a PR https://github.com/codeigniter4/CodeIgniter4/pull/8186
Review, please.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB