Field attributes have had an API change `$field->attributes` should now be `$field->getAttributes()`.