The Prophet ﷺ forbade selling fruit for several years in advance.
أخبرنا قتيبة بن سعيد قال حدثنا سفيان عن حميد الأعرج عن سليمان بن عتيك قال قتيبة عتيك بالكاف والصواب عتيق
عن النبي ﷺ نهى عن بيع الثمر سنين
Muslim narrated it in the Book of Transactions, Chapter on Leasing Land, no. 101/1543, from the hadith of Sufyan bin Uyayna, and it is in Kubra, no. 6122.