You can disable Intelephense > Diagnostics: Undefined Properties in the Intelephense extension config using settings editor;
Or put this line in the settings.json
This happens because frameworks injects these properties dynamically into the controller at runtime , as Inteliphense could not find these properties declared in your code, it reports an unknown property error.