56375[TASK] Add missing HTTP status code presets for PSR-7 responses
Commit message
Review
-
Code review CR -1
- Frank Nägler +2
- Stefan Neufeind +1
- Stephan Großberndt -1
- Mathias Brodala +1
-
Verified V +2
- Frank Nägler +2
- Mathias Brodala +1
- TYPO3com +1 CI
Issues 2
Files 1
Review log 1920
-
Benjamin Franzke uploaded patch set 1 03/20/18, 05:48
-
TYPO3com voted on patch set 1 V +1 03/20/18, 05:57 Completed build in 08m 45s on Tue, 20 Mar, 06:57 AM Test Summary: 30882 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-21707
-
Mathias Brodala voted on patch set 1 CR +1 03/20/18, 08:14
-
Stefan Neufeind voted on patch set 1 V +1 CR +1 03/20/18, 08:22
-
Stephan Großberndt voted on patch set 1 CR +1 03/20/18, 08:45
-
Stephan Großberndt commented on patch set 1 CR -1 03/20/18, 08:50
We have another list of these codes whixh were only updated for the 308 recently in https://forge.typo3.org/issues/84481 They should be aligned there too - and maybe in another patch for master only we can get rid of one of the lists? -
Stefan Neufeind commented on patch set 1 V 0 CR -1 03/20/18, 08:58
Yes, let's get rid of one list in this step if possible. Otherwise at least sync both lists and file an issue to get rid of one of the lists (as a separate step). -
Stephan Großberndt commented on patch set 1 03/20/18, 17:13
Getting rid of one of the lists in this patch would mean no backport to 8.7 almost certainly. Therefore my proposal to align both lists in this patch making that back-portable and adding another patch to master only to remove one of the lists -
Stefan Neufeind commented on patch set 1 03/20/18, 17:15
sure, let's align both lists to the IANA-List of status-codes here first. -
Guido Schmechel commented on patch set 1 03/20/18, 19:13
425 => 'Unordered Collection' Should we remove this statuscode? -
Jigal van Hemert commented on patch set 1 03/20/18, 21:15
Stephan already pointed to another file that also has a list of status codes. Can't we have a single list in the core?Response.php:69(Unused) according to https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtmlResponse.php:91UnassignedResponse.php:96UnassignedResponse.php:112Unassigned -
Benjamin Franzke commented on patch set 1 03/21/18, 05:29
> let's align both lists to the IANA-List of status-codes here first. I consider HttpUtility as an anti-pattern that should be deprecated in near future (due tue our ongoing move to PSR-7 response objects). It's main usecase is to perform redirects using early exit/die. That breaks the idea of a middleware pipeline (no post-processing possible). Also in HttpUtility the list of status codes is just a helper list that MAY be used, but in the PSR-7 response object the status codes are actually a whitelist of allowed values that can be passed to withStatus(). That means: For PSR-7 response object it's important to backport new status codes (but not to remove, to be non-breaking). Therefore my opinion: Do not add new public constants to a to-be deprecated utility. (Also change the withStatus() whitelisting to a range check, but that's something for a different commit) If we can not agree on a possible deprecation of HttpUtility, then we should probably sync both lists, yes.Response.php:69ReplyYes, therefore it was already marked deprecated. Removing that for 8.7 would be breaking. Therefore i did not touch it.Response.php:91ReplyThe Response class states (in a comment): The standardized and *other* important HTTP Status Codes Therefore I did not remove unofficial codes – as they were added by intent – and again to not break. -
Stephan Großberndt commented on patch set 1 03/21/18, 06:42
Thanks for your huge efforts on PSR so far Benjamin! Although I understand your intention on concentrating on the PSR initiative I consider the HttpUtility list as important as this one. A patch adding 308 there was merged only yesterday. Until now nothing is deprecated even in master and the two or three new status codes will create no problems - especially compared to the 301 usages.. So I think its better to have two consistent lists with consistent naming to deprecate and migrate from one to another. -
Frank Nägler voted on patch set 1 V +2 CR +2 04/05/18, 10:53
-
Stefan Neufeind voted on patch set 1 CR +1 04/05/18, 11:21
-
Mathias Brodala voted on patch set 1 V +1 04/05/18, 12:08
-
Frank Nägler merged patch set 2 04/05/18, 12:09
-
Frank Nägler commented on patch set 2 04/05/18, 12:18
Cherry Picked This patchset was cherry picked to branch TYPO3_8-7 as commit 6cf235bd7ea68b344d679367940dcd1ab213db0c -
Stephan Großberndt commented on patch set 2 04/05/18, 12:19
Aligning the lists in HttpUtility and Http/Response.php will be done in a new issue by Frank -
Frank Nägler commented on patch set 2 04/05/18, 12:25
big sorry, I have overlooked the -1 by Stephan. we agree that the lists should be streamlined, for this reason here is a new issue: https://forge.typo3.org/issues/84626