Closed (outdated)
Project:
Devel
Version:
8.x-3.x-dev
Component:
webprofiler
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Dec 2019 at 12:51 UTC
Updated:
29 Aug 2022 at 12:26 UTC
Jump to comment: Most recent
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
Comment #2
d70rr3s commentedComment #3
d70rr3s commentedThe 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.
Comment #4
salah1Thank 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).
Comment #5
jonathan1055 commentedSee https://gitlab.com/drupalspoons/devel/-/issues/216
and https://gitlab.com/drupalspoons/webprofiler/-/issues/9
Both are now closed