Upgrading angel_framework 1 to 2
Breaking1.1.5+1 → 2.1.1Breaking28New27Changed44Fixed16Other27
BreakingUpgrade verdict
28 breaking changes.
In plain terms
- Remove unnecessary new and const.
- Remove dependency on body_parser.
- Remove ResponseContext.sendFile.
- No longer export HTTP-specific code from angel_framework.dart.
Must act Top 3 of 28 that need code or config changes
Dart SDK requirement changed in 2.0.0-alpha: >=1.8.0 <3.0.0 → >=2.0.0-dev <3.0.0.
What you must change
Breaking28
Remove unnecessary new and const.
newconstRemove dependency on body_parser.
body_parserRemove ResponseContext.sendFile.
ResponseContext.sendFileNo longer export HTTP-specific code from angel_framework.dart.
angel_framework.dartRenamed waterfall to chain.
waterfallchainRenamed Routable.service to Routable.findService.
Routable.serviceRoutable.findServiceRoutable.findHookedServiceRemoved Angel.injectEncoders.
Angel.injectEncodersAngel.optimizeForProduction no longer calls preInject, as it does not need to.
Angel.optimizeForProductionpreInjectRename ResponseContext.enableBuffer to ResponseContext.useBuffer.
ResponseContext.enableBufferResponseContext.useBufferRemoved random_string dependency.
random_stringRemove dependency on package:json_god by default.
package:json_godRemove dependency on package:dart2_constant.
package:dart2_constantCompletely removed the AngelBase class.
AngelBaseRemoved all @deprecated symbols.
@deprecatedRemoved the synchronous equivalents of the above methods (body, files, and originalBuffer), as well as query.
bodyfilesoriginalBufferqueryRemoved Angel.injections and RequestContext.injections.
Angel.injectionsRequestContext.injectionsRemoved Angel.inject and RequestContext.inject.
Angel.injectRequestContext.injectRemoved a dependency on package:pool, which also meant removing AngelHttp.throttle.
package:poolAngelHttp.throttleRemove the RequestMiddleware typedef; from now on, one should use ResponseContext.end exclusively to close responses.
RequestMiddlewareResponseContext.endRemoved RequestContext.grab.
RequestContext.grabRemoved RequestContext.properties.
RequestContext.propertiesRemoved the defunct debug property where it still existed.
debugRemoved Angel.createZoneForRequest.
Angel.createZoneForRequestRemoved Angel.defaultZoneCreator.
Angel.defaultZoneCreatorRemoved the now-obsolete ResponseContext.willCloseItself.
ResponseContext.willCloseItselfRemoved ResponseContext.dispose.
ResponseContext.disposeRemoved the now-obsolete ResponseContext.end.
ResponseContext.endRemoved the now-obsolete ResponseContext.releaseCorrespondingRequest.
ResponseContext.releaseCorrespondingRequest