field_info_field() deprecated, what's the equivalent? In Drupal 8 field_info_field() has been deprecated. The docs say to use this instead:

Field::fieldInfo()-&gt;getField($field_name)


I've tried various iterations of it, such as:

$foo = \Drupal\field\Field::fieldInfo()-&gt;getField('field_address');
$foo = \Field::fieldInfo()-&gt;getField('field_address');


But I keep getting an error similar to the following:

Fatal error: Class 'Drupal\field\Field' not found in /var/www/drupal/modules/custom/foo/src/Controller/FooController.php on line ##


What am I missing?

UPDATE

Thanks to Clive's answer, and especially for pointing me towards change records (which I've now subscribed to via RSS), I was able to generate various commands to get data about entity types, bundles and field "info/instances" in Drupal 8.

The data that was once available via field_info_fields() and field_info_instances(), is now available throughout the EntityManager, FieldConfig, and FieldStorageConfig:

$entity_type = 'node';
$bundle = 'course';
$field_name = 'field_address';
$foo = \Drupal::entityManager()-&gt;getFieldMap();
$foo = \Drupal::entityManager()-&gt;getAllBundleInfo();
$foo = \Drupal::entityManager()-&gt;getBundleInfo($entity_type);
$foo = \Drupal\field\Entity\FieldConfig::loadByName($entity_type, $bundle, $field_name);
$foo = \Drupal::entityManager()-&gt;getFieldDefinitions($entity_type, $bundle);
$foo = \Drupal::entityManager()-&gt;getFieldStorageDefinitions($entity_type);
$foo = \Drupal::entityManager()-&gt;getStorage('field_storage_config')-&gt;loadMultiple();
// This one doesn't seem to work for me, see my comment to Clive for a workaround.
$foo = \Drupal\field\Entity\FieldStorageConfig::loadByName($entity_type, $field_name);


Here are some other calls that may be useful:

$foo = \Drupal::entityManager()-&gt;getAllViewModes();
$foo = \Drupal::entityManager()-&gt;getViewModes($entity_type);
$foo = \Drupal::entityManager()-&gt;getAllFormModes();
According to the change record:

field_info_field($entity_type, $field_name) -> FieldStorageConfig::loadByName($entity_type, $field_name)

So you should use \Drupal\field\Entity\FieldStorageConfig::loadByName from now on.

It's probably best to use change records and issues on Drupal.org itself for docs at the moment, rather than 3rd party websites - I think they have slightly more chance of being right and kept up to date when something changes.