Custom field type not found I'm writing my first custom field type. The field will contain a rating field for authors. Now when I create the class for the field and activate my module nothing has been found. No errors can be found in the log and the field is not be inserted into the field list of the content type.

I used the "Drupal 8 Development Cookbook" for more information about Drupal 8, but when I check my source with the example from the book I can't find any changes (except from my custom rating).

My class that contains the custom field was placed in the src/Plugin/Field/FieldType/Rating.php file and looks like:

&lt;?php

/**
 * @file
 * Contains \Drupal\RateField\Plugin\Field\FieldType\Rating.
 */

namespace Drupal\RateField\Plugin\Field\FieldType;

use Drupal\Core\Field\FieldItemBase;
use Drupal\Core\Field\FieldStorageDefinitionInterface;
use Drupal\Core\TypedData\DataDefinition;

/**
 * Plugin implementation of the 'Rating' field type.
 *
 * @FieldType(
 *   id = "rating",
 *   label = @Translation("Rating field"),
 *   description = @Translation("This field stores a rating of the object."),
 *   category = @Translation("General"),
 *   default_widget = "string_textfield",
 *   default_formatter = "string"
 * )
 */
class Rating extends FieldItemBase {
  /**
   * {@inheritdoc}
   */
  public static function schema(\Drupal\Core\Field\FieldStorageDefinitionInterface $field_definition) {
    return array(
      'columns' =&gt; array(
        'rating' =&gt; array(
          'description' =&gt; 'Rating',
          'type' =&gt; 'int',
          'length' =&gt; '255',
          'not null' =&gt; TRUE,
          'default' =&gt; '0',
        ),
      ),
      'indexes' =&gt; array(
        'rating' =&gt; array('rating'),
      ),
    );
  }

  /**
   * {@inheritdoc}
   */
  public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
    $properties['rating'] = \Drupal\Core\TypedData\DataDefinition::create('range')
      -&gt;setLabel(t('rating'));

    return $properties;
  }

}


Can someone help me with this?
This is most probably a namespace issue, I think you have to replace

namespace Drupal\RateField\Plugin\Field\FieldType;


with 

namespace Drupal\rate_field\Plugin\Field\FieldType;


or whatever your name's folder is called.

Good luck!