Breaking Changes in EAV and 2sxc v17
Breaking Changes in EAV and 2sxc v17
We try to minimize breaking changes, and most breaking changes won't affect your work, because it's internal API. We're documenting it here to ensure you know what happened, in case you still run into this.
Summary
TODO:
v17.00
TODO:
ToSic.Eav.App.AppData
is renamed toToSic.Eav.Apps.DataSources.AppDataWithCrud
- In Typed mode, the
App.Data
now has a different interfaceToSic.Sxc.Apps.IAppDataTyped
AppState
changes...App
object had a hiddenAppState
property which was never documented and is now removed.
If you were using it, then probably to accessGetContentType(string)
. You can find a replacement onApp.Data.GetContentType(...)
.
Shortlink: https://go.2sxc.org/brc-17
Planned Removals for 2sxc v17
For 2sxc 17 we plan to remove some very old APIs. The process is as follows:
- Mark the API as deprecated in the code
- Add internal code which warns the admin that the App is using deprecated code
- Provide guidance here how to resolve
- Make sure the warnings have been around for at least 6 months
- Remove the code on the next major release
For v17 we plan to remove some very old APIs, which we believe are probably not even used any more. This is the list:
- The old namespace
ToSic.SexyContent.Interfaces.IApp
and all related code
We believe this is probably not used at all, since it's probably only ever used to accessApp.Configuration
which isdynamic
when using this interface, but a normal object with typed properties when using the normalToSic.Sxc.Apps.IApp
interface.
Guide to Fixing Issues
Fixing SexyContent.Interfaces.IApp removal
Background
A long time ago 2sxc was called SexyContent and we used the namespace ToSic.SexyContent.Interfaces
for various things.
Ca. 2014, we decided to rename it to 2sxc and use a ToSic.Sxc
namespace instead.
In addition to that, we created a clearer namespace structure.
Am I Affected?
Most code does not explicitly use namespaces, and if your code is newer than 2016, you are probably not affected.
But if you have any code which uses the namespace ToSic.SexyContent
in your Razor or C# code you are affected.
This is especially true if you have code such as:
using SexyContent.Interfaces;
IApp app = App;
var version = app.Configuration.Version;
How to Fix
It's difficult to give you an exact guideline, because we don't know what your code does.
But in most cases, you'll just be working with the current App
object which is typed as IApp.
So in most cases, you don't need to specify the type at all, just use something like:
var app = App;
var version = App.Configuration.Get("Version");