DEV: Remove old deprecations (#14906)
This commit is contained in:
parent
f38a06f3a5
commit
e245839c3c
|
@ -2,7 +2,6 @@ import Controller, { inject as controller } from "@ember/controller";
|
|||
import EmberObject, { action } from "@ember/object";
|
||||
import I18n from "I18n";
|
||||
import bootbox from "bootbox";
|
||||
import deprecated from "discourse-common/lib/deprecated";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { capitalize } from "@ember/string";
|
||||
|
||||
|
@ -167,15 +166,4 @@ export default Controller.extend({
|
|||
toggleDeleteTooltip() {
|
||||
this.toggleProperty("showTooltip");
|
||||
},
|
||||
|
||||
actions: {
|
||||
destroy() {
|
||||
deprecated("Use `destroyGroup` action instead of `destroy`.", {
|
||||
since: "2.5.0",
|
||||
dropFrom: "2.6.0",
|
||||
});
|
||||
|
||||
this.destroyGroup();
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -16,7 +16,7 @@ registerUnbound("theme-setting", (themeId, key, hash) => {
|
|||
if (hash.deprecated) {
|
||||
deprecated(
|
||||
"The `{{themeSetting.setting_name}}` syntax is deprecated. Use `{{theme-setting 'setting_name'}}` instead",
|
||||
{ since: "v2.2.0.beta8", dropFrom: "v2.3.0" }
|
||||
{ since: "v2.2.0.beta8" }
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -241,7 +241,6 @@ if (typeof Discourse !== "undefined") {
|
|||
if (!warned) {
|
||||
deprecated("Import the Site class instead of using Discourse.Site", {
|
||||
since: "2.4.0",
|
||||
dropFrom: "2.6.0",
|
||||
});
|
||||
warned = true;
|
||||
}
|
||||
|
|
|
@ -1139,9 +1139,8 @@ if (typeof Discourse !== "undefined") {
|
|||
Object.defineProperty(Discourse, "User", {
|
||||
get() {
|
||||
if (!warned) {
|
||||
deprecated("Import the User class instead of using User", {
|
||||
deprecated("Import the User class instead of using Discourse.User", {
|
||||
since: "2.4.0",
|
||||
dropFrom: "2.6.0",
|
||||
});
|
||||
warned = true;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ import I18n from "I18n";
|
|||
import PreloadStore from "discourse/lib/preload-store";
|
||||
import RSVP from "rsvp";
|
||||
import Session from "discourse/models/session";
|
||||
import deprecated from "discourse-common/lib/deprecated";
|
||||
import { setDefaultOwner } from "discourse-common/lib/get-owner";
|
||||
import { setIconList } from "discourse-common/lib/icon-library";
|
||||
import { setURLContainer } from "discourse/lib/url";
|
||||
|
@ -43,33 +42,12 @@ export default {
|
|||
PreloadStore.store(key, JSON.parse(preloaded[key]));
|
||||
|
||||
if (setupData.debugPreloadedAppData === "true") {
|
||||
/* eslint-disable no-console */
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(key, PreloadStore.get(key));
|
||||
/* eslint-enable no-console */
|
||||
}
|
||||
});
|
||||
|
||||
let baseUrl = setupData.baseUrl;
|
||||
Object.defineProperty(app, "BaseUrl", {
|
||||
get() {
|
||||
deprecated(`use "get-url" helpers instead of Discourse.BaseUrl`, {
|
||||
since: "2.5",
|
||||
dropFrom: "2.6",
|
||||
});
|
||||
return baseUrl;
|
||||
},
|
||||
});
|
||||
let baseUri = setupData.baseUri;
|
||||
Object.defineProperty(app, "BaseUri", {
|
||||
get() {
|
||||
deprecated(`use "get-url" helpers instead of Discourse.BaseUri`, {
|
||||
since: "2.5",
|
||||
dropFrom: "2.6",
|
||||
});
|
||||
return baseUri;
|
||||
},
|
||||
});
|
||||
setupURL(setupData.cdn, baseUrl, setupData.baseUri);
|
||||
setupURL(setupData.cdn, setupData.baseUrl, setupData.baseUri);
|
||||
setEnvironment(setupData.environment);
|
||||
app.SiteSettings = PreloadStore.get("siteSettings");
|
||||
I18n.defaultLocale = setupData.defaultLocale;
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
}}
|
||||
{{else}}
|
||||
{{d-button
|
||||
action=(action "destroy")
|
||||
action=(action "destroyGroup")
|
||||
disabled=destroying
|
||||
icon="trash-alt"
|
||||
class="btn-danger"
|
||||
|
|
|
@ -213,32 +213,6 @@ function setupTestsCommon(application, container, config) {
|
|||
|
||||
$.fn.modal = AcceptanceModal;
|
||||
|
||||
let server;
|
||||
|
||||
Object.defineProperty(window, "server", {
|
||||
get() {
|
||||
deprecated(
|
||||
"Accessing the global variable `server` is deprecated. Use a `pretend()` method instead.",
|
||||
{
|
||||
since: "2.6.0.beta.3",
|
||||
dropFrom: "2.6.0",
|
||||
}
|
||||
);
|
||||
return server;
|
||||
},
|
||||
});
|
||||
Object.defineProperty(window, "sandbox", {
|
||||
get() {
|
||||
deprecated(
|
||||
"Accessing the global variable `sandbox` is deprecated. Import `sinon` instead",
|
||||
{
|
||||
since: "2.6.0.beta.4",
|
||||
dropFrom: "2.6.0",
|
||||
}
|
||||
);
|
||||
return sinon;
|
||||
},
|
||||
});
|
||||
Object.defineProperty(window, "exists", {
|
||||
get() {
|
||||
deprecated(
|
||||
|
@ -252,6 +226,7 @@ function setupTestsCommon(application, container, config) {
|
|||
},
|
||||
});
|
||||
|
||||
let server;
|
||||
let setupData;
|
||||
const setupDataElement = document.getElementById("data-discourse-setup");
|
||||
if (setupDataElement) {
|
||||
|
|
Loading…
Reference in New Issue