-
Notifications
You must be signed in to change notification settings - Fork 1
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
Remove deprecated HTTP status codes and minimum support Dart 3.0 in HttpStatus #5
Merged
tech-andgar
merged 16 commits into
DartForge:main
from
tech-andgar:feature/minimum_dart_3
Feb 13, 2024
Merged
Remove deprecated HTTP status codes and minimum support Dart 3.0 in HttpStatus #5
tech-andgar
merged 16 commits into
DartForge:main
from
tech-andgar:feature/minimum_dart_3
Feb 13, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
tech-andgar
commented
Feb 13, 2024
- Removed deprecated constants: All capitalized and underscored versions of HTTP status codes have been removed to enforce consistent naming conventions.
Code | Http Status Name | Http Status (v1.x - v2.x Removed) | Http Status (v2.x - v3.x) |
---|---|---|---|
100 | Continue | Continue / CONTINUE | continue_ |
101 | Switching Protocols | Switching_Protocols / SWITCHING_PROTOCOLS | switchingProtocols |
102 | Processing | Processing / PROCESSING | processing |
103 | Early Hints | - | earlyHints |
200 | OK | Ok / OK | ok |
201 | Created | Created / CREATED | created |
202 | Accepted | Accepted / ACCEPTED | accepted |
203 | Non Authoritative Information | NonAuthoritative_Information / NON_AUTHORITATIVE_INFORMATION | nonAuthoritativeInformation |
204 | No Content | No_Content / NO_CONTENT | noContent |
205 | Reset Content | Reset_Content / RESET_CONTENT | resetContent |
206 | Partial Content | Partial_Content / PARTIAL_CONTENT | partialContent |
207 | Multi-Status | MultiStatus / MULTISTATUS | multiStatus |
208 | Already Reported | Already_Reported / ALREADY_REPORTED | alreadyReported |
226 | I'M Used | IM_Used / IM_USED | imUsed |
300 | Multiple Choices | Multiple_Choices / MULTIPLE_CHOICES | multipleChoices |
301 | Moved Permanently | Moved_Permanently / MOVED_PERMANENTLY | movedPermanently |
302 | Found / Moved Temporarily | Found / Moved_Temporarily / FOUND / MOVED_TEMPORARILY | found / movedTemporarily |
303 | See Other | See_Other / SEE_OTHER | seeOther |
304 | Not Modified | Not_Modified / NOT_MODIFIED | notModified |
305 | Use Proxy | Use_Proxy / USE_PROXY | useProxy |
307 | Temporary Redirect | Temporary_Redirect / TEMPORARY_REDIRECT | temporaryRedirect |
308 | Permanent Redirect | Permanent_Redirect / PERMANENT_REDIRECT | permanentRedirect |
400 | Bad Request | Bad_Request / BAD_REQUEST | badRequest |
401 | Unauthorized | Unauthorized / UNAUTHORIZED | unauthorized |
402 | Payment Required | Payment_Required / PAYMENT_REQUIRED | paymentRequired |
403 | Forbidden | Forbidden / FORBIDDEN | forbidden |
404 | Not Found | Not_Found / NOT_FOUND | notFound |
405 | Method Not Allowed | Method_Not_Allowed / METHOD_NOT_ALLOWED | methodNotAllowed |
406 | Not Acceptable | Not_Acceptable / NOT_ACCEPTABLE | notAcceptable |
407 | Proxy Authentication Required | Proxy_Authentication_Required / PROXY_AUTHENTICATION_REQUIRED | proxyAuthenticationRequired |
408 | Request Timeout | Request_Timeout / REQUEST_TIMEOUT | requestTimeout |
409 | Conflict | Conflict / CONFLICT | conflict |
410 | Gone | Gone / GONE | gone |
411 | Length Required | Length_Required / LENGTH_REQUIRED | lengthRequired |
412 | Precondition Failed | Precondition_Failed / PRECONDITION_FAILED | preconditionFailed |
413 | Request Entity Too Large | Payload_Too_Large / PAYLOAD_TOO_LARGE / Request_Entity_Too_Large / REQUEST_ENTITY_TOO_LARGE | requestEntityTooLarge |
414 | Request-URI Too Long | RequestURI_Too_Long / REQUESTURI_TOO_LONG / Request_Uri_Too_Long / REQUEST_URI_TOO_LONG | requestUriTooLong |
415 | Unsupported Media Type | Unsupported_Media_Type / UNSUPPORTED_MEDIA_TYPE | unsupportedMediaType |
416 | Requested Range Not Satisfiable | Requested_Range_Not_Satisfiable / REQUESTED_RANGE_NOT_SATISFIABLE | requestedRangeNotSatisfiable |
417 | Expectation Failed | Expectation_Failed / EXPECTATION_FAILED | expectationFailed |
418 | I'm a teapot | - | imATeapot |
419 | Insufficient Space on Resource | - | insufficientSpaceOnResource |
420 | Method Failure | - | methodFailure |
421 | Misdirected Request | Misdirected_Request / MISDIRECTED_REQUEST | misdirectedRequest |
422 | Unprocessable Entity | Unprocessable_Entity / UNPROCESSABLE_ENTITY | unprocessableEntity |
423 | Locked | Locked / LOCKED | locked |
424 | Failed Dependency | Failed_Dependency / FAILED_DEPENDENCY | failedDependency |
426 | Upgrade Required | Upgrade_Required / UPGRADE_REQUIRED | upgradeRequired |
428 | Precondition Required | Precondition_Required / PRECONDITION_REQUIRED | preconditionRequired |
429 | Too Many Requests | Too_Many_Requests / TOO_MANY_REQUESTS | tooManyRequests |
431 | Request Header Fields Too Large | Request_Header_Fields_Too_Large / REQUEST_HEADER_FIELDS_TOO_LARGE | requestHeaderFieldsTooLarge |
444 | Connection Closed Without Response | Connection_Closed_Without_Response / CONNECTION_CLOSED_WITHOUT_RESPONSE | connectionClosedWithoutResponse |
451 | Unavailable For Legal Reasons | Unavailable_For_Legal_Reasons / UNAVAILABLE_FOR_LEGAL_REASONS | unavailableForLegalReasons |
499 | Client Closed Request | Client_Closed_Request / CLIENT_CLOSED_REQUEST | clientClosedRequest |
500 | Internal Server Error | Internal_Server_Error / INTERNAL_SERVER_ERROR | internalServerError |
501 | Not Implemented | Not_Implemented / NOT_IMPLEMENTED | notImplemented |
502 | Bad Gateway | Bad_Gateway / BAD_GATEWAY | badGateway |
503 | Service Unavailable | Service_Unavailable / SERVICE_UNAVAILABLE | serviceUnavailable |
504 | Gateway Timeout | Gateway_Timeout / GATEWAY_TIMEOUT | gatewayTimeout |
505 | HTTP Version Not Supported | HTTP_Version_Not_Supported / HTTP_VERSION_NOT_SUPPORTED | httpVersionNotSupported |
506 | Variant Also Negotiates | Variant_Also_Negotiates / VARIANT_ALSO_NEGOTIATES | variantAlsoNegotiates |
507 | Insufficient Storage | Insufficient_Storage / INSUFFICIENT_STORAGE | insufficientStorage |
508 | Loop Detected | Loop_Detected / LOOP_DETECTED | loopDetected |
510 | Not Extended | Not_Extended / NOT_EXTENDED | notExtended |
511 | Network Authentication Required | Network_Authentication_Required / NETWORK_AUTHENTICATION_REQUIRED | networkAuthenticationRequired |
599 | Network Connect Timeout Error | Network_Connect_Timeout_Error / NETWORK_CONNECT_TIMEOUT_ERROR | networkConnectTimeoutError |
- Improved equality and hashCode methods: The equality and hashCode methods of the HttpStatus class have been refactored to provide more accurate comparisons based on code, name, and description.
- Upgraded to Dart 3.0: This version drops compatibility with Dart 2.x to leverage the features and improvements of Dart 3.0.
…nd underscores Removed all deprecated HTTP status code constants. This includes the removal of capitalized versions and versions with underscores in their names. The refactor aims to enforce the use of lower case, underscore-less constant names for HTTP status codes.
…derscores - Removal of deprecated HTTP status constants capitalized and underscores, encouraging the use of more readable alternatives.
Removed deprecated assertions from HTTP status tests. Also, removed the ignore_for_file comment for deprecated_member_use_from_same_package as it's no longer needed.
Removed usage of deprecated HttpStatus methods in main.dart. Replaced 'OK' and 'NoContent' with their respective non-deprecated counterparts, 'ok' and 'noContent'. Also removed related comments and ignore_for_file directive for deprecated_member_use_from_same_package.
The exceptions list under the 'prefer-correct-identifier-length' rule has been simplified. Previously, it contained three variations of 'ok'. Now, it only contains a single 'ok'.
Updated the HTTP status codes table in README.md to reflect changes from version 1.x.x and 2.x.x to version 3.x. Deprecated code examples have been removed for clarity and consistency.
The package version has been updated to 3.0.0 from 2.1.0, and the Dart SDK requirement has been increased to '>=3.0.0 <4.0.0'. Additionally, all dev_dependencies have been upgraded to their latest versions for better compatibility and performance improvements.
The hashCode method now uses a new private method _equality() for generating hashCodes. The equality operator has been updated to use this new _equality() method, which considers code, name, and description for comparison. This change enhances the robustness of object comparisons within the HttpStatus class.
Enhanced the clarity of HTTP status code checks in README by adding specific ranges for each category: Information, Successful, Redirect, ClientError, and ServerError.
Introduced .FUNDING and .CODEOWNERS files in the .github directory. The new files specify the project's main sponsor and designate a default reviewer for all changes, respectively.
Updated CHANGELOG.md to reflect changes in version 3.0.0, including dropping compatibility with Dart 2.x and migrating towards Dart 3.0, which supports records. Also added a comprehensive list of HTTP status codes and their corresponding names for versions v1.x - v3.x.
The linter configuration has been updated to enable the 'collection_methods_unrelated_type' rule. This will help ensure that our code adheres to best practices for using collection methods in Dart.
Updated CHANGELOG.md to reflect changes in version 3.0.0, including dropping compatibility with Dart 2.x and migrating towards Dart 3.0, which supports records. Also added a comprehensive list of HTTP status codes and their corresponding names for versions v1.x - v3.x.
Removed specific version '2.18.0' from the build matrix in GitHub workflows, leaving only stable, beta, dev and main channels for building process.
Pull Request Test Coverage Report for Build 7892648549Details
💛 - Coveralls |
andcan
approved these changes
Feb 13, 2024
0cd5e28
to
51a5ded
Compare
tech-andgar
added a commit
that referenced
this pull request
May 3, 2024
fix(workflows): Update Dart setup version and package dependencies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.