ember-cli-mirage icon indicating copy to clipboard operation
ember-cli-mirage copied to clipboard

discoverEmberDataModels() triggers `ember-data:deprecate-early-static` deprecation

Open pichfl opened this issue 3 years ago • 1 comments

Using ember-cli-mirage will trigger the following deprecation in a project with [email protected]

DEPRECATION: Accessing schema information on Models without looking up the model via the store is deprecated. Use store.modelFor (or better Snapshots or the store.getSchemaDefinitionService() apis) instead. [deprecation id: ember-data:deprecate-early-static] This will be removed in Ember 5.0.

pichfl avatar Sep 07 '22 15:09 pichfl

Heres a poc that resolved this deprecation for me: https://github.com/miragejs/ember-cli-mirage/pull/2444

kiwi-josh avatar Sep 12 '22 20:09 kiwi-josh

Confirm that this indeed breaks in v5, shows an assertion. Screenshot 2023-06-10 at 14 31 42

nickschot avatar Jun 10 '23 12:06 nickschot

Facing this same error trying to bymp ember-data to 5.0.0 Signal

esbanarango avatar Jun 28 '23 17:06 esbanarango

@kiwi-josh's poc only seems to have been merged into v2. Is there a v3 release that addresses this? I'm on v3.0.0-alpha.3 because of the issue with @embroider/macros < v1, as outlined here: https://github.com/miragejs/ember-cli-mirage/issues/2343.

andrew-paterson avatar Sep 27 '23 10:09 andrew-paterson