ember-fastboot / ember-cli-fastboot

Server-side rendering for Ember.js apps
http://ember-fastboot.com/
MIT License
852 stars 160 forks source link

Avoid implicit injection _fastbootInfo deprecation #841

Closed snewcomer closed 2 years ago

snewcomer commented 2 years ago

As noted in reference PR, the deprecation is issued when the FastBoot service is created. However, if we also register a property with the same name as the implicit injection (app.inject('service:foo', 'store', 'some:object')), the deprecation goes away.

close https://github.com/ember-fastboot/ember-cli-fastboot/issues/819 ref https://github.com/ember-fastboot/ember-cli-fastboot/pull/823/files rfc https://github.com/emberjs/rfcs/pull/680

ef4 commented 2 years ago

This is not really fixed. Adding ember-cli-fastboot 3.2.0-beta.3 to a new ember 3.27 app still results in the implicit injection deprecation message the first time you render in fastboot.

I think code like this needs to go away: https://github.com/ember-fastboot/ember-cli-fastboot/blob/8be7162fbf4a41ae48ad8c0688a8d55cbabd8579/packages/fastboot/src/fastboot-info.js#L41

xg-wang commented 2 years ago

@ef4 would a new schema version avoid breaking change? Essentially the attempt at https://github.com/ember-fastboot/ember-cli-fastboot/pull/823/files