Skip to content

docs: Upgrade guide covers 4 of 16 breaking changes in the 4.0 changelog #803

Description

@FXschwartz

docs/11-upgrading/01-upgrade-to-four.md documents authenticationKeyManager, legacy streaming, Insights database access, and the SDK bump. The rc.1 changelog lists twelve more breaking changes with no mention in the guide (grep for each term returns nothing). The concept pages are already correct for most of them, so each item needs a sentence or two plus a link, ideally under a heading a 3.4 user can search for.

  • Message central default. postMessage now defaults to MessageScope.auto (cluster-wide via Redis, local fallback). Code that relied on local-only delivery must pass MessageScope.local; global: true becomes scope: MessageScope.global. Link server-events.
  • Client exception hierarchy. Sealed ServerpodClientException; HTTP errors under sealed ServerpodClientHttpException; network errors are ServerpodClientNetworkException; statusCode == -1 is gone.
  • Database exception hierarchy. New DatabaseUniqueViolationException, DatabaseForeignKeyViolationException, SqliteDatabaseLockedException; the four Database*RowException classes are replaced by DatabaseUnexpectedResultException.
  • .spy.yaml required. Bare .yaml/.yml model files are ignored with an error; rename them.
  • CloudStorage *withOptions merge. Custom implementations fold the options parameter into storeFile, temporaryDownloadUrl, createUploadDescription, etc.
  • Native Google web sign-in removed from serverpod_auth_idp_flutter; web uses the OAuth2 PKCE redirect flow and needs clientId, redirectUri, and FlutterWebAuth2CallbackRoute. Legacy module unaffected.
  • Deprecated future call methods removed. Only the generated pod.futureCalls.* API remains.
  • orderDescending removed; Order constructor private. Use column.asc() / column.desc(). (Changelog says "deprecated"; it no longer compiles.)
  • ignoreEndpoint removed. Use @doNotGenerate.
  • SerializationManagerServer removed.
  • Legacy web widgets and static directory classes removed. Widget, WidgetJson, WidgetRedirect, RouteStaticDirectoryWebWidget, JsonWidget, RedirectWidget, StaticRoute; WidgetRoute.build returns WebWidget?.
  • --mini removed from serverpod create. Use --no-database or --template server.
  • Postgres image. Compose files move from pgvector/pgvector:pg16 to ghcr.io/serverpod/postgres:16; link the existing PostGIS upgrade page.
  • Also mention account merging (headline auth feature, absent from both upgrade guides) and that serverpod generate must run before create-migration in the migration step.

Sources: CHANGELOG.md rc.1 "Breaking changes"; packages/serverpod/lib/src/server/message_central.dart:22-33, 58; packages/serverpod_client/lib/src/serverpod_client_exception.dart; packages/serverpod_database/lib/src/concepts/exceptions.dart; tools/serverpod_cli/lib/src/util/legacy_model_files.dart; packages/serverpod_database/lib/src/concepts/order.dart:39 56; packages/serverpod/lib/src/web_server/widgets/web_widget.dart.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions