Intelephense is showing Undefined Type errors that are not true

Windows 11: 24h2
VS Code: 1.102.1 (WSL: Ubuntu 24.04.2 LTS)
Intelephense: 1.14.4
Symfony: v6.4.23
PHP: 8.2.28

<?php

namespace AppCommand;

use DoctrineBundleFixturesBundleFixture;
use DoctrineORMEntityManagerInterface;
use SymfonyComponentConsoleAttributeAsCommand;
use SymfonyComponentConsoleCommandCommand;
use SymfonyComponentConsoleInputInputArgument;
use SymfonyComponentConsoleInputInputInterface;
use SymfonyComponentConsoleOutputOutputInterface;

#[AsCommand(
    name: 'app:fixtures:load-one',
    description: 'Load a single Doctrine fixture by class name',
)]

All of the symfony classes are highlighted with a red line by Intelephense.
The above snippet shows that the AsCommand has been included but the line #[AsCommand( shows an error of:

Undefined type 'SymfonyComponentConsoleAttributeAsCommand'.intelephense(P1009)
class SymfonyComponentConsoleAttributeAsCommand
function AsCommand::__construct(
    string $name,
    string|null $description = null,
    array $aliases = [],
    bool $hidden = false
)
Service tag to autoconfigure commands

I am seeing the exact same error from:

  • class ClassName extends Command
    • Undefined type ‘SymfonyComponentConsoleCommandCommand’.intelephense(P1009)
  • parent::__construct();
    • Undefined type ‘SymfonyComponentConsoleCommandCommand’.intelephense(P1009)
  • $this->addArgument(...);
    • Undefined method ‘addArgument’.intelephense(P1013)
  • protected function execute(InputInterface $input, OutputInterface $output): int
    • Undefined type ‘SymfonyComponentConsoleInputInputInterface’.intelephense(P1009)
    • Undefined type ‘SymfonyComponentConsoleOutputOutputInterface’.intelephense(P1009)

I have tried:

  • Restarting
    • laptop
    • PHP
    • Symfony:server
    • VS Code
  • Force Intelephense to reindex
  • Regenerate autoloader (composer dump-autoload –optimize)

I only have two options left that I can think of that include removing intelephense or specifically applying a setting that stops this (which seems pointless as then its not doing its job) "intelephense.diagnostics.undefinedTypes": false,