The User module's services user.private_tempstore and user.shared_tempstore are deprecated in favour of tempstore.private and tempstore.shared. Code that uses the User module services should be updated to use the new services from core.

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.

and

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.

The same three tests cause this message, all in Drupal\Tests\webprofiler\FunctionalJavascript

1x in ToolbarTest::testToolbarOnFrontPage
1x in ToolbarTest::testToolbarReportPage
1x in ToolbarTest::testToolbarNotAppearsOnExcludedPath

Change record: https://www.drupal.org/node/2935639

Comments

jonathan1055 created an issue. See original summary.

d70rr3s’s picture

Assigned: Unassigned » d70rr3s
Issue tags: +ContributionWeekend2020
d70rr3s’s picture

Assigned: d70rr3s » Unassigned
Issue tags: -ContributionWeekend2020

The test it self does not invoke nor uses the user.*_tempstore services, neither the parent (WebprofilerTesBase) class. This could be related base class which provides all user and session support adn must be addressed in core.

salah1’s picture

Thank you @Jonathan1055 & @d70rr3s
The warnings come up everytime the [webproflier/tests/src/FunctionalJavascript/ToolbarTest.php] tests run.
I did some manual debug on this and i can confirm that the module code doesn't use the deprecated code.
However, what's is going on is Composer\Autoload\ClassLoader thing.
Here is part of the stacktrace:

../webprofiler/src/Compiler/ServicePass.php:72
../webprofiler/src/Compiler/ServicePass.php:26

#2 Composer\Autoload\ClassLoader->loadClass()
#3 spl_autoload_call()
#4 ReflectionClass->__construct() called at [/var/www/contrib-modules/devel-8.x-3.x/webprofiler/src/Compiler/ServicePass.php:72]
#5 Drupal\webprofiler\Compiler\ServicePass->extractData() called at [/var/www/contrib-modules/devel-8.x-3.x/webprofiler/src/Compiler/ServicePass.php:26]
#6 Drupal\webprofiler\Compiler\ServicePass->process() called at [/var/www/d8-test-web-compsr-dwnld/vendor/symfony/dependency-injection/Compiler/Compiler.php:140]

I haven't had a chance to see if there a magic line that can be put on inside /webproflier/tests/src/FunctionalJavascript/ToolbarTest.php that says ignore "deprecation xyz".
Perhaps, it could also be beneficial to create a separate issue "to re-write webprofiler module or its tests" and link this issue and other issues(so someone with time can grab that).

jonathan1055’s picture