You might have found a solution by the time but for others trying to find it :
You need to put the 'category' in your entry_options :
->add('animals', CollectionType::class, [
'entry_type' => AnimalType::class,
'entry_options' => [
'label' => false,
'category' => $options['category'],
],
'allow_add' => true,
'allow_delete' => true,
'by_reference' => false,
])
And define it in your AnimalType confirgureOptions :
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => ActivityAnimal::class,
'category' => null,
]);
}
Have a good day !