PhpStorm->Preferences->Languages&Frameworks->PHP->PHP language level: set to 7.2 PhpStorm->Preferences->Languages&Frameworks->PHP->Include Path->press the + and enter your path to src and vendor