Replace deprecated user.private_tempstore and user.shared_tempstore with services now in Core
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3100276. --> Reported by: [jonathan1055](https://www.drupal.org/user/92645) >>> <p>The User module's services <code>user.private_tempstore</code> and <code>user.shared_tempstore</code> are deprecated in favour of <code>tempstore.private</code> and <code>tempstore.shared</code>. Code that uses the User module services should be updated to use the new services from core.</p> <pre>3x: \Drupal\user\PrivateTempStoreFactory is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\PrivateTempStoreFactory instead. See https://www.drupal.org/node/2935639.</pre><p> and</p> <pre>3x: \Drupal\user\SharedTempStoreFactory is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStoreFactory instead. See https://www.drupal.org/node/2935639.</pre><p>The same three tests cause this message, all in Drupal\Tests\webprofiler\FunctionalJavascript</p> <pre>1x in ToolbarTest::testToolbarOnFrontPage<br>1x in ToolbarTest::testToolbarReportPage<br>1x in ToolbarTest::testToolbarNotAppearsOnExcludedPath</pre><p>Change record: <a href="https://www.drupal.org/node/2935639">https://www.drupal.org/node/2935639</a></p> > Related issue: [Issue #3042575](https://www.drupal.org/node/3042575)
issue