autoHydrateEntityFromInput doesn't work properly

I think the rules MUST be define before the trigger of array_intersect_key() used by auto hydrate otherwhise the hydratation doesn't work for me.