Project suddenly using old Arduino Framework

I have been working on a project for a few weeks now without any issues. Today for no apparent reason PIO started using framework-arduinoespressif8266 @ 2.7.4+9 and gnu11/gnu++11 instead of framework-arduinoespressif8266 @ 3.30102.0 (3.1.2) and gnu17/gnu++17. I cannot compile anymore and would REALLY like to know:

  • what happened
  • why it happened
  • how can I fix it

Specifying framework = arduino@3.1.2 in platformio.ini results in “Error: This board doesn’t support arduino@3.1.2 framework!”

I’ll go ahead and reinstall the whole IDE stack (vscode, pio, arduino ide) but this is sooo annoying and such an unprofessional solution from me. I’d love to know how to fix it.