We went on two military expeditions with the Messenger of Allah ﷺ during Ramadan, the day of Badr and the conquest, and we broke our fast on both of them.
حدثنا قتيبة حدثنا ابن لهيعة عن يزيد بن أبي حبيب عن معمر بن أبي حيية عن ابن المسيب أنه سأله عن الصوم في السفر فحدث أن
غزونا مع رسول الله ﷺ في رمضان غزوتين يوم بدر والفتح فأفطرنا فيهما
[Its chain is daif] Ahmad reported it in 1/22, from the hadith of Ibn Lahia, and he did not narrate it before his mixing up of hadiths, as far as I know.On this subject there is also a report from Abu Saeed [Muslim, no. 1116, and see the two preceding hadiths].