Skip to content

Fix deprecation warning regarding implicit injections #247

@mayatron

Description

@mayatron

The following deprecation warning appears on application launch, starting with Ember 3.26.0:

DEPRECATION: A value was injected implicitly on the 'emberSpinnerPrefixConfig' property of an instance of <monolith@component:ember-spinner::ember195>. Implicit injection is now deprecated, please add an explicit injection for this value. If the injected value is a service, consider using the @service decorator. [deprecation id: implicit-injections] See https://deprecations.emberjs.com/v3.x#toc_implicit-injections for more details.

This appears to be caused by:

export default {
name: 'ember-spinner-prefix',
initialize: function() {
let application = arguments[1] || arguments[0];
application.register('ember-spinner:main', emberSpinnerPrefix, {instantiate: false});
application.inject('component:ember-spinner', 'emberSpinnerPrefixConfig', 'ember-spinner:main');
}
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions