On PlatformIO with board "arduino_nano_esp32" compile fails:
/Users/tm/.platformio/packages/framework-arduinoespressif32/cores/esp32/io_pin_remap.h:44:69: error: 'digitalPinToGPIONumber' is not a type
#define attachInterrupt(pin, fcn, mode) attachInterrupt(digitalPinToGPIONumber(pin), fcn, mode)