Can't set a file->description field in a paragraph programmatically I am running a drupal 7 migration into Drupal 8 paragraphs. I am retrieving the source fid, mapping from the file migration, getting the dest file id, getting the source file description, and then creating a new file paragraph that just contains a public_file field.

Problem is that I can't find a way to set the description field of the file? I can create the paragraph with the file fine.

I have tried the following (where field_files is the name of the field in the paragraph)

$file-&gt;set('description', $file_title);


.  

$file-&gt;field_files[0]['description'] = $file_title;


.

$paragraph-&gt;set('field_files', $file);
$paragraph-&gt;set('field_files_descriptions', $file_title);


I have tried creating a test paragraph through the front end containing a description field and inspected the values, and there isn't anything obvious where I can set the value,

$testparagraph = $paragraph-&gt;getFields();
$testfile = $file-&gt;getFields();


The description value is only here in the paragraph entity

$testparagraph['field_files']-&gt;list[0]-&gt;values['description']


I'm at a bit of a loss where I can set this description.
The answer was incredibly simple

$paragraph-&gt;field_files-&gt;description = $file_title;