umbraco / Announcements

Subscribe to this repo to be notified about major changes in Umbraco-CMS, Deploy and Forms
MIT License
21 stars 0 forks source link

[Breaking change]: Updating nullable signatures #3

Open Zeegaan opened 2 years ago

Zeegaan commented 2 years ago

Description

In our codebase, we have found methods that have wrong nullability, and those we wish to update as soon as possible. As these are not binary breaking changes, but only source breaking changes we will change those between majors, especially to prevent people from using a non-nullable method that in theory could actually return null, and therefore break their code.

PR that makes the change: N/A

Version

Umbraco 11.0.0-rc1

Previous behaviour

Some methods return non-nullable that can actually be null. Some methods return nullable that cannot be null.

New behaviour

Some methods return non-nullable that can not be null. Some methods return nullable that can be null.

Type of breaking change

Reason for change

We want to prevent peoples code from blowing up if they use a non-nullable method in their codebase, and to stop redundant null-checks if they are using a nullable method that can never be null

Recommended action

If you are using a method with a wrong signature, please move to the correct signature instead

Affected APIs

N/A