Skip to content

Upgrading angel_framework 1 to 2

Breaking1.1.5+1 → 2.1.1Breaking28New27Changed44Fixed16Other27

BreakingUpgrade verdict

28 breaking changes.

  • Remove unnecessary new and const.
  • Remove dependency on body_parser.
  • Remove ResponseContext.sendFile.
  • No longer export HTTP-specific code from angel_framework.dart.
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.

Breaking28
Remove unnecessary new and const.
newconst
Remove dependency on body_parser.
body_parser
Remove ResponseContext.sendFile.
ResponseContext.sendFile
No longer export HTTP-specific code from angel_framework.dart.
angel_framework.dart
Renamed waterfall to chain.
waterfallchain
Renamed Routable.service to Routable.findService.
Routable.serviceRoutable.findServiceRoutable.findHookedService
Removed Angel.injectEncoders.
Angel.injectEncoders
Angel.optimizeForProduction no longer calls preInject, as it does not need to.
Angel.optimizeForProductionpreInject
Rename ResponseContext.enableBuffer to ResponseContext.useBuffer.
ResponseContext.enableBufferResponseContext.useBuffer
Removed random_string dependency.
random_string
Remove dependency on package:json_god by default.
package:json_god
Remove dependency on package:dart2_constant.
package:dart2_constant
Completely removed the AngelBase class.
AngelBase
Removed all @deprecated symbols.
@deprecated
Removed the synchronous equivalents of the above methods (body, files, and originalBuffer), as well as query.
bodyfilesoriginalBufferquery
Removed Angel.injections and RequestContext.injections.
Angel.injectionsRequestContext.injections
Removed Angel.inject and RequestContext.inject.
Angel.injectRequestContext.inject
Removed a dependency on package:pool, which also meant removing AngelHttp.throttle.
package:poolAngelHttp.throttle
Remove the RequestMiddleware typedef; from now on, one should use ResponseContext.end exclusively to close responses.
RequestMiddlewareResponseContext.end
Removed RequestContext.grab.
RequestContext.grab
Removed RequestContext.properties.
RequestContext.properties
Removed the defunct debug property where it still existed.
debug
Removed Angel.createZoneForRequest.
Angel.createZoneForRequest
Removed Angel.defaultZoneCreator.
Angel.defaultZoneCreator
Removed the now-obsolete ResponseContext.willCloseItself.
ResponseContext.willCloseItself
Removed ResponseContext.dispose.
ResponseContext.dispose
Removed the now-obsolete ResponseContext.end.
ResponseContext.end
Removed the now-obsolete ResponseContext.releaseCorrespondingRequest.
ResponseContext.releaseCorrespondingRequest