title: vscode + PHP intelephense named arguments from PHP 8.1 shown as errors
body: <p>In code written in PHP8.1 I use <a href="https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments" rel="nofollow noreferrer">named arguments</a> in a method call:</p>
  <pre><code>// function definition
  public function myFunction(string $name, string $description = &quot;&quot;)
  // method call with errors
  -&gt;myFunction(name: self::SOME_CONSTANT)
  </code></pre>
  <p>however extension PHP Intelephense shows 2 errors there:
  <br><code>Undefined constant 'App\Some\Namespace\name'.intelephense(1011)</code>
  <br> and <code>Unexpected ':'.intelephense(1001) </code></p>
  <p>I tried already following (with no success):</p>
  <ul>
  <li>System-wide install PHP8.1 and set it as the default version (cli version PHP 8.1.2)</li>
  <li>Setting these for both User &amp;&amp; Workspace</li>
  <li>
  <ul>
  <li><code>&quot;intelephense.environment.phpVersion&quot;: &quot;8.1.2&quot;,</code></li>
  </ul>
  </li>
  <li>
  <ul>
  <li><code>&quot;php.validate.executablePath&quot;: &quot;/usr/bin/php8.1&quot;,</code></li>
  </ul>
  </li>
  <li>Restart (closing vscode completely and reopening the workspace folder again)</li>
  </ul>
  <h1>EDIT / ANSWER - Update your VSCODE to LATEST!</h1>
  <p>If you're not sure where to find out - check out Help &gt; About and then <a href="https://code.visualstudio.com/updates" rel="nofollow noreferrer">vscode updates website</a>.
  The issue in the end really was an issue of an <strong>outdated Visual Studio Code which caused extensions not to be properly updated.</strong> How did this happen? I was accidentally using vscode from <code>apt install code</code> which didn't update itself and it CAN be installed alongside the snap version - for ubuntu, the solution was to remove the the apt code and just keep the snap version or install it with <code>sudo snap install --classic code</code> - thanks goes to <a href="https://askubuntu.com/a/1217734/277898">https://askubuntu.com/a/1217734/277898</a> for me to realize x)</p>