Skip to content

DEPRECATION: Importing inject from @ember/service is deprecated. Please import service instead. #119

Description

@gzurbach

After updating our app from Ember 5.12 to Ember 6.4 we're seeing the following deprecation warnings coming from this add-on:

DEPRECATION: Importing `inject` from `@ember/service` is deprecated. 
Please import `service` instead. 
[deprecation id: importing-inject-from-ember-service] 
This will be removed in ember-source 7.0.0. 
See https://deprecations.emberjs.com/id/importing-inject-from-ember-service for more details.

These lines should be updated:

The docs indicate:

If you're working on a library that needs to support ember-source prior to 4.1, you can support both styles of service via:

import * as emberService from '@ember/service';

const service = emberService.service ?? emberService.inject;

@mansona Would you be open to accept a PR with this change?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions