Installer: Removes unused telemetry functionality (#20995)

* fix: removes the non-functioning installer telemetry and obsoletes all InstallHelper functionality

* fix: deprecates related cookie

* fix: adds ActivatorUtilitiesConstructor for DI

* fix: obsoletes and removes more telemetry functionality

* fix: removes uneeded modifier

* docs: removes docs

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Jacob Overgaard
2025-11-28 22:21:04 +01:00
committed by GitHub
parent f99e9394f8
commit 050b37ed1a
6 changed files with 31 additions and 110 deletions

View File

@@ -17,6 +17,7 @@ public static partial class Constants
/// </summary>
public const string AcceptPreviewCookieName = "UMB-WEBSITE-PREVIEW-ACCEPT";
[Obsolete("InstallerCookieName is no longer used and will be removed in Umbraco 19.")]
public const string InstallerCookieName = "umb_installId";
/// <summary>

View File

@@ -1,6 +1,8 @@
namespace Umbraco.Cms.Core.Persistence.Repositories;
[Obsolete("Installation logging is no longer supported and this interface will be removed in Umbraco 19.")]
public interface IInstallationRepository
{
[Obsolete("This method no longer has any function and will be removed in Umbraco 19.")]
Task SaveInstallLogAsync(InstallLog installLog);
}

View File

@@ -3,31 +3,15 @@ using Umbraco.Cms.Core.Serialization;
namespace Umbraco.Cms.Core.Persistence.Repositories;
[Obsolete("Installation logging is no longer supported and this class will be removed in Umbraco 19.")]
public class InstallationRepository : IInstallationRepository
{
private const string RestApiInstallUrl = "https://our.umbraco.com/umbraco/api/Installation/Install";
private static HttpClient? _httpClient;
private readonly IJsonSerializer _jsonSerializer;
public InstallationRepository(IJsonSerializer jsonSerializer) => _jsonSerializer = jsonSerializer;
public async Task SaveInstallLogAsync(InstallLog installLog)
public InstallationRepository(IJsonSerializer jsonSerializer)
{
try
{
if (_httpClient == null)
{
_httpClient = new HttpClient();
}
using var content = new StringContent(_jsonSerializer.Serialize(installLog), Encoding.UTF8, "application/json");
await _httpClient.PostAsync(RestApiInstallUrl, content);
}
// this occurs if the server for Our is down or cannot be reached
catch (HttpRequestException)
{
}
}
[Obsolete("This method no longer has any function and will be removed in Umbraco 19.")]
public Task SaveInstallLogAsync(InstallLog installLog) => Task.CompletedTask;
}