This might effectively be a dupe of #1853112: Replacement for Krumo?, but it'd be nice to find a short-term fix.
Consider the following snippet:
dpm(entity_create('comment', array('nid' => 1))->cid);
This fatals. Comment::$cid is no longer an int, but a FieldItem. See http://drupal.org/node/1806650 and http://drupal.org/node/1795854 for more.

The error is

InvalidArgumentException: Field krumo511bef056c0e3 is unknown. in Drupal\Core\Entity\Field\FieldItemBase->get() (line 116 of /Users/tim/www/d8/core/lib/Drupal/Core/Entity/Field/FieldItemBase.php).

It stems from \Drupal\Core\Entity\Field\Type\Field::__get().

Comments

jenlampton’s picture

I'm having a similar problem printing out a node. dpm($node) gives this:

 ... (Object) Drupal\Core\Entity\EntityBCDecorator 

I need this because debug doesn't work on nodes...

 Fatal error: Nesting level too deep - recursive dependency? in drupal-8.x-dev/core/includes/common.inc on line 6181
lussoluca’s picture

Issue summary: View changes
Status: Active » Closed (fixed)

With the new Kint (or with the vardumper module) printing a TypedData object works correctly.

lussoluca’s picture

Status: Closed (fixed) » Fixed
willzyx’s picture

Status: Fixed » Closed (works as designed)