This piece of code used to compile just fine with MiKTeX 2.9.6300:
\documentclass{article}
\usepackage{pgffor}
\begin{document}
\input{forEachInput.tex}
{
test \fruit
}
\end{document}
The file forEachInput.tex contains just one line with
\foreach \fruit in {apple,cherry,banana}
with no space at the end.
Now if I try to compile the same file with MiKTeX 23.4, I get an error: Paragraph ended before \pgffor@next was complete.
On the other hand, if I type directly the content of forEachInput.tex inside the main file (not using input anymore), both MiKTeX 2.9.6300 and MiKTeX 23.4 work perfectly.
It seems something changed its behavior between 2.9.6300 and 23.4? In such a case, I can't figure if it's the \input or the pgffor package, nor can I understand how to make my code work again...