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:
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user